Search in sources :

Example 16 with InternalCallback

use of com.amazonaws.mobile.client.internal.InternalCallback in project aws-sdk-android by aws-amplify.

the class OAuth2Utils method verifyUserAttribute.

/**
 * Verify an attribute like email.
 * @param attributeName i.e. email
 * @param clientMetadata A map of custom key-value pairs that is passed to the lambda function for
 *                       lambda functions triggered by forgot password.
 * @param callback verification delivery information
 */
@AnyThread
public void verifyUserAttribute(final String attributeName, final Map<String, String> clientMetadata, final Callback<UserCodeDeliveryDetails> callback) {
    InternalCallback internalCallback = new InternalCallback<UserCodeDeliveryDetails>(callback);
    internalCallback.async(_verifyUserAttribute(attributeName, clientMetadata, internalCallback));
}
Also used : InternalCallback(com.amazonaws.mobile.client.internal.InternalCallback) AnyThread(androidx.annotation.AnyThread)

Example 17 with InternalCallback

use of com.amazonaws.mobile.client.internal.InternalCallback in project aws-sdk-android by aws-amplify.

the class OAuth2Utils method forgotPassword.

/**
 * Used to reset password if user forgot the old password.
 *
 * @param username username of the user trying to reset password.
 * @param clientMetadata meta data to be passed to the lambdas invoked by confirm sign up operation.
 * @param callback callback will be invoked to notify the success or failure of the
 *                 forgot password operation
 */
@AnyThread
public void forgotPassword(final String username, final Map<String, String> clientMetadata, final Callback<ForgotPasswordResult> callback) {
    final InternalCallback internalCallback = new InternalCallback<ForgotPasswordResult>(callback);
    internalCallback.async(_forgotPassword(username, clientMetadata, internalCallback));
}
Also used : InternalCallback(com.amazonaws.mobile.client.internal.InternalCallback) AnyThread(androidx.annotation.AnyThread)

Example 18 with InternalCallback

use of com.amazonaws.mobile.client.internal.InternalCallback in project aws-sdk-android by aws-amplify.

the class OAuth2Utils method signUp.

/**
 * Sign-up users. The {@link SignUpResult} will contain next steps if necessary.
 * Call {@link #confirmSignUp(String, String, Callback)} with the necessary next
 * step code obtained from user.
 *
 * @param username username/email address/handle
 * @param password user's password
 * @param userAttributes attributes associated with user
 * @param validationData optional, set of data to validate the sign-up request
 * @param callback callback will be invoked to notify the success or failure of the
 *                 SignUp operation
 */
@AnyThread
public void signUp(final String username, final String password, final Map<String, String> userAttributes, final Map<String, String> validationData, final Callback<SignUpResult> callback) {
    final InternalCallback internalCallback = new InternalCallback<SignUpResult>(callback);
    internalCallback.async(_signUp(username, password, userAttributes, validationData, Collections.<String, String>emptyMap(), internalCallback));
}
Also used : InternalCallback(com.amazonaws.mobile.client.internal.InternalCallback) AnyThread(androidx.annotation.AnyThread)

Example 19 with InternalCallback

use of com.amazonaws.mobile.client.internal.InternalCallback in project aws-sdk-android by aws-amplify.

the class OAuth2Utils method confirmSignIn.

@AnyThread
public void confirmSignIn(final String signInChallengeResponse, final Map<String, String> clientMetadata, final Map<String, String> userAttributes, final Callback<SignInResult> callback) {
    final InternalCallback internalCallback = new InternalCallback<SignInResult>(callback);
    internalCallback.async(_confirmSignIn(signInChallengeResponse, clientMetadata, userAttributes, internalCallback));
}
Also used : InternalCallback(com.amazonaws.mobile.client.internal.InternalCallback) AnyThread(androidx.annotation.AnyThread)

Aggregations

InternalCallback (com.amazonaws.mobile.client.internal.InternalCallback)19 AnyThread (androidx.annotation.AnyThread)18 WorkerThread (androidx.annotation.WorkerThread)1 UserCodeDeliveryDetails (com.amazonaws.mobile.client.results.UserCodeDeliveryDetails)1 CognitoUserCodeDeliveryDetails (com.amazonaws.mobileconnectors.cognitoidentityprovider.CognitoUserCodeDeliveryDetails)1