public class ChallengeContinuation extends java.lang.Object implements CognitoIdentityProviderContinuation<java.util.Map<java.lang.String,java.lang.String>>
Modifier and Type | Field and Description |
---|---|
static boolean |
RUN_IN_BACKGROUND
Run in background.
|
static boolean |
RUN_IN_CURRENT
Run on current thread.
|
Constructor and Description |
---|
ChallengeContinuation(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 continuation for a challenge to be presented to the user.
|
Modifier and Type | Method and Description |
---|---|
void |
continueTask()
Continues the authentication process by responding to the generic challenge posed by the system.
|
java.lang.String |
getChallengeName()
Returns the name of the challenge.
|
java.util.Map<java.lang.String,java.lang.String> |
getClientMetaData()
clientMetadata is a map of custom key-value pairs that you can provide as input for any
custom work flows. |
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Returns the challenges parameters for a generic challenge (developer defined) challenge.
|
void |
setChallengeResponse(java.lang.String responseKey,
java.lang.String responseValue)
Add responses to the authentication challenge.
|
void |
setClientMetaData(java.util.Map<java.lang.String,java.lang.String> clientMetaData)
Mutator for
clientMetadata . |
void |
setResponseSessionCode(java.lang.String session)
Over-write the current challenge session code.
|
public static final boolean RUN_IN_BACKGROUND
public static final boolean RUN_IN_CURRENT
public ChallengeContinuation(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 user being authenticated.context
- REQUIRED: Android application context.username
- REQUIRED: Username used for this auth attempt.clientId
- REQUIRED: Cognito App IdsecretHash
- REQUIRED: Hash of the App SecretchallengeResult
- REQUIRED: Response from Cognito containing
information about the new challenge.runInBackground
- REQUIRED: Indicates if continuation must execute in a background thread.callback
- REQUIRED: Reference to the callback handler.public java.util.Map<java.lang.String,java.lang.String> getClientMetaData()
clientMetadata
is a map of custom key-value pairs that you can provide as input for any
custom work flows. Accessor method for clientMetadata
.
public void setClientMetaData(java.util.Map<java.lang.String,java.lang.String> clientMetaData)
clientMetadata
.clientMetaData
- MetaData to be passed as input to the lambda triggers.public java.util.Map<java.lang.String,java.lang.String> getParameters()
getParameters
in interface CognitoIdentityProviderContinuation<java.util.Map<java.lang.String,java.lang.String>>
Map
containing parameters for this auth challenge process.public java.lang.String getChallengeName()
String
.public void setChallengeResponse(java.lang.String responseKey, java.lang.String responseValue)
responseKey
- REQUIRED: The key (identifier) for a parameter in the challenge response.responseValue
- REQUIRED: The value of the key (identifier),public void continueTask()
Runnable
which is is always executed in the applications thread.
The mechanism to identify the current thread and to run the returned Runnable
in the apps
thread is implemented in this method.continueTask
in interface CognitoIdentityProviderContinuation<java.util.Map<java.lang.String,java.lang.String>>
public void setResponseSessionCode(java.lang.String session)
session
- REQUIRED: The new session code.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.