defaultSASLAuthenticator Class Reference

An authenticator that is capable of providing information for simple authentication mechanisms (username and password). More...

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

List of all members.

Public Member Functions

 defaultSASLAuthenticator ()
 ~defaultSASLAuthenticator ()
const std::vector< ref
< SASLMechanism > > 
getAcceptableMechanisms (const std::vector< ref< SASLMechanism > > &available, ref< SASLMechanism > suggested) const
const string getUsername () const
const string getPassword () const
const string getHostname () const
const string getAnonymousToken () const
const string getServiceName () const
void setService (ref< net::service > serv)
weak_ref< net::servicegetService () const
void setSASLSession (ref< SASLSession > sess)
ref< SASLSessiongetSASLSession () const
void setSASLMechanism (ref< SASLMechanism > mech)
ref< SASLMechanismgetSASLMechanism () const

Detailed Description

An authenticator that is capable of providing information for simple authentication mechanisms (username and password).


Constructor & Destructor Documentation


Member Function Documentation

const std::vector< ref< SASLMechanism > > getAcceptableMechanisms ( const std::vector< ref< SASLMechanism > > &  available,
ref< 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:
available available mechanisms
suggested suggested 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)

Implements SASLAuthenticator.

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

Implements authenticator.

References defaultAuthenticator::getAnonymousToken().

const string getHostname (  )  const [virtual]

Return the local host name of the machine.

Returns:
hostname
Exceptions:
exceptions::no_auth_information if the information could not be provided

Implements authenticator.

References defaultAuthenticator::getHostname().

const string getPassword (  )  const [virtual]

Return the password of the authentication identity.

Returns:
password
Exceptions:
exceptions::no_auth_information if the information could not be provided

Implements authenticator.

References defaultAuthenticator::getPassword().

ref< SASLMechanism > getSASLMechanism (  )  const
ref< SASLSession > getSASLSession (  )  const
weak_ref< net::service > getService (  )  const
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_information if the information could not be provided

Implements authenticator.

const string getUsername (  )  const [virtual]

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

Returns:
username
Exceptions:
exceptions::no_auth_information if the information could not be provided

Implements authenticator.

References defaultAuthenticator::getUsername().

void setSASLMechanism ( ref< SASLMechanism mech  )  [virtual]

Set the SASL mechanism which has been selected for the SASL authentication process.

This may be called several times if the multiple mechanisms are tried by the service which use this authentication.

Parameters:
mech SASL mechanism

Implements SASLAuthenticator.

void setSASLSession ( ref< SASLSession sess  )  [virtual]

Set the SASL session which is using this authenticator.

Parameters:
sess SASL session

Implements SASLAuthenticator.

void setService ( ref< 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:
serv messaging service instance

Implements authenticator.

References defaultAuthenticator::setService().


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

Generated by  doxygen 1.6.2