@using Microsoft.AspNetCore.Authentication @{ ViewData["Title"] = "Home Page"; }
@if (User?.Identity?.IsAuthenticated ?? false) {

Welcome, @User.Identity.Name

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

@claim.Type: @claim.Value
}

if (Model!=null) {

Message received from the resource controller: @Model

}
Envoyer vers le dossier "test"
Sign out } else {

Welcome, anonymous

Sign in }

Claims

@foreach (var claim in User.Claims) {
@claim.Type
@claim.Value
}

Properties

@foreach (var prop in (await Context.AuthenticateAsync()).Properties.Items) {
@prop.Key
@prop.Value
}