use of com.amazonaws.services.cognitoidentityprovider.model.ResendConfirmationCodeRequest in project aws-sdk-android by aws-amplify.
the class CognitoUser method resendConfirmationCodeInternal.
/**
* Internal method to request registration code resend.
* @param clientMetadata A map of custom key-value pairs that is passed to the lambda function for
* custom workflow.
*/
private ResendConfirmationCodeResult resendConfirmationCodeInternal(final Map<String, String> clientMetadata) {
final ResendConfirmationCodeRequest resendConfirmationCodeRequest = new ResendConfirmationCodeRequest().withUsername(userId).withClientId(clientId).withSecretHash(secretHash).withClientMetadata(clientMetadata);
final String pinpointEndpointId = pool.getPinpointEndpointId();
resendConfirmationCodeRequest.setUserContextData(getUserContextData());
if (pinpointEndpointId != null) {
AnalyticsMetadataType amd = new AnalyticsMetadataType();
amd.setAnalyticsEndpointId(pinpointEndpointId);
resendConfirmationCodeRequest.setAnalyticsMetadata(amd);
}
return cognitoIdentityProviderClient.resendConfirmationCode(resendConfirmationCodeRequest);
}
Aggregations