@if (User?.Identity is { IsAuthenticated: true })
{
Welcome, @User.Identity.Name
@foreach (var claim in ((ClaimsPrincipal) Context.User).Claims)
{
@claim.Type: @claim.Value
}
if (!string.IsNullOrEmpty(Model))
{
Message received from the resource controller: @Model
}
if (User is ClaimsPrincipal principal &&
principal.FindFirst(ClaimTypes.NameIdentifier)?.Issuer is "https://localhost:44349/")
{
}
}
else
{
Welcome, anonymous
}