Wolframe, 0.0.3

_Wolframe::AAAA::Authenticator Class Referenceabstract

Authenticator interface This the only interface to be used by the system. All other interfaces are internal to the authentication objects. More...

#include <authenticator.hpp>

Public Types

enum  Status {
  INITIALIZED, MESSAGE_AVAILABLE, AWAITING_MESSAGE, AUTHENTICATED,
  INVALID_CREDENTIALS, MECH_UNAVAILABLE, SYSTEM_FAILURE
}
 

Public Member Functions

virtual ~Authenticator ()
 The virtual destructor. More...
 
virtual void dispose ()=0
 
virtual const std::vector
< std::string > & 
mechs () const =0
 The list of available mechs. More...
 
virtual bool setMech (const std::string &mech)=0
 
virtual void messageIn (const std::string &message)=0
 
virtual std::string messageOut ()=0
 
virtual Status status () const =0
 The current status of the authenticator. More...
 
virtual Useruser ()=0
 

Static Public Member Functions

static const char * statusName (Status i)
 

Detailed Description

Authenticator interface This the only interface to be used by the system. All other interfaces are internal to the authentication objects.

Note
The authenticator works only with complete messages. Sending a message in multiple parts will most likely result in an error. But that depends also on the authentication backend.

Member Enumeration Documentation

Enumerator
INITIALIZED 

the authenticator is initialized, no mech has been selected yet

MESSAGE_AVAILABLE 

an output message is available

AWAITING_MESSAGE 

waiting for an input message

AUTHENTICATED 

a user has been authenticated

INVALID_CREDENTIALS 

the user authentication failed, either the username or the credentials are invalid

MECH_UNAVAILABLE 

the requested mech is not available, usually due to configured restrictions

SYSTEM_FAILURE 

some other error occurred

Constructor & Destructor Documentation

virtual _Wolframe::AAAA::Authenticator::~Authenticator ( )
inlinevirtual

The virtual destructor.

Member Function Documentation

virtual void _Wolframe::AAAA::Authenticator::dispose ( )
pure virtual

Destroy the authenticator

Note
In many cases this is a suicidal function (delete this), so you should be very careful how you use it. You should use this function instead of delete because not all authentication instances are created with new.
virtual const std::vector<std::string>& _Wolframe::AAAA::Authenticator::mechs ( ) const
pure virtual

The list of available mechs.

virtual void _Wolframe::AAAA::Authenticator::messageIn ( const std::string &  message)
pure virtual

The input message

Parameters
[in]messagethe input message
virtual std::string _Wolframe::AAAA::Authenticator::messageOut ( )
pure virtual

The output message

Returns
the output message
virtual bool _Wolframe::AAAA::Authenticator::setMech ( const std::string &  mech)
pure virtual

Set the authentication mech

Parameters
[in]mechthe name of the mech (case-insensitive)
Returns
true if the mech could be selected false if the mech is not available
Note
This function works like a reset function Whenever it is called it will release all the allocated resources and it will reinitialize all the data structures
virtual Status _Wolframe::AAAA::Authenticator::status ( ) const
pure virtual

The current status of the authenticator.

static const char* _Wolframe::AAAA::Authenticator::statusName ( Status  i)
inlinestatic
virtual User* _Wolframe::AAAA::Authenticator::user ( )
pure virtual

The authenticated user or NULL if not authenticated

Note
It is intended that this function can be called only once. As a security precaution, all the instance information regarding the current authentication operation should be destroyed after the authentication is complete and the user is no longer available after the call of this function

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