Skip to content

Instantly share code, notes, and snippets.

@ErikHen
Created May 11, 2017 09:30
Show Gist options
  • Save ErikHen/f83826dfd95d90255268d1445df0c10a to your computer and use it in GitHub Desktop.
Save ErikHen/f83826dfd95d90255268d1445df0c10a to your computer and use it in GitHub Desktop.
Episerver Mixed-mode auth. Login view
@{ Layout = null; }
@model MyNamespace.Models.LoginViewModel
<!DOCTYPE html>
<html>
<head>
<title>Log in</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex,nofollow" />
</head>
<body>
<div class="login">
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
@Html.ValidationSummary()
<div>
<div>
@Html.LabelFor(x => x.Username)
@Html.TextBoxFor(x => x.Username)
</div>
<div>
@Html.LabelFor(x => x.Password)
@Html.PasswordFor(x => x.Password)
</div>
<div>
<input type="submit" value="Log in"/>
</div>
</div>
}
@using (Html.BeginForm("AdfsLogin", "Login", new {ReturnUrl = Request.QueryString["ReturnUrl"]}))
{
@Html.AntiForgeryToken()
<div class="linkwrapper">
<a onclick="document.forms.item(1).submit();">Log in with your AD account</a>
</div>
}
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment