public final class AWSMobileClient extends java.lang.Object implements AWSCredentialsProvider
AWSMobileClient.getInstance().initialize(getApplicationContext(), new Callback<UserStateDetails>() { public void onResult(UserStateDetails userStateDetails) { switch (userStateDetails.getUserState()) { case SIGNED_IN: break; case SIGNED_OUT: try { AWSMobileClient.getInstance().showSignIn(MainActivity.this); } catch (Exception e) { Log.e("TAG", "", e); } break; default: Log.w("Unhandled state see UserState for a list of states"); break; } } }) }
Modifier and Type | Class and Description |
---|---|
class |
AWSMobileClient.InitializeBuilder
Deprecated.
Since 2.8.0 This method will be removed in the next minor version.
Please update to use AWSMobileClient using `initialize`.
Please visit https://aws-amplify.github.io for the latest Android documentation.
|
class |
AWSMobileClient.SignInProviderConfig
Deprecated.
Since 2.8.0 This method will be removed in the next minor version.
Please update to use AWSMobileClient using `initialize`.
Please visit https://aws-amplify.github.io for the latest Android documentation.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHALLENGE_RESPONSE_NEW_PASSWORD_KEY |
static java.lang.String |
CHALLENGE_RESPONSE_USER_ATTRIBUTES_PREFIX_KEY |
static java.lang.String |
DEFAULT_USER_AGENT |
static java.lang.String |
HOSTED_UI_KEY |
Modifier and Type | Method and Description |
---|---|
void |
addUserStateListener(UserStateListener listener)
Adds a listener to be notified of state changes.
|
void |
changePassword(java.lang.String oldPassword,
java.lang.String newPassword) |
void |
changePassword(java.lang.String oldPassword,
java.lang.String newPassword,
Callback<java.lang.Void> callback) |
ForgotPasswordResult |
confirmForgotPassword(java.lang.String password,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
java.lang.String forgotPasswordChallengeResponse)
Second method to call after
forgotPassword(String) to respond to any challenges
that the service may request. |
ForgotPasswordResult |
confirmForgotPassword(java.lang.String password,
java.lang.String forgotPasswordChallengeResponse)
Second method to call after
forgotPassword(String) to respond to any challenges
that the service may request. |
void |
confirmForgotPassword(java.lang.String password,
java.lang.String forgotPasswordChallengeResponse,
Callback<ForgotPasswordResult> callback)
Second method to call after
forgotPassword(String) to respond to any challenges
that the service may request. |
void |
confirmForgotPassword(java.lang.String password,
java.lang.String forgotPasswordChallengeResponse,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
Callback<ForgotPasswordResult> callback)
Second method to call after
forgotPassword(String) to respond to any challenges
that the service may request. |
SignInResult |
confirmSignIn(java.util.Map<java.lang.String,java.lang.String> signInChallengeResponse)
|
void |
confirmSignIn(java.util.Map<java.lang.String,java.lang.String> signInChallengeResponse,
Callback<SignInResult> callback)
|
SignInResult |
confirmSignIn(java.util.Map<java.lang.String,java.lang.String> signInChallengeResponse,
java.util.Map<java.lang.String,java.lang.String> clientMetaData)
|
void |
confirmSignIn(java.util.Map<java.lang.String,java.lang.String> signInChallengeResponse,
java.util.Map<java.lang.String,java.lang.String> clientMetaData,
Callback<SignInResult> callback)
|
SignInResult |
confirmSignIn(java.lang.String signInChallengeResponse) |
void |
confirmSignIn(java.lang.String signInChallengeResponse,
Callback<SignInResult> callback) |
SignInResult |
confirmSignIn(java.lang.String signInChallengeResponse,
java.util.Map<java.lang.String,java.lang.String> clientMetadata) |
void |
confirmSignIn(java.lang.String signInChallengeResponse,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
Callback<SignInResult> callback) |
SignUpResult |
confirmSignUp(java.lang.String username,
java.lang.String signUpChallengeResponse)
Confirm the sign-up request with follow-up information
|
void |
confirmSignUp(java.lang.String username,
java.lang.String signUpChallengeResponse,
Callback<SignUpResult> callback)
Confirm the sign-up request with follow-up information
|
SignUpResult |
confirmSignUp(java.lang.String username,
java.lang.String signUpChallengeResponse,
java.util.Map<java.lang.String,java.lang.String> clientMetadata)
Confirm the sign-up request with follow-up information
|
void |
confirmSignUp(java.lang.String username,
java.lang.String signUpChallengeResponse,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
Callback<SignUpResult> callback)
Confirm the sign-up request with follow-up information
|
void |
confirmUpdateUserAttribute(java.lang.String attributeName,
java.lang.String updateUserAttributeChallengeResponse)
Confirm the attribute with the code provided by user.
|
void |
confirmUpdateUserAttribute(java.lang.String attributeName,
java.lang.String updateUserAttributeChallengeResponse,
Callback<java.lang.Void> callback)
Confirm the attribute with the code provided by user.
|
void |
confirmVerifyUserAttribute(java.lang.String attributeName,
java.lang.String updateUserAttributeChallengeResponse)
Confirm the attribute with the code provided by user.
|
void |
confirmVerifyUserAttribute(java.lang.String attributeName,
java.lang.String updateUserAttributeChallengeResponse,
Callback<java.lang.Void> callback)
Confirm the attribute with the code provided by user.
|
UserStateDetails |
currentUserState()
Performs a check on the current UserState.
|
void |
currentUserState(Callback<UserStateDetails> callback)
Performs a check on the current UserState.
|
UserStateDetails |
federatedSignIn(java.lang.String providerKey,
java.lang.String token)
Federate tokens from custom identity providers into Cognito Identity Pool by providing the
logins key and token
|
void |
federatedSignIn(java.lang.String providerKey,
java.lang.String token,
Callback<UserStateDetails> callback)
Federate tokens from custom identity providers into Cognito Identity Pool by providing the
logins key and token
|
UserStateDetails |
federatedSignIn(java.lang.String providerKey,
java.lang.String token,
FederatedSignInOptions options)
Federate tokens from custom identity providers by providing the
logins key and token
|
void |
federatedSignIn(java.lang.String providerKey,
java.lang.String token,
FederatedSignInOptions options,
Callback<UserStateDetails> callback)
Federate tokens from custom identity providers by providing the
logins key and token
|
ForgotPasswordResult |
forgotPassword(java.lang.String username)
Used to reset password if user forgot the old password.
|
void |
forgotPassword(java.lang.String username,
Callback<ForgotPasswordResult> callback)
Used to reset password if user forgot the old password.
|
ForgotPasswordResult |
forgotPassword(java.lang.String username,
java.util.Map<java.lang.String,java.lang.String> clientMetadata)
Used to reset password if user forgot the old password.
|
void |
forgotPassword(java.lang.String username,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
Callback<ForgotPasswordResult> callback)
Used to reset password if user forgot the old password.
|
AWSCredentials |
getAWSCredentials()
Returns AWSCredentials obtained from Cognito Identity
|
void |
getAWSCredentials(Callback<AWSCredentials> callback) |
AWSConfigurable |
getClient(android.content.Context context,
java.lang.Class<? extends AWSConfigurable> clientClass)
Get the AWSConfigurable client if exists, else create one and
add it to the clientMap and return.
|
AWSConfiguration |
getConfiguration()
Retrieve the AWSConfiguration object that represents
the awsconfiguration.json file.
|
AWSCredentials |
getCredentials()
Returns AWSCredentials which the caller can use to authorize an AWS
request.
|
DeviceOperations |
getDeviceOperations()
Retrieve a handle to perform device related operations.
|
java.lang.String |
getIdentityId() |
static AWSMobileClient |
getInstance()
Gets the singleton instance of this class.
|
Tokens |
getTokens()
Returns the tokens obtained from Cognito Userpools sign-in.
|
void |
getTokens(Callback<Tokens> callback)
Returns the tokens obtained from Cognito Userpools sign-in.
|
java.util.Map<java.lang.String,java.lang.String> |
getUserAttributes() |
void |
getUserAttributes(Callback<java.util.Map<java.lang.String,java.lang.String>> callback) |
java.lang.String |
getUsername()
Returns the username attribute of the current access token.
|
boolean |
handleAuthResponse(android.content.Intent intent)
Pass in the Intent from the OAuth 2.0 exchange from
showSignIn(Activity) |
void |
initialize(android.content.Context context,
AWSConfiguration awsConfig,
Callback<UserStateDetails> callback) |
void |
initialize(android.content.Context context,
Callback<UserStateDetails> callback) |
boolean |
isSignedIn()
A variant of
currentUserState() that simplifies the output to a boolean. |
void |
refresh()
Forces this credentials provider to refresh its credentials.
|
void |
releaseSignInWait()
Release the wait for tokens to be refreshed
Doing this fails all pending operations that were
waiting for sign-in.
|
boolean |
removeUserStateListener(UserStateListener listener)
Removes a listener.
|
SignUpResult |
resendSignUp(java.lang.String username)
Used when a user has attempted sign-up previously and wants to continue the process.
|
void |
resendSignUp(java.lang.String username,
Callback<SignUpResult> callback)
Used when a user has attempted sign-up previously and wants to continue the process.
|
SignUpResult |
resendSignUp(java.lang.String username,
java.util.Map<java.lang.String,java.lang.String> clientMetadata)
Used when a user has attempted sign-up previously and wants to continue the process.
|
void |
resendSignUp(java.lang.String username,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
Callback<SignUpResult> callback)
Used when a user has attempted sign-up previously and wants to continue the process.
|
UserStateDetails |
showSignIn(android.app.Activity callingActivity)
Shows a sign-in UI for user's to sign-in, sign-up, forgot password, create account
|
void |
showSignIn(android.app.Activity callingActivity,
Callback<UserStateDetails> callback)
Shows a sign-in UI for user's to sign-in, sign-up, forgot password, create account
|
UserStateDetails |
showSignIn(android.app.Activity callingActivity,
SignInUIOptions signInUIOptions)
Shows a sign-in UI for user's to sign-in, sign-up, forgot password, create account
|
void |
showSignIn(android.app.Activity callingActivity,
SignInUIOptions signInUIOptions,
Callback<UserStateDetails> callback)
Shows a sign-in UI for user's to sign-in, sign-up, forgot password, create account
|
SignInResult |
signIn(java.lang.String username,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String> validationData) |
void |
signIn(java.lang.String username,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String> validationData,
Callback<SignInResult> callback) |
SignInResult |
signIn(java.lang.String username,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String> validationData,
java.util.Map<java.lang.String,java.lang.String> clientMetadata) |
void |
signIn(java.lang.String username,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String> validationData,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
Callback<SignInResult> callback) |
void |
signOut()
Clears local tokens so that the client is in a signed-out state.
|
void |
signOut(SignOutOptions signOutOptions)
Sign-out the user with more options.
|
void |
signOut(SignOutOptions signOutOptions,
Callback<java.lang.Void> callback)
Sign-out the user with more options.
|
SignUpResult |
signUp(java.lang.String username,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String> userAttributes,
java.util.Map<java.lang.String,java.lang.String> validationData)
Sign-up users.
|
void |
signUp(java.lang.String username,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String> userAttributes,
java.util.Map<java.lang.String,java.lang.String> validationData,
Callback<SignUpResult> callback)
Sign-up users.
|
SignUpResult |
signUp(java.lang.String username,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String> userAttributes,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
java.util.Map<java.lang.String,java.lang.String> validationData)
Sign-up users.
|
void |
signUp(java.lang.String username,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String> userAttributes,
java.util.Map<java.lang.String,java.lang.String> validationData,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
Callback<SignUpResult> callback)
Sign-up users.
|
java.util.List<UserCodeDeliveryDetails> |
updateUserAttributes(java.util.Map<java.lang.String,java.lang.String> userAttributes)
Sends a map of user attributes to update.
|
void |
updateUserAttributes(java.util.Map<java.lang.String,java.lang.String> userAttributes,
Callback<java.util.List<UserCodeDeliveryDetails>> callback)
Sends a map of user attributes to update.
|
java.util.List<UserCodeDeliveryDetails> |
updateUserAttributes(java.util.Map<java.lang.String,java.lang.String> userAttributes,
java.util.Map<java.lang.String,java.lang.String> clientMetadata)
Sends a map of user attributes to update.
|
void |
updateUserAttributes(java.util.Map<java.lang.String,java.lang.String> userAttributes,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
Callback<java.util.List<UserCodeDeliveryDetails>> callback)
Sends a map of user attributes to update.
|
UserCodeDeliveryDetails |
verifyUserAttribute(java.lang.String attributeName)
Verify an attribute like email.
|
void |
verifyUserAttribute(java.lang.String attributeName,
Callback<UserCodeDeliveryDetails> callback)
Verify an attribute like email.
|
UserCodeDeliveryDetails |
verifyUserAttribute(java.lang.String attributeName,
java.util.Map<java.lang.String,java.lang.String> clientMetadata)
Verify an attribute like email.
|
void |
verifyUserAttribute(java.lang.String attributeName,
java.util.Map<java.lang.String,java.lang.String> clientMetadata,
Callback<UserCodeDeliveryDetails> callback)
Verify an attribute like email.
|
public static final java.lang.String DEFAULT_USER_AGENT
public static final java.lang.String HOSTED_UI_KEY
public static final java.lang.String CHALLENGE_RESPONSE_NEW_PASSWORD_KEY
public static final java.lang.String CHALLENGE_RESPONSE_USER_ATTRIBUTES_PREFIX_KEY
public static AWSMobileClient getInstance()
public AWSConfiguration getConfiguration()
public AWSCredentials getCredentials()
AWSCredentialsProvider
getCredentials
in interface AWSCredentialsProvider
public void refresh()
AWSCredentialsProvider
refresh
in interface AWSCredentialsProvider
public AWSCredentials getAWSCredentials() throws java.lang.Exception
java.lang.Exception
public void getAWSCredentials(Callback<AWSCredentials> callback)
public java.lang.String getIdentityId()
public void initialize(android.content.Context context, Callback<UserStateDetails> callback)
public void initialize(android.content.Context context, AWSConfiguration awsConfig, Callback<UserStateDetails> callback)
public DeviceOperations getDeviceOperations()
public void releaseSignInWait()
public java.lang.String getUsername()
public UserStateDetails currentUserState()
public void currentUserState(Callback<UserStateDetails> callback)
public void addUserStateListener(UserStateListener listener)
releaseSignInWait()
or any form of sign-in can be called
to prevent blocking getCredentials()
, getTokens()
, or other methods
requiring a sign-in.listener
- public boolean removeUserStateListener(UserStateListener listener)
listener
- public boolean isSignedIn()
currentUserState()
that simplifies the output to a boolean.
True if SIGNED_IN, SIGNED_OUT_USER_POOLS_TOKENS_INVALID, SIGNED_OUT_FEDERATED_TOKENS_INVALID.
False if GUEST, SIGNED_OUT.public void signIn(java.lang.String username, java.lang.String password, java.util.Map<java.lang.String,java.lang.String> validationData, Callback<SignInResult> callback)
public void signIn(java.lang.String username, java.lang.String password, java.util.Map<java.lang.String,java.lang.String> validationData, java.util.Map<java.lang.String,java.lang.String> clientMetadata, Callback<SignInResult> callback)
public SignInResult signIn(java.lang.String username, java.lang.String password, java.util.Map<java.lang.String,java.lang.String> validationData) throws java.lang.Exception
java.lang.Exception
public SignInResult signIn(java.lang.String username, java.lang.String password, java.util.Map<java.lang.String,java.lang.String> validationData, java.util.Map<java.lang.String,java.lang.String> clientMetadata) throws java.lang.Exception
java.lang.Exception
public void confirmSignIn(java.lang.String signInChallengeResponse, Callback<SignInResult> callback)
public void confirmSignIn(java.lang.String signInChallengeResponse, java.util.Map<java.lang.String,java.lang.String> clientMetadata, Callback<SignInResult> callback)
public SignInResult confirmSignIn(java.lang.String signInChallengeResponse) throws java.lang.Exception
java.lang.Exception
public SignInResult confirmSignIn(java.lang.String signInChallengeResponse, java.util.Map<java.lang.String,java.lang.String> clientMetadata) throws java.lang.Exception
java.lang.Exception
public void confirmSignIn(java.util.Map<java.lang.String,java.lang.String> signInChallengeResponse, java.util.Map<java.lang.String,java.lang.String> clientMetaData, Callback<SignInResult> callback)
signIn(java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>, com.amazonaws.mobile.client.Callback<com.amazonaws.mobile.client.results.SignInResult>)
.
Call with the user's response to the sign-in challenge.signInChallengeResponse
- obtained from userclientMetaData
- Meta data for lambda triggerscallback
- callbackpublic SignInResult confirmSignIn(java.util.Map<java.lang.String,java.lang.String> signInChallengeResponse, java.util.Map<java.lang.String,java.lang.String> clientMetaData) throws java.lang.Exception
signIn(java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>, com.amazonaws.mobile.client.Callback<com.amazonaws.mobile.client.results.SignInResult>)
.
Call with the user's response to the sign-in challenge.signInChallengeResponse
- obtained from userclientMetaData
- Meta data for lambda triggersjava.lang.Exception
public void confirmSignIn(java.util.Map<java.lang.String,java.lang.String> signInChallengeResponse, Callback<SignInResult> callback)
signIn(java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>, com.amazonaws.mobile.client.Callback<com.amazonaws.mobile.client.results.SignInResult>)
.
Call with the user's response to the sign-in challenge.signInChallengeResponse
- obtained from usercallback
- callbackpublic SignInResult confirmSignIn(java.util.Map<java.lang.String,java.lang.String> signInChallengeResponse) throws java.lang.Exception
signIn(java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>, com.amazonaws.mobile.client.Callback<com.amazonaws.mobile.client.results.SignInResult>)
.
Call with the user's response to the sign-in challenge.signInChallengeResponse
- obtained from userjava.lang.Exception
public void signOut()
public void signOut(SignOutOptions signOutOptions) throws java.lang.Exception
SignOutOptions.builder()
.signOutGlobally(true) // Sign-out user from all sessions across devices
.build();
signOutOptions
- optionsjava.lang.Exception
public void signOut(SignOutOptions signOutOptions, Callback<java.lang.Void> callback)
SignOutOptions.builder()
.signOutGlobally(true) // Sign-out user from all sessions across devices
.build();
signOutOptions
- optionspublic void federatedSignIn(java.lang.String providerKey, java.lang.String token, Callback<UserStateDetails> callback)
The logins key can be specified with IdentityProvider#AMAZON#toString()
providerKey
- Custom provider key i.e. Google sign-in's key is accounts.google.comtoken
- the JWT token vended by the third-partypublic UserStateDetails federatedSignIn(java.lang.String providerKey, java.lang.String token) throws java.lang.Exception
The logins key can be specified with IdentityProvider.AMAZON
providerKey
- Custom provider key i.e. Google sign-in's key is accounts.google.comtoken
- the JWT token vended by the third-partyjava.lang.Exception
public void federatedSignIn(java.lang.String providerKey, java.lang.String token, FederatedSignInOptions options, Callback<UserStateDetails> callback)
The logins key can be specified with IdentityProvider#AMAZON#toString()
providerKey
- Custom provider key i.e. Google sign-in's key is accounts.google.comtoken
- the JWT token vended by the third-partypublic UserStateDetails federatedSignIn(java.lang.String providerKey, java.lang.String token, FederatedSignInOptions options) throws java.lang.Exception
The logins key can be specified with IdentityProvider.AMAZON
providerKey
- Custom provider key i.e. Google sign-in's key is accounts.google.comtoken
- the JWT token vended by the third-partyjava.lang.Exception
public Tokens getTokens() throws java.lang.Exception
java.lang.Exception
- when the tokens cannot be retrieved successfully.public void getTokens(Callback<Tokens> callback)
java.lang.Exception
- when the tokens cannot be retrieved successfully.public void signUp(java.lang.String username, java.lang.String password, java.util.Map<java.lang.String,java.lang.String> userAttributes, java.util.Map<java.lang.String,java.lang.String> validationData, java.util.Map<java.lang.String,java.lang.String> clientMetadata, Callback<SignUpResult> callback)
SignUpResult
will contain next steps if necessary.
Call confirmSignUp(String, String, Callback)
with the necessary next
step code obtained from user.username
- username/email address/handlepassword
- user's passworduserAttributes
- attributes associated with uservalidationData
- optional, set of data to validate the sign-up requestclientMetadata
- meta data to be passed to the lambdas invoked by sign up operation.callback
- callback will be invoked to notify the success or failure of the
SignUp operationpublic SignUpResult signUp(java.lang.String username, java.lang.String password, java.util.Map<java.lang.String,java.lang.String> userAttributes, java.util.Map<java.lang.String,java.lang.String> clientMetadata, java.util.Map<java.lang.String,java.lang.String> validationData) throws java.lang.Exception
SignUpResult
will contain next steps if necessary.
Call confirmSignUp(String, String)
with the necessary next step code obtained from user.username
- username/email address/handlepassword
- user's passworduserAttributes
- attributes associated with uservalidationData
- optional, set of data to validate the sign-up requestclientMetadata
- meta data to be passed to the lambdas invoked by sign up operation.java.lang.Exception
- if there is any error generated by the clientpublic void signUp(java.lang.String username, java.lang.String password, java.util.Map<java.lang.String,java.lang.String> userAttributes, java.util.Map<java.lang.String,java.lang.String> validationData, Callback<SignUpResult> callback)
SignUpResult
will contain next steps if necessary.
Call confirmSignUp(String, String, Callback)
with the necessary next
step code obtained from user.username
- username/email address/handlepassword
- user's passworduserAttributes
- attributes associated with uservalidationData
- optional, set of data to validate the sign-up requestcallback
- callback will be invoked to notify the success or failure of the
SignUp operationpublic SignUpResult signUp(java.lang.String username, java.lang.String password, java.util.Map<java.lang.String,java.lang.String> userAttributes, java.util.Map<java.lang.String,java.lang.String> validationData) throws java.lang.Exception
SignUpResult
will contain next steps if necessary.
Call confirmSignUp(String, String)
with the necessary next step code obtained from user.username
- username/email address/handlepassword
- user's passworduserAttributes
- attributes associated with uservalidationData
- optional, set of data to validate the sign-up requestjava.lang.Exception
- if there is any error generated by the clientpublic void confirmSignUp(java.lang.String username, java.lang.String signUpChallengeResponse, java.util.Map<java.lang.String,java.lang.String> clientMetadata, Callback<SignUpResult> callback)
username
- username/email address/handle of the user who is signing upsignUpChallengeResponse
- response to the signUp challenge postedclientMetadata
- meta data to be passed to the lambdas invoked by confirm sign up operation.callback
- the callback will be invoked to notify the success or
failure of the confirmSignUp operationpublic SignUpResult confirmSignUp(java.lang.String username, java.lang.String signUpChallengeResponse, java.util.Map<java.lang.String,java.lang.String> clientMetadata) throws java.lang.Exception
username
- username of the user who is signing upsignUpChallengeResponse
- response to the signUp challenge postedclientMetadata
- meta data to be passed to the lambdas invoked by confirm sign up operation.java.lang.Exception
public void confirmSignUp(java.lang.String username, java.lang.String signUpChallengeResponse, Callback<SignUpResult> callback)
username
- username/email address/handle of the user who is signing upsignUpChallengeResponse
- response to the signUp challenge postedcallback
- the callback will be invoked to notify the success or
failure of the confirmSignUp operationpublic SignUpResult confirmSignUp(java.lang.String username, java.lang.String signUpChallengeResponse) throws java.lang.Exception
username
- username of the user who is signing upsignUpChallengeResponse
- response to the signUp challenge postedjava.lang.Exception
public void resendSignUp(java.lang.String username, Callback<SignUpResult> callback)
username
- callback
- public void resendSignUp(java.lang.String username, java.util.Map<java.lang.String,java.lang.String> clientMetadata, Callback<SignUpResult> callback)
clientMetadata
- A map of custom key-value pairs that is passed to the lambda function for
custom workflow.username
- callback
- public SignUpResult resendSignUp(java.lang.String username) throws java.lang.Exception
username
- java.lang.Exception
public SignUpResult resendSignUp(java.lang.String username, java.util.Map<java.lang.String,java.lang.String> clientMetadata) throws java.lang.Exception
clientMetadata
- A map of custom key-value pairs that is passed to the lambda function for
custom workflow.username
- java.lang.Exception
public void forgotPassword(java.lang.String username, java.util.Map<java.lang.String,java.lang.String> clientMetadata, Callback<ForgotPasswordResult> callback)
username
- username of the user trying to reset password.clientMetadata
- meta data to be passed to the lambdas invoked by confirm sign up operation.callback
- callback will be invoked to notify the success or failure of the
forgot password operationpublic ForgotPasswordResult forgotPassword(java.lang.String username, java.util.Map<java.lang.String,java.lang.String> clientMetadata) throws java.lang.Exception
username
- username of the user trying to reset password.java.lang.Exception
public void forgotPassword(java.lang.String username, Callback<ForgotPasswordResult> callback)
username
- username of the user trying to reset password.callback
- callback will be invoked to notify the success or failure of the
forgot password operationpublic ForgotPasswordResult forgotPassword(java.lang.String username) throws java.lang.Exception
username
- username of the user trying to reset password.java.lang.Exception
public void confirmForgotPassword(java.lang.String password, java.lang.String forgotPasswordChallengeResponse, java.util.Map<java.lang.String,java.lang.String> clientMetadata, Callback<ForgotPasswordResult> callback)
forgotPassword(String)
to respond to any challenges
that the service may request.password
- new passwordforgotPasswordChallengeResponse
- response to the forgot password challenge postedclientMetadata
- metadata to be passed to the lambda invoked by this operation.callback
- callback will be invoked to notify the success or failure of the
confirm forgot password operationpublic ForgotPasswordResult confirmForgotPassword(java.lang.String password, java.util.Map<java.lang.String,java.lang.String> clientMetadata, java.lang.String forgotPasswordChallengeResponse) throws java.lang.Exception
forgotPassword(String)
to respond to any challenges
that the service may request.password
- new password.clientMetadata
- metadata to be passed to the lambda invoked by this operation.forgotPasswordChallengeResponse
- response to the forgot password challenge posted.java.lang.Exception
public void confirmForgotPassword(java.lang.String password, java.lang.String forgotPasswordChallengeResponse, Callback<ForgotPasswordResult> callback)
forgotPassword(String)
to respond to any challenges
that the service may request.password
- new password.forgotPasswordChallengeResponse
- response to the forgot password challenge posted.callback
- callback will be invoked to notify the success or failure of the
confirm forgot password operationpublic ForgotPasswordResult confirmForgotPassword(java.lang.String password, java.lang.String forgotPasswordChallengeResponse) throws java.lang.Exception
forgotPassword(String)
to respond to any challenges
that the service may request.password
- new password.forgotPasswordChallengeResponse
- response to the forgot password challenge posted.java.lang.Exception
public void changePassword(java.lang.String oldPassword, java.lang.String newPassword, Callback<java.lang.Void> callback)
public void changePassword(java.lang.String oldPassword, java.lang.String newPassword) throws java.lang.Exception
java.lang.Exception
public void getUserAttributes(Callback<java.util.Map<java.lang.String,java.lang.String>> callback)
public java.util.Map<java.lang.String,java.lang.String> getUserAttributes() throws java.lang.Exception
java.lang.Exception
public void updateUserAttributes(java.util.Map<java.lang.String,java.lang.String> userAttributes, Callback<java.util.List<UserCodeDeliveryDetails>> callback)
userAttributes
- the attributes i.e. emailcallback
- verification delivery informationpublic void updateUserAttributes(java.util.Map<java.lang.String,java.lang.String> userAttributes, java.util.Map<java.lang.String,java.lang.String> clientMetadata, Callback<java.util.List<UserCodeDeliveryDetails>> callback)
userAttributes
- the attributes i.e. emailclientMetadata
- A map of custom key-value pairs that is passed to the lambda function for
custom workflow.callback
- verification delivery informationpublic java.util.List<UserCodeDeliveryDetails> updateUserAttributes(java.util.Map<java.lang.String,java.lang.String> userAttributes) throws java.lang.Exception
userAttributes
- the attributes i.e. emailjava.lang.Exception
public java.util.List<UserCodeDeliveryDetails> updateUserAttributes(java.util.Map<java.lang.String,java.lang.String> userAttributes, java.util.Map<java.lang.String,java.lang.String> clientMetadata) throws java.lang.Exception
userAttributes
- the attributes i.e. emailclientMetadata
- A map of custom key-value pairs that is passed to the lambda function for
custom workflow.java.lang.Exception
public void verifyUserAttribute(java.lang.String attributeName, Callback<UserCodeDeliveryDetails> callback)
attributeName
- i.e. emailcallback
- verification delivery informationpublic void verifyUserAttribute(java.lang.String attributeName, java.util.Map<java.lang.String,java.lang.String> clientMetadata, Callback<UserCodeDeliveryDetails> callback)
attributeName
- i.e. emailclientMetadata
- A map of custom key-value pairs that is passed to the lambda function for
lambda functions triggered by forgot password.callback
- verification delivery informationpublic UserCodeDeliveryDetails verifyUserAttribute(java.lang.String attributeName) throws java.lang.Exception
attributeName
- i.e. emailjava.lang.Exception
public UserCodeDeliveryDetails verifyUserAttribute(java.lang.String attributeName, java.util.Map<java.lang.String,java.lang.String> clientMetadata) throws java.lang.Exception
attributeName
- i.e. emailclientMetadata
- A map of custom key-value pairs that is passed to the lambda function for
lambda functions triggered by forgot password.java.lang.Exception
public void confirmUpdateUserAttribute(java.lang.String attributeName, java.lang.String updateUserAttributeChallengeResponse, Callback<java.lang.Void> callback)
attributeName
- i.e. emailupdateUserAttributeChallengeResponse
- i.e. 123456callback
- callbackpublic void confirmUpdateUserAttribute(java.lang.String attributeName, java.lang.String updateUserAttributeChallengeResponse) throws java.lang.Exception
attributeName
- i.e. emailupdateUserAttributeChallengeResponse
- i.e. 123456java.lang.Exception
public void confirmVerifyUserAttribute(java.lang.String attributeName, java.lang.String updateUserAttributeChallengeResponse, Callback<java.lang.Void> callback)
attributeName
- i.e. emailupdateUserAttributeChallengeResponse
- i.e. 123456callback
- callbackpublic void confirmVerifyUserAttribute(java.lang.String attributeName, java.lang.String updateUserAttributeChallengeResponse) throws java.lang.Exception
attributeName
- i.e. emailupdateUserAttributeChallengeResponse
- i.e. 123456java.lang.Exception
public boolean handleAuthResponse(android.content.Intent intent)
showSignIn(Activity)
intent
- public void showSignIn(android.app.Activity callingActivity, Callback<UserStateDetails> callback)
callingActivity
- The activity that the sign-in screen will be shown on top of.callback
- callback with UserStateDetails at end of operationpublic UserStateDetails showSignIn(android.app.Activity callingActivity) throws java.lang.Exception
callingActivity
- The activity that the sign-in screen will be shown on top of.java.lang.Exception
public void showSignIn(android.app.Activity callingActivity, SignInUIOptions signInUIOptions, Callback<UserStateDetails> callback)
callingActivity
- The activity that the sign-in screen will be shown on top of.signInUIOptions
- Override any default configuration with your preferences.callback
- callback with UserStateDetails at end of operationpublic UserStateDetails showSignIn(android.app.Activity callingActivity, SignInUIOptions signInUIOptions) throws java.lang.Exception
callingActivity
- The activity that the sign-in screen will be shown on top of.signInUIOptions
- Override any default configuration with your preferences.java.lang.Exception
public AWSConfigurable getClient(android.content.Context context, java.lang.Class<? extends AWSConfigurable> clientClass)
context
- The activity contextclientClass
- SDK Client Class that confirms to the AWSConfigurable interface.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.