GSmtp::SaslClient Class Reference

A class for implementing the client-side SASL challenge/response concept. More...

#include <gsasl.h>

List of all members.

Public Member Functions

 SaslClient (const Secrets &secrets, const std::string &server_name)
 Constructor. The secrets reference is kept.
 ~SaslClient ()
 Destructor.
bool active () const
 Returns true if the constructor's secrets object is valid.
std::string response (const std::string &mechanism, const std::string &challenge, bool &done, bool &error, bool &sensitive) const
 Returns a response to the given challenge.
std::string preferred (const G::Strings &mechanisms) const
 Returns the name of the preferred mechanism taken from the given set.

Classes

class  Secrets
 An interface used by GSmtp::SaslClient to obtain authentication secrets. More...


Detailed Description

A class for implementing the client-side SASL challenge/response concept.

SASL is described in RFC4422, and the SMTP extension for authentication is described in RFC2554.

See also:
GSmtp::SaslServer, RFC4422, RFC2554.

Definition at line 173 of file gsasl.h.


Constructor & Destructor Documentation

GSmtp::SaslClient::SaslClient ( const Secrets secrets,
const std::string &  server_name 
)

Constructor. The secrets reference is kept.

Definition at line 359 of file gsasl_native.cpp.

References active(), and G_DEBUG.

GSmtp::SaslClient::~SaslClient (  ) 

Destructor.

Definition at line 366 of file gsasl_native.cpp.


Member Function Documentation

bool GSmtp::SaslClient::active (  )  const

Returns true if the constructor's secrets object is valid.

Definition at line 371 of file gsasl_native.cpp.

References GSmtp::SaslClientImp::m_secrets, and GSmtp::Valid::valid().

Referenced by preferred(), and SaslClient().

std::string GSmtp::SaslClient::response ( const std::string &  mechanism,
const std::string &  challenge,
bool &  done,
bool &  error,
bool &  sensitive 
) const

Returns a response to the given challenge.

Returns various boolean flags by reference.

Definition at line 376 of file gsasl_native.cpp.

References GSmtp::SaslServerImp::clientResponse(), G_WARNING, GSmtp::SaslClient::Secrets::id(), GSmtp::SaslClientImp::m_secrets, GSmtp::SaslClient::Secrets::secret(), and sep.

std::string GSmtp::SaslClient::preferred ( const G::Strings mechanisms  )  const

Returns the name of the preferred mechanism taken from the given set.

Returns the empty string if none is supported or if not active().

Definition at line 439 of file gsasl_native.cpp.

References active(), G_DEBUG, GSmtp::SaslClient::Secrets::id(), G::Str::join(), GSmtp::SaslClientImp::m_secrets, and G::Str::upper().


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

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