E-MailRelay
|
A private implementation of the G::Pam interface used by GAuth::SaslServerPamImp, which is itself a private implementation class used by GAuth::SaslServerPam. More...
Public Types | |
using | ItemArray = GAuth::PamImp::ItemArray |
![]() | |
using | ItemArray = std::vector< Item > |
Public Member Functions | |
PamImp (const std::string &app, const std::string &id) | |
void | fail () |
void | apply (const std::string &) |
std::string | id () const |
PamImp (const PamImp &)=delete | |
PamImp (PamImp &&)=delete | |
void | operator= (const PamImp &)=delete |
void | operator= (PamImp &&)=delete |
![]() | |
Pam (const std::string &app, const std::string &user, bool silent) | |
Constructor. More... | |
virtual | ~Pam () |
Destructor. | |
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... | |
virtual void | converse (ItemArray &)=0 |
Called to pass a message to the user, or request a password etc. More... | |
virtual void | delay (unsigned int usec)=0 |
Called when the pam library wants the application to introduce a delay to prevent brute-force attacks. More... | |
Pam (const Pam &)=delete | |
Pam (Pam &&)=delete | |
void | operator= (const Pam &)=delete |
void | operator= (Pam &&)=delete |
Protected Member Functions | |
void | converse (ItemArray &) override |
Called to pass a message to the user, or request a password etc. More... | |
void | delay (unsigned int usec) override |
Called when the pam library wants the application to introduce a delay to prevent brute-force attacks. More... | |
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 65 of file gsaslserverpam.cpp.
using GAuth::PamImp::ItemArray = GAuth::PamImp::ItemArray |
Definition at line 68 of file gsaslserverpam.cpp.
GAuth::PamImp::PamImp | ( | const std::string & | app, |
const std::string & | id | ||
) |
Definition at line 93 of file gsaslserverpam.cpp.
void GAuth::PamImp::apply | ( | const std::string & | pwd | ) |
Definition at line 127 of file gsaslserverpam.cpp.
|
overrideprotectedvirtual |
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 109 of file gsaslserverpam.cpp.
|
overrideprotectedvirtual |
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 133 of file gsaslserverpam.cpp.
std::string GAuth::PamImp::id | ( | ) | const |
Definition at line 104 of file gsaslserverpam.cpp.