GPop::Auth Class Reference

An authenticator using GSmtp::SaslServer in its implementation. More...

#include <gpopauth.h>

List of all members.

Public Member Functions

 Auth (const Secrets &)
 Constructor. Defaults to the APOP mechanism.
 ~Auth ()
 Destructor.
bool valid () const
 Returns true if the secrets are valid.
bool init (const std::string &mechanism)
 Initialises or reinitialises with the specified mechanism.
std::string challenge ()
 Returns an initial challenge appropriate to the current mechanism.
bool authenticated (const std::string &rsp1, const std::string &rsp2)
 Authenticates a one-step (APOP) or two-step (LOGIN) challenge-response sequence.
std::string id () const
 Returns the authenticated user id.
std::string mechanisms () const
 Returns a space-separated list of standard, supported SASL mechanisms (so not including APOP).


Detailed Description

An authenticator using GSmtp::SaslServer in its implementation.

See also:
GSmtp::SaslServer, RFC2222

Definition at line 40 of file gpopauth.h.


Constructor & Destructor Documentation

GPop::Auth::Auth ( const Secrets secrets  )  [explicit]

Constructor. Defaults to the APOP mechanism.

Definition at line 98 of file gpopauth.cpp.

GPop::Auth::~Auth (  ) 

Destructor.

Definition at line 103 of file gpopauth.cpp.


Member Function Documentation

bool GPop::Auth::valid (  )  const

Returns true if the secrets are valid.

Definition at line 108 of file gpopauth.cpp.

References GPop::AuthImp::valid().

bool GPop::Auth::init ( const std::string &  mechanism  ) 

Initialises or reinitialises with the specified mechanism.

Returns false if not a supported mechanism.

Definition at line 113 of file gpopauth.cpp.

References GPop::AuthImp::init().

std::string GPop::Auth::challenge (  ) 

Returns an initial challenge appropriate to the current mechanism.

Definition at line 123 of file gpopauth.cpp.

References GPop::AuthImp::challenge().

bool GPop::Auth::authenticated ( const std::string &  rsp1,
const std::string &  rsp2 
)

Authenticates a one-step (APOP) or two-step (LOGIN) challenge-response sequence.

Returns true if authenticated.

The second parameter is used as the second response in a two-step challenge. The challenge itself is not accessible, which only really makes sense for a LOGIN password prompt.

Definition at line 118 of file gpopauth.cpp.

References GPop::AuthImp::authenticated().

std::string GPop::Auth::id (  )  const

Returns the authenticated user id.

Precondition: authenticated()

Definition at line 128 of file gpopauth.cpp.

References GPop::AuthImp::id().

std::string GPop::Auth::mechanisms (  )  const

Returns a space-separated list of standard, supported SASL mechanisms (so not including APOP).

Definition at line 133 of file gpopauth.cpp.

References GPop::AuthImp::mechanisms().


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

Generated on Fri Apr 18 15:56:13 2008 for E-MailRelay by  doxygen 1.5.5