A class for implementing the client-side SASL challenge/response concept. More...
#include <gsaslclient.h>
Classes | |
class | Secrets |
An interface used by GAuth::SaslClient to obtain authentication secrets. More... | |
Public Member Functions | |
SaslClient (const Secrets &secrets, const std::string &server_name) | |
Constructor. The secrets reference is kept. More... | |
~SaslClient () | |
Destructor. More... | |
bool | active () const |
Returns true if the constructor's secrets object is valid. More... | |
std::string | initial_response (const std::string &mechanism, bool &done, bool &error, bool &sensitive) const |
Returns an initial_response for authentication. More... | |
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. More... | |
std::string | preferred (const G::Strings &mechanisms) const |
Returns the name of the preferred mechanism taken from the given set. More... | |
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.
Definition at line 48 of file gsaslclient.h.
GAuth::SaslClient::SaslClient | ( | const Secrets & | secrets, |
const std::string & | server_name | ||
) |
Constructor. The secrets reference is kept.
Definition at line 87 of file gsaslclient_native.cpp.
GAuth::SaslClient::~SaslClient | ( | ) |
Destructor.
Definition at line 94 of file gsaslclient_native.cpp.
bool GAuth::SaslClient::active | ( | ) | const |
Returns true if the constructor's secrets object is valid.
Definition at line 99 of file gsaslclient_native.cpp.
Referenced by SaslClient().
std::string GAuth::SaslClient::initial_response | ( | const std::string & | mechanism, |
bool & | done, | ||
bool & | error, | ||
bool & | sensitive | ||
) | const |
Returns an initial_response for authentication.
Returns various boolean flags by reference.
Definition at line 104 of file gsaslclient_native.cpp.
std::string GAuth::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 194 of file gsaslclient_native.cpp.
References G_DEBUG, G::Str::join(), and G::Str::upper().
std::string GAuth::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 131 of file gsaslclient_native.cpp.
References GAuth::SaslClientImp::clientResponse(), and G_WARNING.