Search in sources :

Example 11 with 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 clientMetadata meta data to be passed to the lambdas invoked by confirm sign up operation.
 * @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 Map<String, String> clientMetadata, final Callback<SignUpResult> callback) {
    final InternalCallback internalCallback = new InternalCallback<SignUpResult>(callback);
    internalCallback.async(_confirmSignUp(username, signUpChallengeResponse, clientMetadata, internalCallback));
}
Also used : InternalCallback(com.amazonaws.mobile.client.internal.InternalCallback) AnyThread(androidx.annotation.AnyThread)

Example 12 with InternalCallback

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

the class OAuth2Utils method confirmForgotPassword.

/**
 * Second method to call after {@link #forgotPassword(String)} to respond to any challenges
 * that the service may request.
 *
 * @param password new password.
 * @param forgotPasswordChallengeResponse response to the forgot password challenge posted.
 * @param callback callback will be invoked to notify the success or failure of the
 *                 confirm forgot password operation
 */
@AnyThread
@Deprecated
public void confirmForgotPassword(final String password, final String forgotPasswordChallengeResponse, final Callback<ForgotPasswordResult> callback) {
    final InternalCallback internalCallback = new InternalCallback<ForgotPasswordResult>(callback);
    internalCallback.async(_confirmForgotPassword(password, forgotPasswordChallengeResponse, Collections.<String, String>emptyMap(), internalCallback));
}
Also used : InternalCallback(com.amazonaws.mobile.client.internal.InternalCallback) AnyThread(androidx.annotation.AnyThread)

Example 13 with InternalCallback

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

the class OAuth2Utils method confirmForgotPassword.

/**
 * Second method to call after {@link #forgotPassword(String)} to respond to any challenges
 * that the service may request.
 *
 * @param password new password
 * @param forgotPasswordChallengeResponse response to the forgot password challenge posted
 * @param clientMetadata metadata to be passed to the lambda invoked by this operation.
 * @param callback callback will be invoked to notify the success or failure of the
 *                 confirm forgot password operation
 */
@AnyThread
public void confirmForgotPassword(final String password, final String forgotPasswordChallengeResponse, final Map<String, String> clientMetadata, final Callback<ForgotPasswordResult> callback) {
    final InternalCallback internalCallback = new InternalCallback<ForgotPasswordResult>(callback);
    internalCallback.async(_confirmForgotPassword(password, forgotPasswordChallengeResponse, clientMetadata, internalCallback));
}
Also used : InternalCallback(com.amazonaws.mobile.client.internal.InternalCallback) AnyThread(androidx.annotation.AnyThread)

Example 14 with InternalCallback

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

the class OAuth2Utils method initialize.

@AnyThread
public void initialize(final Context context, final AWSConfiguration awsConfig, final Callback<UserStateDetails> callback) {
    final InternalCallback internalCallback = new InternalCallback<UserStateDetails>(callback);
    internalCallback.async(_initialize(context, awsConfig, internalCallback));
}
Also used : InternalCallback(com.amazonaws.mobile.client.internal.InternalCallback) AnyThread(androidx.annotation.AnyThread)

Example 15 with InternalCallback

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

the class OAuth2Utils method showSignIn.

/**
 * Shows a sign-in UI for user's to sign-in, sign-up, forgot password, create account
 * @param callingActivity The activity that the sign-in screen will be shown on top of.
 * @param callback callback with UserStateDetails at end of operation
 */
@AnyThread
public void showSignIn(final Activity callingActivity, final Callback<UserStateDetails> callback) {
    // SignInUIOptions
    InternalCallback internalCallback = new InternalCallback(callback);
    internalCallback.async(_showSignIn(callingActivity, SignInUIOptions.builder().build(), 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