AMPS C# Client  5.3.5.0
AMPS C# Client for .NET
AMPS.Client.Authenticator Interface Reference

Interface used to authenticate an AMPS client user. If authentication was unsuccessful, then an AuthenticationException is thrown. The public repository contains implementations of the authenticator interface. You can use them as examples for your own implementations. More...

+ Inheritance diagram for AMPS.Client.Authenticator:

Public Member Functions

String authenticate (String username_, String currentPassword_)
 Called by AMPS.Client, just before the logon command is sent. More...
 
String retry (String username_, String password_)
 Called when a logon "ack" is received with a status of "retry". More...
 
void completed (String username_, String password_, Message.Reasons reason_)
 Called when a logon completes successfully. More...
 

Detailed Description

Interface used to authenticate an AMPS client user. If authentication was unsuccessful, then an AuthenticationException is thrown. The public repository contains implementations of the authenticator interface. You can use them as examples for your own implementations.

Member Function Documentation

◆ authenticate()

String AMPS.Client.Authenticator.authenticate ( String  username_,
String  currentPassword_ 
)

Called by AMPS.Client, just before the logon command is sent.

Parameters
username_The current value of the username as specified in the URI.
currentPassword_The current value of the password, as specified in the URI.
Returns
The value that should be placed into the Password header field of the logon command.
Exceptions
AMPS.Client.Exceptions.AuthenticationExceptionIf authentication was unsuccessful or an error occurred.

Implemented in AMPS.Client.DefaultAuthenticator.

◆ completed()

void AMPS.Client.Authenticator.completed ( String  username_,
String  password_,
Message.Reasons  reason_ 
)

Called when a logon completes successfully.

Once a logon has completed, this method is called with the username and password that caused a successful logon.

Parameters
username_The username that successfully logged on to the server.
password_The password that successfully logged on to the server.
reason_The reason reported for success by the server.
Exceptions
AMPS.Client.Exceptions.AuthenticationExceptionIf authentication was unsuccessful or an error occurred.

Implemented in AMPS.Client.DefaultAuthenticator.

◆ retry()

String AMPS.Client.Authenticator.retry ( String  username_,
String  password_ 
)

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

AMPS will continue trying to logon as long as the server returns "retry", and this method continues to succeed.

Parameters
username_The username returned by 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 for the next logon attempt.
Exceptions
AMPS.Client.Exceptions.AuthenticationExceptionIf authentication was unsuccessful or an error occurred.

Implemented in AMPS.Client.DefaultAuthenticator.


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