Permalink
Browse files

Added information about the logged in user to the footer

  • Loading branch information...
robdmoore committed Jun 29, 2014
1 parent b7a6da7 commit 003c0e0a44dc4ce60116d11360abae3b67de34cc
Showing with 14 additions and 1 deletion.
  1. +14 −1 AzureAdMvcExample/Views/Shared/_Layout.cshtml
@@ -1,4 +1,6 @@
<!DOCTYPE html>
@using System.Security.Claims
@using ClaimTypes = System.IdentityModel.Claims.ClaimTypes
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
@@ -31,6 +33,17 @@
</div>
<div class="container body-content">
@RenderBody()
<footer>
<hr />
@if (User.Identity.IsAuthenticated)
{
@:Logged in as @(ClaimsPrincipal.Current.FindFirst(ClaimTypes.GivenName).Value) @(ClaimsPrincipal.Current.FindFirst(ClaimTypes.Surname).Value).
}
else
{
@:Not logged in
}
</footer>
</div>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")

0 comments on commit 003c0e0

Please sign in to comment.