ValidateTwoFactorPIN() 공개 메소드

public ValidateTwoFactorPIN ( string accountSecretKey, string twoFactorCodeFromClient ) : bool
accountSecretKey string
twoFactorCodeFromClient string
리턴 bool
예제 #1
0
        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()
            };
        }