Files
2021-08-24 16:08:10 +02:00

29 lines
689 B
Plaintext

@page "/"
@attribute [AllowAnonymous]
<h1>Hello, world!</h1>
Welcome to your new app.
<AuthorizeView>
<Authorized>
<div class="alert alert-success">
<h4>Hello, @context.User.Identity.Name!</h4>
<p>This content is only visible if user is authenticated.</p>
</div>
<ul>
@foreach (var claim in context.User.Claims)
{
<li><b>@claim.Type</b>: @claim.Value</li>
}
</ul>
</Authorized>
<NotAuthorized>
<div class="alert alert-warning">
<h4>Utente anonimo</h4>
<p>Please signed in.</p>
</div>
</NotAuthorized>
</AuthorizeView>