summaryrefslogtreecommitdiffstats
path: root/TwoStepsAuthenticator.TestWebsite/Controllers/HomeController.cs
diff options
context:
space:
mode:
authorGuillaume Lacasa <guillaume.lacasa@ucaya.com>2013-12-06 15:32:54 +0100
committerGuillaume Lacasa <guillaume.lacasa@ucaya.com>2013-12-06 15:32:54 +0100
commit50beaba8291c1e777d5a63bb19400a260712f837 (patch)
tree46b14ab6b93d813e9f40aae760f4b3902e380800 /TwoStepsAuthenticator.TestWebsite/Controllers/HomeController.cs
parent33c70541ca1e0ea27ac6a9ba5bbee799f03f9de8 (diff)
parent41cb13ee263104981850a73d4abf4a583df31941 (diff)
downloadTwoStepsAuthenticator-50beaba8291c1e777d5a63bb19400a260712f837.zip
TwoStepsAuthenticator-50beaba8291c1e777d5a63bb19400a260712f837.tar.gz
TwoStepsAuthenticator-50beaba8291c1e777d5a63bb19400a260712f837.tar.bz2
Merge branch 'master' of https://github.com/dusk0r/TwoStepsAuthenticator
Diffstat (limited to 'TwoStepsAuthenticator.TestWebsite/Controllers/HomeController.cs')
-rw-r--r--TwoStepsAuthenticator.TestWebsite/Controllers/HomeController.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/TwoStepsAuthenticator.TestWebsite/Controllers/HomeController.cs b/TwoStepsAuthenticator.TestWebsite/Controllers/HomeController.cs
index c926019..ca6666c 100644
--- a/TwoStepsAuthenticator.TestWebsite/Controllers/HomeController.cs
+++ b/TwoStepsAuthenticator.TestWebsite/Controllers/HomeController.cs
@@ -13,6 +13,8 @@ namespace TwoStepsAuthenticator.TestWebsite.Controllers
//
// GET: /Home/
+ private static readonly UsedCodesManager usedCodesManager = new UsedCodesManager();
+
public ActionResult Index()
{
return View();
@@ -42,7 +44,7 @@ namespace TwoStepsAuthenticator.TestWebsite.Controllers
public ActionResult DoubleAuth(string code)
{
WebsiteUser user = (WebsiteUser)Session["AuthenticatedUser"];
- var auth = new TwoStepsAuthenticator.Authenticator();
+ var auth = new TwoStepsAuthenticator.TimeAuthenticator(usedCodeManager: usedCodesManager);
if (auth.CheckCode(user.DoubleAuthKey, code))
{
FormsAuthentication.SetAuthCookie(user.Login, true);