summaryrefslogtreecommitdiffstats
path: root/TwoStepsAuthenticator.TestApp/ViewModel.cs
diff options
context:
space:
mode:
authorGuillaume Lacasa <guillaume.lacasa@ucaya.com>2013-06-14 09:23:57 +0200
committerGuillaume Lacasa <guillaume.lacasa@ucaya.com>2013-06-14 09:23:57 +0200
commit0b4e94d02397bf6dd03c053610873dbdf8535059 (patch)
tree11e463b4787e01ec4daf22ba201e5ae9a02ad1d8 /TwoStepsAuthenticator.TestApp/ViewModel.cs
parent8a0e9f0802038c80a4fc36cafbd97d9579795d09 (diff)
parentdb2840622d085b1920a370f3452c9bd323a36414 (diff)
downloadTwoStepsAuthenticator-0b4e94d02397bf6dd03c053610873dbdf8535059.zip
TwoStepsAuthenticator-0b4e94d02397bf6dd03c053610873dbdf8535059.tar.gz
TwoStepsAuthenticator-0b4e94d02397bf6dd03c053610873dbdf8535059.tar.bz2
Merge branch 'master' of https://github.com/glacasa/TwoStepsAuthenticator
Diffstat (limited to 'TwoStepsAuthenticator.TestApp/ViewModel.cs')
-rw-r--r--TwoStepsAuthenticator.TestApp/ViewModel.cs5
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);
}
}
}