- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Classes | Public Member Functions | List of all members
GAuth::SaslClient Class Reference

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

## 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
  GAuth::SaslServer, RFC4422, RFC2554.

Definition at line 48 of file gsaslclient.h.

## Constructor & Destructor Documentation

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.

References active(), and G_DEBUG.

GAuth::SaslClient::~SaslClient | ( |  | ) |

Destructor.

Definition at line 94 of file gsaslclient_native.cpp.

## Member Function Documentation

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.

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

- gsaslclient.h
- gsaslclient_native.cpp