summaryrefslogtreecommitdiffstats
path: root/TwoStepsAuthenticator.TestWebsite/Views
diff options
context:
space:
mode:
Diffstat (limited to 'TwoStepsAuthenticator.TestWebsite/Views')
-rw-r--r--TwoStepsAuthenticator.TestWebsite/Views/Home/DoubleAuth.cshtml16
-rw-r--r--TwoStepsAuthenticator.TestWebsite/Views/Home/Index.cshtml39
-rw-r--r--TwoStepsAuthenticator.TestWebsite/Views/Home/Welcome.cshtml10
-rw-r--r--TwoStepsAuthenticator.TestWebsite/Views/Shared/Error.cshtml17
-rw-r--r--TwoStepsAuthenticator.TestWebsite/Views/Shared/_Layout.cshtml11
-rw-r--r--TwoStepsAuthenticator.TestWebsite/Views/Web.config58
-rw-r--r--TwoStepsAuthenticator.TestWebsite/Views/_ViewStart.cshtml3
7 files changed, 154 insertions, 0 deletions
diff --git a/TwoStepsAuthenticator.TestWebsite/Views/Home/DoubleAuth.cshtml b/TwoStepsAuthenticator.TestWebsite/Views/Home/DoubleAuth.cshtml
new file mode 100644
index 0000000..e864721
--- /dev/null
+++ b/TwoStepsAuthenticator.TestWebsite/Views/Home/DoubleAuth.cshtml
@@ -0,0 +1,16 @@
+@model TwoStepsAuthenticator.TestWebsite.Users.WebsiteUser
+
+@{
+ ViewBag.Title = "DoubleAuth";
+}
+
+<h2>DoubleAuth</h2>
+
+@using (Html.BeginForm("DoubleAuth", "Home", FormMethod.Post))
+{
+ <div>
+ <input type="text" name="code" />
+ <br />
+ <input type="submit" value="Submit"/>
+ </div>
+} \ No newline at end of file
diff --git a/TwoStepsAuthenticator.TestWebsite/Views/Home/Index.cshtml b/TwoStepsAuthenticator.TestWebsite/Views/Home/Index.cshtml
new file mode 100644
index 0000000..65c97de
--- /dev/null
+++ b/TwoStepsAuthenticator.TestWebsite/Views/Home/Index.cshtml
@@ -0,0 +1,39 @@
+@{
+ ViewBag.Title = "Index";
+}
+
+<h2>Double authentication test website</h2>
+
+<div>
+ Welcome to the double authentication test website.
+ <br />
+ You can log-in with the following users :<br />
+ login : "user1", password : "user1"<br />
+ login : "user2", password : "user2"<br />
+ login : "user3", password : "user3"<br />
+ <br />
+ <br />
+ In order to login with user1 and user2, you have to set up an authenticator app : Microsoft Authenticator on Windows Phone, or Google authenticator on Android and iPhone.
+ <br />
+ The secret key is "AAAAAAAAAAAAAAAA" (16 'A') for user1,
+ <br />
+ and "BBBBBBBBBBBBBBBB" (16 'B') for user 2.
+ <br />
+ user3 doesn't have double authentication enabled, so you will be able to log in directly.
+
+
+</div>
+<hr />
+
+@using (Html.BeginForm("Login", "Home", FormMethod.Post))
+{
+ <div>
+ Login :
+ <input type="text" name="login" />
+ </div>
+ <div>
+ Password :
+ <input type="password" name="password" />
+ </div>
+ <input type="submit" value="Submit" />
+} \ No newline at end of file
diff --git a/TwoStepsAuthenticator.TestWebsite/Views/Home/Welcome.cshtml b/TwoStepsAuthenticator.TestWebsite/Views/Home/Welcome.cshtml
new file mode 100644
index 0000000..c5132a6
--- /dev/null
+++ b/TwoStepsAuthenticator.TestWebsite/Views/Home/Welcome.cshtml
@@ -0,0 +1,10 @@
+@{
+ ViewBag.Title = "Welcome";
+}
+
+<h2>Welcome</h2>
+
+You are logged in the website
+<br />
+
+@Html.ActionLink("log out", "Logout") \ No newline at end of file
diff --git a/TwoStepsAuthenticator.TestWebsite/Views/Shared/Error.cshtml b/TwoStepsAuthenticator.TestWebsite/Views/Shared/Error.cshtml
new file mode 100644
index 0000000..b4a1239
--- /dev/null
+++ b/TwoStepsAuthenticator.TestWebsite/Views/Shared/Error.cshtml
@@ -0,0 +1,17 @@
+@{
+ Layout = null;
+}
+
+<!DOCTYPE html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width" />
+ <title>Error</title>
+</head>
+<body>
+ <hgroup>
+ <h1>Error.</h1>
+ <h2>An error occurred while processing your request.</h2>
+ </hgroup>
+</body>
+</html> \ No newline at end of file
diff --git a/TwoStepsAuthenticator.TestWebsite/Views/Shared/_Layout.cshtml b/TwoStepsAuthenticator.TestWebsite/Views/Shared/_Layout.cshtml
new file mode 100644
index 0000000..917898d
--- /dev/null
+++ b/TwoStepsAuthenticator.TestWebsite/Views/Shared/_Layout.cshtml
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width" />
+ <title>@ViewBag.Title</title>
+</head>
+<body>
+ @RenderBody()
+</body>
+</html>
diff --git a/TwoStepsAuthenticator.TestWebsite/Views/Web.config b/TwoStepsAuthenticator.TestWebsite/Views/Web.config
new file mode 100644
index 0000000..826ce19
--- /dev/null
+++ b/TwoStepsAuthenticator.TestWebsite/Views/Web.config
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+
+<configuration>
+ <configSections>
+ <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+ <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
+ <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
+ </sectionGroup>
+ </configSections>
+
+ <system.web.webPages.razor>
+ <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+ <pages pageBaseType="System.Web.Mvc.WebViewPage">
+ <namespaces>
+ <add namespace="System.Web.Mvc" />
+ <add namespace="System.Web.Mvc.Ajax" />
+ <add namespace="System.Web.Mvc.Html" />
+ <add namespace="System.Web.Routing" />
+ </namespaces>
+ </pages>
+ </system.web.webPages.razor>
+
+ <appSettings>
+ <add key="webpages:Enabled" value="false" />
+ </appSettings>
+
+ <system.web>
+ <httpHandlers>
+ <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
+ </httpHandlers>
+
+ <!--
+ Enabling request validation in view pages would cause validation to occur
+ after the input has already been processed by the controller. By default
+ MVC performs request validation before a controller processes the input.
+ To change this behavior apply the ValidateInputAttribute to a
+ controller or action.
+ -->
+ <pages
+ validateRequest="false"
+ pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
+ pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
+ userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+ <controls>
+ <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
+ </controls>
+ </pages>
+ </system.web>
+
+ <system.webServer>
+ <validation validateIntegratedModeConfiguration="false" />
+
+ <handlers>
+ <remove name="BlockViewHandler"/>
+ <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
+ </handlers>
+ </system.webServer>
+</configuration>
diff --git a/TwoStepsAuthenticator.TestWebsite/Views/_ViewStart.cshtml b/TwoStepsAuthenticator.TestWebsite/Views/_ViewStart.cshtml
new file mode 100644
index 0000000..efda124
--- /dev/null
+++ b/TwoStepsAuthenticator.TestWebsite/Views/_ViewStart.cshtml
@@ -0,0 +1,3 @@
+@{
+ Layout = "~/Views/Shared/_Layout.cshtml";
+} \ No newline at end of file