Esempio n. 1
0
        private bool AssignNewRecoveryToken()
        {
            AccountVerificationServiceClient accountVerificationServiceClient =
                new AccountVerificationServiceClient();

            return(accountVerificationServiceClient.AssignNewRecoveryToken(_emailAddress, _verificationToken));
        }
Esempio n. 2
0
        private void SendNewCode()
        {
            string newToken = TokenManager.GenerateToken();
            bool   newVerificationTokenWasAssigned = false;

            if (newToken != "")
            {
                AccountVerificationServiceClient accountVerificationServiceClient =
                    new AccountVerificationServiceClient();
                newVerificationTokenWasAssigned = accountVerificationServiceClient.AssignNewRecoveryToken(_emailAddress, newToken);
            }

            if (newVerificationTokenWasAssigned)
            {
                TokenInfoDto verificationTokenInfo = new TokenInfoDto()
                {
                    Name         = _username,
                    EmailAddress = _emailAddress,
                    Token        = newToken
                };
                TokenManager.SendToken(verificationTokenInfo);
                MessageBox.Show(Properties.Langs.Resources.NewCodeSentMessage);
            }
        }