Amazon.CognitoIdentityProvider.AmazonCognitoIdentityProviderClient.ConfirmSignUp C# (CSharp) Метод

ConfirmSignUp() публичный Метод

Confirms registration of a user and handles the existing alias from a previous user.
/// This exception is thrown when a user tries to confirm the account with an email or /// phone number that has already been supplied as an alias from a different account. /// This exception tells user that an account with this email or phone already exists. /// /// This exception is thrown if the provided code does not match what the server was expecting. /// /// This exception is thrown if a code has expired. /// /// This exception is thrown when Amazon Cognito encounters an internal error. /// /// This exception is thrown when the Amazon Cognito service encounters an invalid AWS /// Lambda response. /// /// This exception is thrown when the Amazon Cognito service encounters an invalid parameter. /// /// This exception is thrown when a user exceeds the limit for a requested AWS resource. /// /// This exception gets thrown when a user is not authorized. /// /// This exception is thrown when the Amazon Cognito service cannot find the requested /// resource. /// /// This exception gets thrown when the user has made too many failed attempts for a given /// action (e.g., sign in). /// /// This exception gets thrown when the user has made too many requests for a given operation. /// /// This exception gets thrown when the Amazon Cognito service encounters an unexpected /// exception with the AWS Lambda service. /// /// This exception gets thrown when the Amazon Cognito service encounters a user validation /// exception with the AWS Lambda service. /// /// This exception is thrown when a user is not found. ///
public ConfirmSignUp ( ConfirmSignUpRequest request ) : ConfirmSignUpResponse
request Amazon.CognitoIdentityProvider.Model.ConfirmSignUpRequest Container for the necessary parameters to execute the ConfirmSignUp service method.
Результат ConfirmSignUpResponse
        public ConfirmSignUpResponse ConfirmSignUp(ConfirmSignUpRequest request)
        {
            var marshaller = new ConfirmSignUpRequestMarshaller();
            var unmarshaller = ConfirmSignUpResponseUnmarshaller.Instance;

            return Invoke<ConfirmSignUpRequest,ConfirmSignUpResponse>(request, marshaller, unmarshaller);
        }

Usage Example

Пример #1
0
    internal async Task <bool> VerifyAccessCode(string username, string code)
    {
        Amazon.CognitoIdentityProvider.AmazonCognitoIdentityProviderClient provider =
            new Amazon.CognitoIdentityProvider.AmazonCognitoIdentityProviderClient(new Amazon.Runtime.AnonymousAWSCredentials());
        ConfirmSignUpRequest confirmSignUpRequest = new ConfirmSignUpRequest();

        confirmSignUpRequest.Username         = username;
        confirmSignUpRequest.ConfirmationCode = code;
        confirmSignUpRequest.ClientId         = CLIENTAPP_ID;
        try
        {
            ConfirmSignUpResponse confirmSignUpResult = provider.ConfirmSignUp(confirmSignUpRequest);
            Console.WriteLine(confirmSignUpResult.ToString());
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
            return(false);
        }

        return(true);
    }
AmazonCognitoIdentityProviderClient