@model string
@if (User?.Identity is { IsAuthenticated: true }) {

Welcome, @User.Identity.Name

@foreach (var claim in Context.User.Claims) {

@claim.Type: @claim.Value
}

if (!string.IsNullOrEmpty(Model)) {

Message received from the resource controller: @Model

}
Sign out } else {

Welcome, anonymous

Sign in }