summaryrefslogtreecommitdiffstats
path: root/TwoStepsAuthenticator.TestApp/ViewModel.cs
diff options
context:
space:
mode:
authorGuillaume <guillaumelacasa@hotmail.com>2013-06-13 20:30:40 +0200
committerGuillaume <guillaumelacasa@hotmail.com>2013-06-13 20:30:40 +0200
commit549ea802b7fe5dd69c8f7d62cfd7823c9475b3b4 (patch)
treee0a7850a715629c7b92588cb82602b9757c179bb /TwoStepsAuthenticator.TestApp/ViewModel.cs
parentb8279017597a616b016f8f1def3be11ac9660f5d (diff)
downloadTwoStepsAuthenticator-549ea802b7fe5dd69c8f7d62cfd7823c9475b3b4.zip
TwoStepsAuthenticator-549ea802b7fe5dd69c8f7d62cfd7823c9475b3b4.tar.gz
TwoStepsAuthenticator-549ea802b7fe5dd69c8f7d62cfd7823c9475b3b4.tar.bz2
used codes management made lazy
Diffstat (limited to 'TwoStepsAuthenticator.TestApp/ViewModel.cs')
-rw-r--r--TwoStepsAuthenticator.TestApp/ViewModel.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/TwoStepsAuthenticator.TestApp/ViewModel.cs b/TwoStepsAuthenticator.TestApp/ViewModel.cs
index 191569f..8bfeb9b 100644
--- a/TwoStepsAuthenticator.TestApp/ViewModel.cs
+++ b/TwoStepsAuthenticator.TestApp/ViewModel.cs
@@ -72,10 +72,9 @@ namespace TwoStepsAuthenticatorTestApp
public ViewModel()
{
- var auth = new TwoStepsAuthenticator.Authenticator();
- this.Key = auth.GenerateKey();
+ 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();
}
@@ -98,6 +97,8 @@ namespace TwoStepsAuthenticatorTestApp
{
var auth = new TwoStepsAuthenticator.Authenticator();
Code = auth.GetCode(this.Key);
+
+ auth.CheckCode(key, Code);
}
}
}