VMime
defaultAuthenticator Class Reference
Inheritance diagram for defaultAuthenticator:
Collaboration diagram for defaultAuthenticator:

Public Member Functions

 defaultAuthenticator ()
 
 ~defaultAuthenticator ()
 
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
 

Additional Inherited Members

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

Detailed Description

An authenticator that can provide some basic information by reading in the messaging session properties.

Constructor & Destructor Documentation

◆ defaultAuthenticator()

◆ ~defaultAuthenticator()

Member Function Documentation

◆ getAccessToken()

const string getAccessToken ( ) const
virtual

Return the optional access token for authentication.

This is used for example with XOAuth2 SASL authentication.

Returns
access token
Exceptions
exceptions::no_auth_informationif the information could not be provided

Implements authenticator.

References serviceInfos::property::AUTH_ACCESS_TOKEN, serviceInfos::property::getName(), and propertySet::hasProperty().

◆ getAnonymousToken()

const string getAnonymousToken ( ) const
virtual

Return the anonymous token (usually, this is the user's email address).

Returns
anonymous token
Exceptions
exceptions::no_auth_informationif the information could not be provided

Implements authenticator.

References platform::getHandler().

◆ getHostname()

const string getHostname ( ) const
virtual

Return the local host name of the machine.

Returns
hostname
Exceptions
exceptions::no_auth_informationif the information could not be provided

Implements authenticator.

References platform::getHandler().

◆ getPassword()

const string getPassword ( ) const
virtual

Return the password of the authentication identity.

Returns
password
Exceptions
exceptions::no_auth_informationif the information could not be provided

Implements authenticator.

References serviceInfos::property::AUTH_PASSWORD, serviceInfos::property::getName(), and propertySet::hasProperty().

◆ getService()

weak_ptr< net::service > getService ( ) const

◆ getServiceName()

const string getServiceName ( ) const
virtual

Return the registered service name of the application service (eg: "imap").

This can be used by GSSAPI or DIGEST-MD5 mechanisms with SASL.

Returns
service name
Exceptions
exceptions::no_auth_informationif the information could not be provided

Implements authenticator.

◆ getUsername()

const string getUsername ( ) const
virtual

Return the authentication identity (usually, this is the username).

Returns
username
Exceptions
exceptions::no_auth_informationif the information could not be provided

Implements authenticator.

References serviceInfos::property::AUTH_USERNAME, serviceInfos::property::getName(), and propertySet::hasProperty().

◆ setService()

void setService ( shared_ptr< net::service serv)
virtual

Called by the messaging service to allow this authenticator to know which service is currently using it.

This is called just before the service starts the authentication process.

Parameters
servmessaging service instance

Implements authenticator.


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