authenticator Class Reference

Provides required information for user authentication. More...

Inheritance diagram for authenticator:
Inheritance graph
[legend]
Collaboration diagram for authenticator:
Collaboration graph
[legend]

List of all members.

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

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_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.

Returns:
hostname
Exceptions:
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.

Returns:
password
Exceptions:
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.

Returns:
service name
Exceptions:
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).

Returns:
username
Exceptions:
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.

Parameters:
serv messaging service instance

Implemented in defaultAuthenticator, and defaultSASLAuthenticator.


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

Generated by  doxygen 1.6.2