VMime
authenticator Class Referenceabstract
Inheritance diagram for authenticator:
Collaboration diagram for authenticator:

Public Member Functions

virtual const string getUsername () const =0
 
virtual const string getPassword () const =0
 
virtual const string getHostname () const =0
 
virtual const string getAnonymousToken () const =0
 
virtual const string getServiceName () const =0
 
virtual void setService (shared_ptr< net::service > serv)=0
 

Additional Inherited Members

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

Detailed Description

Provides required information for user authentication.

The same information can be requested multiple time (eg. in IMAP, there is a new connection started each time a folder is open), so the object is responsible for caching the information to avoid useless interactions with the user.

Usually, you should not inherit from this class, but instead from the more convenient defaultAuthenticator class.

WARNING: an authenticator should be used with one and ONLY ONE messaging service at a time.

Member Function Documentation

virtual const string getAnonymousToken ( ) const
pure 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

Implemented in defaultSASLAuthenticator, and defaultAuthenticator.

virtual const string getHostname ( ) const
pure virtual

Return the local host name of the machine.

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

Implemented in defaultSASLAuthenticator, and defaultAuthenticator.

virtual const string getPassword ( ) const
pure virtual

Return the password of the authentication identity.

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

Implemented in defaultSASLAuthenticator, and defaultAuthenticator.

virtual const string getServiceName ( ) const
pure 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

Implemented in defaultSASLAuthenticator, and defaultAuthenticator.

virtual const string getUsername ( ) const
pure virtual

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

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

Implemented in defaultSASLAuthenticator, and defaultAuthenticator.

virtual void setService ( shared_ptr< net::service serv)
pure 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

Implemented in defaultSASLAuthenticator, and defaultAuthenticator.


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