public class DefaultAuthenticator extends java.lang.Object implements Authenticator
Authenticator interface that is
used for basic username/password authentication.| Constructor and Description |
|---|
DefaultAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
authenticate(java.lang.String username_,
java.lang.String currentPassword_)
Called by AMPS.Client, just before the logon command is sent.
|
void |
completed(java.lang.String username_,
java.lang.String password_,
int reason_)
Called when a logon completes successfully.
|
java.lang.String |
retry(java.lang.String username_,
java.lang.String password_)
Called when a logon "ack" is received with a status of "retry".
|
public java.lang.String authenticate(java.lang.String username_,
java.lang.String currentPassword_)
throws AuthenticationException
authenticate in interface Authenticatorusername_ - The current value of the username as specified in the URI.currentPassword_ - The current value of the password, as specified in the URI.AuthenticationException - An error occurred while authenticating.public java.lang.String retry(java.lang.String username_,
java.lang.String password_)
throws AuthenticationException
retry in interface Authenticatorusername_ - The username returned by the server's ACK message.password_ - The password or token returned in the server's ACK message.AuthenticationException - An error occurred while authenticating.public void completed(java.lang.String username_,
java.lang.String password_,
int reason_)
throws AuthenticationException
completed in interface Authenticatorusername_ - The username that successfully logged on to the server.password_ - The password that successfully logged on to the server.reason_ - The reason for this successful completion (from Message.Reasons)AuthenticationException - The client-side authentication module detected an error.