private bool AssignNewRecoveryToken() { AccountVerificationServiceClient accountVerificationServiceClient = new AccountVerificationServiceClient(); return(accountVerificationServiceClient.AssignNewRecoveryToken(_emailAddress, _verificationToken)); }
private bool TokenIsCorrect() { string token = TokenTextBox.Text; if (token == "") { return(false); } AccountVerificationServiceClient accountVerificationServiceClient = new AccountVerificationServiceClient(); return(accountVerificationServiceClient.VerifyRecoveryToken(_emailAddress, token)); }
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); } }