public class RegisterMfaContinuation extends ChallengeContinuation
When one or more MFA's have been set as required at the User-Pool level and if none of these MFA are setup (registered) by a user, then during the authentication process a challenge to setup the required MFA's is presented. The user must setup at least one of the required MFA's to successfully authenticate. This continuation allows users to authenticate after the required MFA has been setup.
RUN_IN_BACKGROUND, RUN_IN_CURRENT| Constructor and Description |
|---|
RegisterMfaContinuation(CognitoUser user,
android.content.Context context,
java.lang.String username,
java.lang.String clientId,
java.lang.String secretHash,
com.amazonaws.services.cognitoidentityprovider.model.RespondToAuthChallengeResult challengeResult,
boolean runInBackground,
AuthenticationHandler callback)
Constructs a new continuation for multiple user MFA's.
|
| Modifier and Type | Method and Description |
|---|---|
void |
continueTask()
Continue the authentication process.
|
java.util.List<java.lang.String> |
getMfaOptions()
Returns MFA options for a user to register continue to authenticate.
|
void |
setSessionToken(java.lang.String sessionToken)
Adds the session token, returned on successful MFA registration, to allow user authentication
to continue.
|
getChallengeName, getClientMetaData, getParameters, setChallengeResponse, setClientMetaData, setResponseSessionCodepublic RegisterMfaContinuation(CognitoUser user, android.content.Context context, java.lang.String username, java.lang.String clientId, java.lang.String secretHash, com.amazonaws.services.cognitoidentityprovider.model.RespondToAuthChallengeResult challengeResult, boolean runInBackground, AuthenticationHandler callback)
user - REQUIRED: Reference to the CognitoUser object.context - REQUIRED: The android context.username - REQUIRED: The username.clientId - REQUIRED: The clientId.secretHash - REQUIRED: The secret hash.challengeResult - REQUIRED: The response from the previous auth step.runInBackground - REQUIRED: Represents where this continuation has to run.callback - REQUIRED: Callback to interact with the app.public java.util.List<java.lang.String> getMfaOptions()
public void setSessionToken(java.lang.String sessionToken)
sessionToken - the session token.public void continueTask()
continueTask in interface CognitoIdentityProviderContinuation<java.util.Map<java.lang.String,java.lang.String>>continueTask in class ChallengeContinuationCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.