VMime
XOAuth2SASLAuthenticator Class Reference

#include <XOAuth2SASLAuthenticator.hpp>

Inheritance diagram for XOAuth2SASLAuthenticator:
Collaboration diagram for XOAuth2SASLAuthenticator:

Public Types

enum  Mode { MODE_SUGGEST , MODE_EXCLUSIVE }
 

Public Member Functions

 XOAuth2SASLAuthenticator (const Mode mode)
 
 ~XOAuth2SASLAuthenticator ()
 
const std::vector< shared_ptr< SASLMechanism > > getAcceptableMechanisms (const std::vector< shared_ptr< SASLMechanism > > &available, shared_ptr< SASLMechanism > suggested) const
 
- Public Member Functions inherited from defaultSASLAuthenticator
 defaultSASLAuthenticator ()
 
 ~defaultSASLAuthenticator ()
 
const string getUsername () const
 
const string getPassword () const
 
const string getHostname () const
 
const string getAnonymousToken () const
 
const string getServiceName () const
 
const string getAccessToken () const
 
void setService (shared_ptr< net::service > serv)
 
weak_ptr< net::servicegetService () const
 
void setSASLSession (shared_ptr< SASLSession > sess)
 
shared_ptr< SASLSessiongetSASLSession () const
 
void setSASLMechanism (shared_ptr< SASLMechanism > mech)
 
shared_ptr< SASLMechanismgetSASLMechanism () const
 

Additional Inherited Members

- Protected Member Functions inherited from object
 object ()
 
 object (const object &)
 
objectoperator= (const object &)
 
virtual ~object ()
 

Detailed Description

An authenticator that is capable of providing information for XOAuth2 authentication mechanisms (username and access token).

This authenticator force using the XOAUTH2 mechanism.

Member Enumeration Documentation

◆ Mode

Enumerator
MODE_SUGGEST 

Try XOAUTH2 before other mechanisms.

MODE_EXCLUSIVE 

Use XOAUTH2 and nothing else.

Constructor & Destructor Documentation

◆ XOAuth2SASLAuthenticator()

◆ ~XOAuth2SASLAuthenticator()

Member Function Documentation

◆ getAcceptableMechanisms()

const std::vector< shared_ptr< SASLMechanism > > getAcceptableMechanisms ( const std::vector< shared_ptr< SASLMechanism > > &  available,
shared_ptr< SASLMechanism suggested 
) const
virtual

This method is called to allow the client to choose the authentication mechanisms that will be used.

By default, the most secure mechanisms are chosen.

Parameters
availableavailable mechanisms
suggestedsuggested mechanism (or NULL if the system could not suggest a mechanism)
Returns
ordered list of mechanism to use among the available mechanisms (from the first to try to the last)

Reimplemented from defaultSASLAuthenticator.

References vmime::dynamicCast(), defaultSASLAuthenticator::getAcceptableMechanisms(), and XOAuth2SASLAuthenticator::MODE_EXCLUSIVE.


The documentation for this class was generated from the following files: