|
| | XOAuth2SASLMechanism (shared_ptr< SASLContext > ctx, const string &name) |
| |
| | ~XOAuth2SASLMechanism () |
| |
| const string | getName () const |
| |
| bool | step (shared_ptr< SASLSession > sess, const byte_t *challenge, const size_t challengeLen, byte_t **response, size_t *responseLen) |
| |
| bool | isComplete () const |
| |
| bool | hasInitialResponse () const |
| |
| void | encode (shared_ptr< SASLSession > sess, const byte_t *input, const size_t inputLen, byte_t **output, size_t *outputLen) |
| |
| void | decode (shared_ptr< SASLSession > sess, const byte_t *input, const size_t inputLen, byte_t **output, size_t *outputLen) |
| |
| virtual const string | getName () const =0 |
| |
| virtual bool | step (shared_ptr< SASLSession > sess, const byte_t *challenge, const size_t challengeLen, byte_t **response, size_t *responseLen)=0 |
| |
| virtual bool | isComplete () const =0 |
| |
| virtual bool | hasInitialResponse () const =0 |
| |
| virtual void | encode (shared_ptr< SASLSession > sess, const byte_t *input, const size_t inputLen, byte_t **output, size_t *outputLen)=0 |
| |
| virtual void | decode (shared_ptr< SASLSession > sess, const byte_t *input, const size_t inputLen, byte_t **output, size_t *outputLen)=0 |
| |
SASL XOAUTH2 mechanism, used by GMail.
Perform one step of SASL authentication.
Accept data from the server (challenge), process it and return data to be returned in response to the server.
If the challenge is empty (challengeLen == 0), the initial response is returned, if this mechanism has one.
- Parameters
-
| sess | SASL session |
| challenge | challenge sent from the server |
| challengeLen | length of challenge |
| response | response to send to the server (allocated by this function, free with delete[]) |
| responseLen | length of response buffer |
- Returns
- true if authentication terminated successfully, or false if the authentication process should continue
- Exceptions
-
| exceptions::sasl_exception | if an error occurred during authentication (in this case, the values in 'response' and 'responseLen' are undetermined) |
Implements SASLMechanism.