Provides required information for user authentication. More...


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 (ref< net::service > serv)=0 |
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.
| virtual const string getAnonymousToken | ( | ) | const [pure virtual] |
Return the anonymous token (usually, this is the user's email address).
| exceptions::no_auth_information | if the information could not be provided |
Implemented in defaultAuthenticator, and defaultSASLAuthenticator.
| virtual const string getHostname | ( | ) | const [pure virtual] |
Return the local host name of the machine.
| exceptions::no_auth_information | if the information could not be provided |
Implemented in defaultAuthenticator, and defaultSASLAuthenticator.
| virtual const string getPassword | ( | ) | const [pure virtual] |
Return the password of the authentication identity.
| exceptions::no_auth_information | if the information could not be provided |
Implemented in defaultAuthenticator, and defaultSASLAuthenticator.
| 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.
| exceptions::no_auth_information | if the information could not be provided |
Implemented in defaultAuthenticator, and defaultSASLAuthenticator.
| virtual const string getUsername | ( | ) | const [pure virtual] |
Return the authentication identity (usually, this is the username).
| exceptions::no_auth_information | if the information could not be provided |
Implemented in defaultAuthenticator, and defaultSASLAuthenticator.
| virtual void setService | ( | ref< 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.
| serv | messaging service instance |
Implemented in defaultAuthenticator, and defaultSASLAuthenticator.
1.6.2