public ValidateTwoFactorPIN ( string accountSecretKey, string twoFactorCodeFromClient ) : bool | ||
accountSecretKey | string | |
twoFactorCodeFromClient | string | |
return | bool |
private void OK_Click(object sender, EventArgs e) { var tfa = new TwoFactorAuthenticator(); var verified = tfa.ValidateTwoFactorPIN(account, PasswordTextBox.Text); DialogResult = verified ? DialogResult.OK : DialogResult.Abort; }
public ActionResult VerifyTwoFactor() { var userValue = Request.Params.Get("userValue"); TwoFactorAuthenticator tfa = new TwoFactorAuthenticator(); bool isCorrectPIN = tfa.ValidateTwoFactorPIN("123456", userValue); return new ContentResult() { Content = isCorrectPIN.ToString() }; }