AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.3.1
AMPS::Authenticator Class Referenceabstract

The interface for handling authentication with the AMPS server. More...

#include <ampsplusplus.hpp>

+ Inheritance diagram for AMPS::Authenticator:

Public Member Functions

virtual std::string authenticate (const std::string &userName_, const std::string &password_)=0
 Called by Client just before the logon command is sent. More...
 
virtual std::string retry (const std::string &userName_, const std::string &password_)=0
 Called by Client when a logon ack is received with a status of retry. More...
 
virtual void completed (const std::string &userName_, const std::string &password_, const std::string &reason_)=0
 Called by Client once a logon completes successfully. More...
 

Detailed Description

The interface for handling authentication with the AMPS server.

Member Function Documentation

virtual std::string AMPS::Authenticator::authenticate ( const std::string &  userName_,
const std::string &  password_ 
)
pure virtual

Called by Client just before the logon command is sent.

Parameters
userName_The current value of the user name from the URI.
password_The current value of the password from the URI.
Returns
The value that should be placed into the Password header field of the logon command.

Implemented in AMPS::DefaultAuthenticator.

virtual void AMPS::Authenticator::completed ( const std::string &  userName_,
const std::string &  password_,
const std::string &  reason_ 
)
pure virtual

Called by Client once a logon completes successfully.

Parameters
userName_The user name that successfully logged on to the server.
password_The password that successfully logged on to the server.
reason_The reason for successful completion, taken from the message returned by the server.

Implemented in AMPS::DefaultAuthenticator.

virtual std::string AMPS::Authenticator::retry ( const std::string &  userName_,
const std::string &  password_ 
)
pure virtual

Called by Client when a logon ack is received with a status of retry.

Client will continue trying to logon as long as the server returns retry and this method succeeds.

Parameters
userName_The user name returned in the server's ACK message.
password_The password or token returned in the server's ACK message.
Returns
The value that should be placed into the Password header field of the next logon command.

Implemented in AMPS::DefaultAuthenticator.


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