- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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

An authenticator interface for POP3 sessions. More...

`#include <gpopauth.h>`

## Public Member Functions
| Auth (const Secrets &)
| Constructor. More...
| ~Auth ()
| Destructor. More...
bool | valid () const
| Returns true if the secrets are valid. More...
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.

The implementation may use GSmtp::SaslServer.

See also
  GSmtp::SaslServer, RFC2222

Definition at line 43 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 112 of file gpopauth.cpp.

GPop::Auth::~Auth | ( |  | ) |

Destructor.

Definition at line 117 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 132 of file gpopauth.cpp.

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

Returns an initial challenge appropriate to the current mechanism.

Definition at line 142 of file gpopauth.cpp.

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

Returns the authenticated user id.

Precondition: authenticated()

Definition at line 147 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 127 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 152 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 137 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 157 of file gpopauth.cpp.

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

Returns true if the secrets are valid.

Definition at line 122 of file gpopauth.cpp.

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

- gpopauth.h
- gpopauth.cpp