- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | List of all members
GAuth::PamImp Class Reference

A private implementation of the G::Pam interface used by GAuth::SaslServerPamImp, which is itself a private implementation class used by GAuth::SaslServerPam. More...

Inheritance diagram for GAuth::PamImp:

## Public Types
typedef GAuth::PamImp::ItemArray | ItemArray
Public Types inherited from G::Pam
typedef std::vector< Item > | ItemArray

## Public Member Functions
| PamImp (const std::string &app, const std::string &id)
virtual | ~PamImp ()
void | fail ()
void | apply (const std::string &)
std::string | id () const
Public Member Functions inherited from G::Pam
| Pam (const std::string &app, const std::string &user, bool silent)
| Constructor. More...
virtual | ~Pam ()
| Destructor. More...
bool | authenticate (bool require_token)
| Authenticates the user. More...
std::string | name () const
| Returns the authenticated user name. More...
void | checkAccount (bool require_token)
| Does "account management", checking that the authenticated user is currently allowed to use the system. More...
void | establishCredentials ()
| Embues the authenticated user with their credentials, such as "tickets" in the form of environment variables etc. More...
void | openSession ()
| Starts a session. More...
void | closeSession ()
| Closes a session. More...
void | deleteCredentials ()
| Deletes credentials. More...
void | reinitialiseCredentials ()
| Reinitialises credentials. More...
void | refreshCredentials ()
| Refreshes credentials. More...

## Protected Member Functions
virtual void | converse (ItemArray &)
| Called to pass a message to the user, or request a password etc. More...
virtual void | delay (unsigned int usec)
| Called when the pam library wants the application to introduce a delay to prevent brute-force attacks. More...

## Detailed Description

A private implementation of the G::Pam interface used by GAuth::SaslServerPamImp, which is itself a private implementation class used by GAuth::SaslServerPam.

Definition at line 40 of file gsaslserverpam.cpp.

## Member Typedef Documentation

typedef GAuth::PamImp::ItemArray GAuth::PamImp::ItemArray

Definition at line 43 of file gsaslserverpam.cpp.

## Constructor & Destructor Documentation

GAuth::PamImp::PamImp | ( | const std::string & | app,
|  | const std::string & | id
| ) |  |

Definition at line 93 of file gsaslserverpam.cpp.

References G_DEBUG.

GAuth::PamImp::~PamImp | ( |  | ) |
| virtual

Definition at line 101 of file gsaslserverpam.cpp.

## Member Function Documentation

void GAuth::PamImp::apply | ( | const std::string & | pwd | ) |

Definition at line 128 of file gsaslserverpam.cpp.

void GAuth::PamImp::converse | ( | ItemArray & |  | ) |
| protected virtual

Called to pass a message to the user, or request a password etc.

Typically the array is a single password prompt. The password should then be put into the 'out' string and the boolean flag set.

For each item in the array which is a prompt the implementation is required to supply a response value.

In an event-driven environment the response values can be left unassigned, in which case the outer authenticate() call will return false. The authenticate() can then be called a second time once the requested information is available.

Implements G::Pam.

Definition at line 110 of file gsaslserverpam.cpp.

void GAuth::PamImp::delay | ( | unsigned int | usec | ) |
| protected virtual

Called when the pam library wants the application to introduce a delay to prevent brute-force attacks.

The parameter may be zero.

Typically called from within authenticate(), ie. before authenticate returns.

A default implementation is provided (sic) that does a sleep.

In an event-driven application the implementation of this method should start a timer and avoid initiating any new authentication while the timer is running.

Implements G::Pam.

Definition at line 134 of file gsaslserverpam.cpp.

void GAuth::PamImp::fail | ( |  | ) |

std::string GAuth::PamImp::id | ( |  | ) | const

Definition at line 105 of file gsaslserverpam.cpp.

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

- gsaslserverpam.cpp