Wolframe, 0.0.3

_Wolframe::AAAA::PasswordChanger Class Referenceabstract

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

#include <passwordChanger.hpp>

Public Types

enum  Status {
  MESSAGE_AVAILABLE, AWAITING_MESSAGE, PASSWORD_EXCHANGED, INVALID_MESSAGE,
  SYSTEM_FAILURE
}
 

Public Member Functions

virtual ~PasswordChanger ()
 The virtual destructor. More...
 
virtual void dispose ()=0
 
virtual void messageIn (const std::string &message)=0
 
virtual std::string messageOut ()=0
 
virtual Status status () const =0
 The current status of the password changer. More...
 
virtual std::string password ()=0
 

Static Public Member Functions

static const char * statusName (Status i)
 

Detailed Description

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

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

Member Enumeration Documentation

Enumerator
MESSAGE_AVAILABLE 

an output message is available

AWAITING_MESSAGE 

waiting for an input message

PASSWORD_EXCHANGED 

the password has been successfuly changed

INVALID_MESSAGE 

the password change message is not valid, most likely the credentials are invalid

SYSTEM_FAILURE 

some other error occurred

Constructor & Destructor Documentation

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

The virtual destructor.

Member Function Documentation

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

Destroy the PasswordChanger

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 instances are created with new.
virtual void _Wolframe::AAAA::PasswordChanger::messageIn ( const std::string &  message)
pure virtual

The input message

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

The output message

Returns
the output message
virtual std::string _Wolframe::AAAA::PasswordChanger::password ( )
pure virtual

The new password

Returns
the new password if it exists or an empty string otherwise
Note
The new password is valid only if the changer is in the PASSWORD_EXCHANGED state. The function may even throw if called when the changed is in another state.
virtual Status _Wolframe::AAAA::PasswordChanger::status ( ) const
pure virtual

The current status of the password changer.

static const char* _Wolframe::AAAA::PasswordChanger::statusName ( Status  i)
inlinestatic

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