Skip to content

Instantly share code, notes, and snippets.

@cmatskas
Created June 15, 2020 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmatskas/87cf3d59ca54201cf5705c2f06d07d6e to your computer and use it in GitHub Desktop.
Save cmatskas/87cf3d59ca54201cf5705c2f06d07d6e to your computer and use it in GitHub Desktop.
@page
@model EasyAuthDemo.Pages.ClaimsModel
<div class="row">
<div class="col-md-12">
<table class="table table-responsive table-striped">
@if (HttpContext.User.Identity.IsAuthenticated)
{
foreach (var c in Model.UserClaims)
{
<tr>
<td>@c.Type</td>
<td>@(c.Value.Length > 100 ? c.Value.Substring(0, 100) : c.Value)</td>
</tr>
}
}
else
{
<tr>
<td>Current Status</td>
<td><strong>Not Authenticated</strong></td>
</tr>
}
</table>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment