public class ChooseMfaContinuation extends ChallengeContinuation
These challenges are presented when the user has multiple MFA's setup (registered) and enabled, and none of them are set as preferred.
challengeResponses, clientMetaData, RUN_IN_BACKGROUND, RUN_IN_CURRENT
Constructor and Description |
---|
ChooseMfaContinuation(CognitoUser user,
android.content.Context context,
String username,
String clientId,
String secretHash,
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 with the set MFA option.
|
List<String> |
getMfaOptions()
Returns MFA options for a user to continue to authenticate.
|
void |
setMfaOption(String option)
Set the response to the MFA select request.
|
getChallengeName, getClientMetaData, getParameters, setChallengeResponse, setClientMetaData, setResponseSessionCode
public ChooseMfaContinuation(CognitoUser user, android.content.Context context, String username, String clientId, String secretHash, 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 List<String> getMfaOptions()
public void setMfaOption(String option)
option
- MFA option picked by the user.public void continueTask()
continueTask
in interface CognitoIdentityProviderContinuation<Map<String,String>>
continueTask
in class ChallengeContinuation
Copyright © 2020. All rights reserved.