All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 6m17s
23 lines
782 B
Plaintext
23 lines
782 B
Plaintext
@using System.Security.Claims
|
|
<AuthorizeView>
|
|
<Authorized Context="authContext">
|
|
<div class="d-flex justify-content-end align-items-center gap-3 px-3 py-2">
|
|
<span class="fw-bold text-dark">
|
|
Bienvenido, @GetUserDisplayName(authContext.User)
|
|
</span>
|
|
<a href="Logout" class="btn btn-sm btn-danger rounded-3 d-flex align-items-center gap-1 text-decoration-none">
|
|
<i class="oi oi-account-logout"></i>
|
|
<span>Cerrar sesión</span>
|
|
</a>
|
|
</div>
|
|
</Authorized>
|
|
</AuthorizeView>
|
|
@code {
|
|
private string GetUserDisplayName(ClaimsPrincipal user)
|
|
{
|
|
return user.FindFirst("fullName")?.Value
|
|
?? user.Identity?.Name
|
|
?? "Usuario";
|
|
}
|
|
}
|