AMPS C/C++ Client Class Reference AMPS C/C++ Client Version 5.3.5.7

Public Member Functions | List of all members
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

## ◆ authenticate()

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.

## ◆ completed()

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.

## ◆ retry()

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:

- include/amps/ampsplusplus.hpp