public IActionResult ResendConfirmationCode([FromBody] ConfirmationResendRequest confirmationResendRequest)
 {
     if (!confirmationResendRequest.IsValid())
     {
         return(BadRequest("Invalid details provided"));
     }
     try
     {
         _confirmUserUseCase.Resend(confirmationResendRequest);
         return(Ok());
     }
     catch (Exception e)
     {
         throw;
     }
 }
Exemplo n.º 2
0
        public void ResendConfirmation(ConfirmationResendRequest confirmationResendRequest)
        {
            ResendConfirmationCodeRequest resendConfirmationCodeRequest = new ResendConfirmationCodeRequest()
            {
                ClientId = _connectionInfo.ClientId,
                Username = confirmationResendRequest.Email
            };

            try
            {
                _provider.ResendConfirmationCodeAsync(resendConfirmationCodeRequest).Wait();
            }
            catch (Exception e)
            {
                LoggingHandler.LogError(e.Message);
                LoggingHandler.LogError(e.StackTrace);
                throw;
            }
        }
Exemplo n.º 3
0
        public void ResendVerification(ConfirmationResendRequest confirmationResendRequest)
        {
            AdminCreateUserRequest adminCreateUserRequest = new AdminCreateUserRequest
            {
                UserPoolId             = _connectionInfo.UserPoolId,
                Username               = confirmationResendRequest.Email,
                DesiredDeliveryMediums = new List <string> {
                    "EMAIL"
                },
                MessageAction = MessageActionType.RESEND
            };

            try
            {
                var response = _provider.AdminCreateUserAsync(adminCreateUserRequest).Result;
            }
            catch (Exception e)
            {
                LoggingHandler.LogError(e.Message);
                LoggingHandler.LogError(e.StackTrace);
                throw;
            }
        }
 public static bool IsValid(this ConfirmationResendRequest confirmRequest)
 {
     return(!string.IsNullOrWhiteSpace(confirmRequest.Email));
 }
Exemplo n.º 5
0
 public void Resend(ConfirmationResendRequest confirmationResendRequest)
 {
     _authenticateGateway.ResendConfirmation(confirmationResendRequest);
 }