summaryrefslogtreecommitdiffstats
path: root/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_LoginPartial.cshtml
diff options
context:
space:
mode:
Diffstat (limited to 'samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_LoginPartial.cshtml')
-rw-r--r--samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_LoginPartial.cshtml22
1 files changed, 22 insertions, 0 deletions
diff --git a/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_LoginPartial.cshtml b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_LoginPartial.cshtml
new file mode 100644
index 0000000..f996508
--- /dev/null
+++ b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_LoginPartial.cshtml
@@ -0,0 +1,22 @@
+@using Microsoft.AspNet.Identity
+@if (Request.IsAuthenticated)
+{
+ using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
+ {
+ @Html.AntiForgeryToken()
+
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ @Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
+ </li>
+ <li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
+ </ul>
+ }
+}
+else
+{
+ <ul class="nav navbar-nav navbar-right">
+ <li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
+ <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
+ </ul>
+}