Add authentication
This commit is contained in:
parent
8f0c4c0a45
commit
a2d84e182d
11 changed files with 206 additions and 21 deletions
8
Website/Views/Account/Index.cshtml
Normal file
8
Website/Views/Account/Index.cshtml
Normal file
|
@ -0,0 +1,8 @@
|
|||
@model object
|
||||
|
||||
@{
|
||||
ViewBag.Title = "title";
|
||||
Layout = "_Layout";
|
||||
}
|
||||
|
||||
<h2>title</h2>
|
20
Website/Views/Account/Login.cshtml
Normal file
20
Website/Views/Account/Login.cshtml
Normal file
|
@ -0,0 +1,20 @@
|
|||
@model LoginViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Login";
|
||||
}
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.ReturnUrl)) {
|
||||
<div>Please log in to perform that action</div>
|
||||
}
|
||||
|
||||
@if (Model.FailedAttempt) {
|
||||
<div>Could not log in with those credentials</div>
|
||||
}
|
||||
|
||||
<form method="post" action="login">
|
||||
<input type="hidden" name="returnUrl" value="@Model.ReturnUrl"/>
|
||||
<label for="username">Username: </label><input name="username" id="username"/>
|
||||
<label for="password">Password: </label><input name="password" type="password" id="password"/>
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
Loading…
Add table
Add a link
Reference in a new issue