65 const std::string
in ;
75 public:
Error(
const std::string & op ,
int pam_error ) ;
76 public:
Error(
const std::string & op ,
int pam_error ,
const char * ) ;
79 Pam(
const std::string & app ,
const std::string & user ,
bool silent ) ;
93 std::string
name()
const ;
121 virtual void converse( ItemArray & ) = 0 ;
139 virtual void delay(
unsigned int usec ) = 0 ;
157 void operator=(
const Pam & ) ;
virtual void converse(ItemArray &)=0
Called to pass a message to the user, or request a password etc.
Error(const std::string &op, int pam_error)
void closeSession()
Closes a session.
const std::string in_type
std::string name() const
Returns the authenticated user name.
void refreshCredentials()
Refreshes credentials.
void checkAccount(bool require_token)
Does "account management", checking that the authenticated user is currently allowed to use the syste...
void reinitialiseCredentials()
Reinitialises credentials.
std::vector< Item > ItemArray
void openSession()
Starts a session.
An exception class used by G::Pam.
void establishCredentials()
Embues the authenticated user with their credentials, such as "tickets" in the form of environment va...
A structure used by G::Pam to hold conversation items.
bool authenticate(bool require_token)
Authenticates the user.
Pam(const std::string &app, const std::string &user, bool silent)
Constructor.
virtual void delay(unsigned int usec)=0
Called when the pam library wants the application to introduce a delay to prevent brute-force attacks...
A pimple-pattern implementation class for Pam.
A general-purpose exception class derived from std::exception and containing a std::string.
virtual ~Pam()
Destructor.
void deleteCredentials()
Deletes credentials.
A thin abstract interface to the system PAM library.