diff options
Diffstat (limited to 'TwoStepsAuthenticator.TestApp/ViewModel.cs')
-rw-r--r-- | TwoStepsAuthenticator.TestApp/ViewModel.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/TwoStepsAuthenticator.TestApp/ViewModel.cs b/TwoStepsAuthenticator.TestApp/ViewModel.cs index 51db3a8..8bfeb9b 100644 --- a/TwoStepsAuthenticator.TestApp/ViewModel.cs +++ b/TwoStepsAuthenticator.TestApp/ViewModel.cs @@ -72,8 +72,9 @@ namespace TwoStepsAuthenticatorTestApp public ViewModel() { + var authenticator = new TwoStepsAuthenticator.Authenticator(); + this.Key = authenticator.GenerateKey(); timer = new DispatcherTimer(TimeSpan.FromSeconds(1), DispatcherPriority.Normal, timerCallback, App.Current.Dispatcher); - //timer.Elapsed += timer_Elapsed; timer.Start(); } @@ -96,6 +97,8 @@ namespace TwoStepsAuthenticatorTestApp { var auth = new TwoStepsAuthenticator.Authenticator(); Code = auth.GetCode(this.Key); + + auth.CheckCode(key, Code); } } } |