get more claims

This commit is contained in:
Paul Schneider 2025-02-09 16:57:10 +00:00
commit 3df1c1b14d
7 changed files with 135 additions and 169 deletions

View file

@ -4,26 +4,6 @@
}
@using Microsoft.AspNetCore.Authentication
<h2>Claims</h2>
<dl>
@foreach (var claim in User.Claims)
{
<dt>@claim.Type</dt>
<dd>@claim.Value</dd>
}
</dl>
<h2>Properties</h2>
<dl>
@foreach (var prop in (await Context.AuthenticateAsync()).Properties.Items)
{
<dt>@prop.Key</dt>
<dd>@prop.Value</dd>
}
</dl>
<div class="jumbotron">
@if (User?.Identity?.IsAuthenticated ?? false) {
<h1>Welcome, @User.Identity.Name</h1>
@ -57,25 +37,3 @@
<a class="btn btn-lg btn-success" href="/signin">Sign in</a>
}
</div>
<h2>Claims</h2>
<dl>
@foreach (var claim in User.Claims)
{
<dt>@claim.Type</dt>
<dd>@claim.Value</dd>
}
</dl>
<h2>Properties</h2>
<dl>
@foreach (var prop in (await Context.AuthenticateAsync()).Properties.Items)
{
<dt>@prop.Key</dt>
<dd>@prop.Value</dd>
}
</dl>