Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

Dv::Ticket::Authenticator Class Reference

A class that can check a user's identity, based on a login name and password. More...

#include <authenticator.h>

List of all members.

Public Member Functions

virtual ~Authenticator ()
 Destructor.
virtual std::string const name ()
virtual Dv::Ticket::User validate (const std::string &host, const std::string &name, const std::string &passwd, const std::string &info="") throw (std::runtime_error)
 Actual authentication of a user.
virtual Dv::Ticket::User anon_validate (const std::string &host, const std::string &name, const std::string &info="") throw (std::runtime_error)
 Return an anonymous user.


Detailed Description

A class that can check a user's identity, based on a login name and password.

This is an abstract class. An application should implement a derived class. The default implementation always succeeds.

See also:
Dv::Ticket::Request

Definition at line 17 of file authenticator.h.


Constructor & Destructor Documentation

virtual Dv::Ticket::Authenticator::~Authenticator  )  [inline, virtual]
 

Destructor.

Definition at line 20 of file authenticator.h.


Member Function Documentation

virtual std::string const Dv::Ticket::Authenticator::name  )  [inline, virtual]
 

Returns:
name of this Authenticator. Derived classes should have different names, which will show up in the server logs.
See also:
Dv::Ticket::Server

Definition at line 27 of file authenticator.h.

virtual Dv::Ticket::User Dv::Ticket::Authenticator::validate const std::string &  host,
const std::string &  name,
const std::string &  passwd,
const std::string &  info = ""
throw (std::runtime_error) [inline, virtual]
 

Actual authentication of a user.

Parameters:
host from which user requests authentication
name login name of the user.
passwd password of the user.
info extra info on user.
Exceptions:
runtime_error if there is no user corresponding to the name and passwd.

Definition at line 37 of file authenticator.h.

virtual Dv::Ticket::User Dv::Ticket::Authenticator::anon_validate const std::string &  host,
const std::string &  name,
const std::string &  info = ""
throw (std::runtime_error) [inline, virtual]
 

Return an anonymous user.

Derived classes may decide, based on the various parameters whether they will allow an anonymous ticket to be issued.

Parameters:
host from which user requests authentication (dot address)
name login name of the user.
info extra info on user.
Exceptions:
runtime_error if the operation failed.

Definition at line 49 of file authenticator.h.


The documentation for this class was generated from the following file:
dvticket-0.7.6 [22 January, 2006]