public class NewPasswordContinuation extends ChallengeContinuation
challengeResponses, RUN_IN_BACKGROUND, RUN_IN_CURRENT
Constructor and Description |
---|
NewPasswordContinuation(CognitoUser user,
android.content.Context context,
String username,
String clientId,
String secretHash,
RespondToAuthChallengeResult challengeResult,
boolean runInBackground,
AuthenticationHandler callback)
Constructs a new continuation for new user sign-in.
|
Modifier and Type | Method and Description |
---|---|
void |
continueTask()
Calls of the parent after checking if all the required attributes have been set.
|
Map<String,String> |
getCurrentUserAttributes()
Returns all current user attributes.
|
List<String> |
getRequiredAttributes()
Returns all required attributes to complete user sign-up.
|
void |
setPassword(String userPassword)
Set new user password, must not be
null . |
void |
setUserAttribute(String attributeName,
String attributeValue)
Add a user attribute, will override current value.
|
getChallengeName, getParameters, setChallengeResponse, setResponseSessionCode
public NewPasswordContinuation(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.runInBackground
- REQUIRED: Represents where this continuation has to run.callback
- REQUIRED: Callback to interact with the app.context
- REQUIRED: The android context.username
- REQUIRED: the username.clientId
- REQUIRED: the clientId.secretHash
- REQUIRED: the secreth hash.challengeResult
- REQUIRED: The response to respond to the authentication challenge.public List<String> getRequiredAttributes()
List<String>
of all required user attributes.public Map<String,String> getCurrentUserAttributes()
Map<String, String>
containing all current values of user attributes.public void setUserAttribute(String attributeName, String attributeValue)
attributeName
- REQUIRED: The attribute name.attributeValue
- REQUIRED: The attribute value.public void setPassword(String userPassword)
null
. This is required to complete the user sign-up.userPassword
- REQUIRED: New user password.public void continueTask()
continueTask
in interface CognitoIdentityProviderContinuation<Map<String,String>>
continueTask
in class ChallengeContinuation
Copyright © 2019. All rights reserved.