use of com.amazonaws.mobile.client.internal.InternalCallback in project aws-sdk-android by aws-amplify.
the class OAuth2Utils method confirmUpdateUserAttribute.
/**
* Confirm the attribute with the code provided by user.
* @param attributeName i.e. email
* @param updateUserAttributeChallengeResponse i.e. 123456
* @param callback callback
*/
@AnyThread
public void confirmUpdateUserAttribute(final String attributeName, final String updateUserAttributeChallengeResponse, final Callback<Void> callback) {
InternalCallback internalCallback = new InternalCallback(callback);
internalCallback.async(_confirmUserAttribute(attributeName, updateUserAttributeChallengeResponse, internalCallback));
}
use of com.amazonaws.mobile.client.internal.InternalCallback in project aws-sdk-android by aws-amplify.
the class OAuth2Utils method updateUserAttributes.
/**
* Sends a map of user attributes to update. If an attribute needs to
* be verified, then the verification delivery information is returned.
* @param userAttributes the attributes i.e. email
* @param clientMetadata A map of custom key-value pairs that is passed to the lambda function for
* custom workflow.
* @param callback verification delivery information
*/
@AnyThread
public void updateUserAttributes(final Map<String, String> userAttributes, final Map<String, String> clientMetadata, final Callback<List<UserCodeDeliveryDetails>> callback) {
InternalCallback internalCallback = new InternalCallback<List<UserCodeDeliveryDetails>>(callback);
internalCallback.async(_updateUserAttributes(userAttributes, clientMetadata, internalCallback));
}
use of com.amazonaws.mobile.client.internal.InternalCallback in project aws-sdk-android by aws-amplify.
the class OAuth2Utils method resendSignUp.
/**
* Used when a user has attempted sign-up previously and wants to continue the process.
* Note: If the user tries through the normal process with the same username, then it will
* fail and this method is required.
*
* @param clientMetadata A map of custom key-value pairs that is passed to the lambda function for
* custom workflow.
* @param username
* @param callback
*/
@AnyThread
public void resendSignUp(final String username, final Map<String, String> clientMetadata, final Callback<SignUpResult> callback) {
final InternalCallback internalCallback = new InternalCallback<SignUpResult>(callback);
internalCallback.async(_resendSignUp(username, clientMetadata, internalCallback));
}
use of com.amazonaws.mobile.client.internal.InternalCallback in project aws-sdk-android by aws-amplify.
the class OAuth2Utils method confirmSignUp.
/**
* Confirm the sign-up request with follow-up information
*
* @param username username/email address/handle of the user who is signing up
* @param signUpChallengeResponse response to the signUp challenge posted
* @param callback the callback will be invoked to notify the success or
* failure of the confirmSignUp operation
*/
@AnyThread
public void confirmSignUp(final String username, final String signUpChallengeResponse, final Callback<SignUpResult> callback) {
final InternalCallback internalCallback = new InternalCallback<SignUpResult>(callback);
internalCallback.async(_confirmSignUp(username, signUpChallengeResponse, Collections.<String, String>emptyMap(), internalCallback));
}
use of com.amazonaws.mobile.client.internal.InternalCallback in project aws-sdk-android by aws-amplify.
the class OAuth2Utils method changePassword.
@WorkerThread
public void changePassword(final String oldPassword, final String newPassword) throws Exception {
final InternalCallback internalCallback = new InternalCallback<Void>();
internalCallback.await(_changePassword(oldPassword, newPassword, internalCallback));
}
Aggregations