Search in sources :

Example 1 with ConfirmSignUpRequest

use of com.amazonaws.services.cognitoidentityprovider.model.ConfirmSignUpRequest in project aws-sdk-android by aws-amplify.

the class CognitoUser method confirmSignUpInternal.

/**
 * Internal method to Confirm Registration.
 *
 * @param confirmationCode REQUIRED: Code to confirm this user.
 * @param forcedAliasCreation REQUIRED: If set over-rides parameter
 *            contentions
 * @param clientMetadata A map of custom key-value pairs that is passed to the lambda function for
 *                       custom workflow.
 */
private void confirmSignUpInternal(final String confirmationCode, final boolean forcedAliasCreation, final Map<String, String> clientMetadata) {
    final ConfirmSignUpRequest confirmUserRegistrationRequest = new ConfirmSignUpRequest().withClientId(clientId).withSecretHash(secretHash).withUsername(userId).withConfirmationCode(confirmationCode).withForceAliasCreation(forcedAliasCreation).withClientMetadata(clientMetadata).withUserContextData(getUserContextData());
    final String pinpointEndpointId = pool.getPinpointEndpointId();
    if (pinpointEndpointId != null) {
        final AnalyticsMetadataType amd = new AnalyticsMetadataType();
        amd.setAnalyticsEndpointId(pinpointEndpointId);
        confirmUserRegistrationRequest.setAnalyticsMetadata(amd);
    }
    cognitoIdentityProviderClient.confirmSignUp(confirmUserRegistrationRequest);
}
Also used : AnalyticsMetadataType(com.amazonaws.services.cognitoidentityprovider.model.AnalyticsMetadataType) ConfirmSignUpRequest(com.amazonaws.services.cognitoidentityprovider.model.ConfirmSignUpRequest)

Aggregations

AnalyticsMetadataType (com.amazonaws.services.cognitoidentityprovider.model.AnalyticsMetadataType)1 ConfirmSignUpRequest (com.amazonaws.services.cognitoidentityprovider.model.ConfirmSignUpRequest)1