public interface AuthenticationHandler
Modifier and Type | Method and Description |
---|---|
void |
authenticationChallenge(ChallengeContinuation continuation)
Call out to the dev to respond to a challenge.
|
void |
getAuthenticationDetails(AuthenticationContinuation authenticationContinuation,
java.lang.String userId)
Call out to the dev to get the credentials for a user.
|
void |
getMFACode(MultiFactorAuthenticationContinuation continuation)
Call out to the dev to send MFA code.
|
void |
onFailure(java.lang.Exception exception)
This method is called when a fatal exception was encountered during
authentication.
|
void |
onSuccess(CognitoUserSession userSession,
CognitoDevice newDevice)
This method is called to deliver valid tokens, when valid tokens were locally
available (cached) or after successful completion of the authentication process.
|
void onSuccess(CognitoUserSession userSession, CognitoDevice newDevice)
newDevice
will is an instance of CognitoDevice
for this device, and this
parameter will be not null during these cases:
1- If the user pool allows devices to be remembered and this is is a new device, that is
first time authentication on this device.
2- When the cached device key is lost and, hence, the service identifies this as a new device.userSession
- Contains valid user tokens.newDevice
- CognitoDevice
, will be null if this is not a new device.void getAuthenticationDetails(AuthenticationContinuation authenticationContinuation, java.lang.String userId)
authenticationContinuation
- is a AuthenticationContinuation
object that should
be used to continue with the authentication process when
the users' authentication details are available.userId
- Is the user-ID (username or alias) used in authentication.
This will be null if the user ID is not available.void getMFACode(MultiFactorAuthenticationContinuation continuation)
continuation
- medium through which the MFA will be deliveredvoid authenticationChallenge(ChallengeContinuation continuation)
continuation
- contains details about the challenge and allows dev to respond to the
challenge.void onFailure(java.lang.Exception exception)
exception
for details.exception
- is this Exception leading to authentication failure.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.