E-MailRelay

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
GPop::Auth Class Reference

An authenticator interface for POP3 sessions that is a very thin veneer over GSmtp::SaslServer. More...

`#include <gpopauth.h>`

## Public Member Functions
| Auth (const Secrets &)
| Constructor. More...
| ~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. More...
bool | mustChallenge () const
| Returns true if the init()ialised mechanism requires an initial challenge. More...
std::string | challenge ()
| Returns an initial challenge appropriate to the current mechanism. More...
bool | authenticated (const std::string &rsp1, const std::string &rsp2)
| Authenticates a one-step (APOP,PLAIN) or two-step (LOGIN) challenge-response sequence. More...
std::string | id () const
| Returns the authenticated user id. More...
std::string | mechanisms () const
| Returns a space-separated list of standard, supported SASL mechanisms (so not including APOP). More...
bool | sensitive () const
| Returns true if the implementation requires authentication to be restricted to encrypted transports. More...

## Detailed Description

An authenticator interface for POP3 sessions that is a very thin veneer over GSmtp::SaslServer.

See also
  RFC-2222

Definition at line 39 of file gpopauth.h.

## Constructor & Destructor Documentation

GPop::Auth::Auth | ( | const Secrets & | secrets | ) |
| explicit

Constructor.

Defaults to the APOP mechanism so that challenge() returns the APOP initial challege to go into the POP3 greeting.

Definition at line 126 of file gpopauth.cpp.

## Member Function Documentation

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

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

Both steps in a two-step mechanism are done in one call to this method. The second parameter use used only if the current mechanism is a two-step mechanism. The second-step challenge itself is not accessible, which only really makes sense for a LOGIN password prompt, since it is a fixed string.

Returns true if authenticated.

Definition at line 146 of file gpopauth.cpp.

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

Returns an initial challenge appropriate to the current mechanism.

Definition at line 156 of file gpopauth.cpp.

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

Returns the authenticated user id.

Precondition: authenticated()

Definition at line 161 of file gpopauth.cpp.

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

Initialises or reinitialises with the specified mechanism.

Returns false if not a supported mechanism. Updates the initial challenge() string as appropriate.

Definition at line 141 of file gpopauth.cpp.

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

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

Definition at line 166 of file gpopauth.cpp.

bool GPop::Auth::mustChallenge | ( |  | ) | const

Returns true if the init()ialised mechanism requires an initial challenge.

Returns false if (in effect) the mechanism and the authetication can be supplied together.

Definition at line 151 of file gpopauth.cpp.

bool GPop::Auth::sensitive | ( |  | ) | const

Returns true if the implementation requires authentication to be restricted to encrypted transports.

Definition at line 171 of file gpopauth.cpp.

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

- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/gpop/gpopauth.h
- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/gpop/gpopauth.cpp