7 changed files with 61 additions and 2 deletions
@ -0,0 +1,34 @@ |
|||||
|
@page |
||||
|
@using AuthServer.Host.Pages |
||||
|
@using Volo.Abp.Users |
||||
|
@model IndexModel |
||||
|
@inject ICurrentUser CurrentUser |
||||
|
@if (CurrentUser.IsAuthenticated) |
||||
|
{ |
||||
|
<div> |
||||
|
<abp-row> |
||||
|
<abp-column size-md="_3" class="text-center"> |
||||
|
<i class="fa fa-user d-block" style="font-size: 10em; color: #12b900"></i> |
||||
|
<a abp-button="Primary" href="/Account/Logout">Logout</a> |
||||
|
</abp-column> |
||||
|
<abp-column size-md="_9"> |
||||
|
<h2>@CurrentUser.UserName</h2> |
||||
|
<h5 class="text-muted">@CurrentUser.Email</h5> |
||||
|
<div> |
||||
|
<strong>Roles</strong>: @CurrentUser.Roles.JoinAsString(", ") |
||||
|
<br /> |
||||
|
<strong>Claims</strong>: <br /> |
||||
|
@Html.Raw(CurrentUser.GetAllClaims().Select(c => $"{c.Type}={c.Value}").JoinAsString(" <br /> ")) |
||||
|
</div> |
||||
|
</abp-column> |
||||
|
</abp-row> |
||||
|
</div> |
||||
|
} |
||||
|
|
||||
|
@if (!CurrentUser.IsAuthenticated) |
||||
|
{ |
||||
|
<div class="text-center"> |
||||
|
<i class="fa fa-user d-block" style="font-size: 10em; color: #aaa"></i><br /><br /> |
||||
|
<a abp-button="Primary" asp-page="/Account/Login">Login</a> |
||||
|
</div> |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; |
||||
|
|
||||
|
namespace AuthServer.Host.Pages |
||||
|
{ |
||||
|
public class IndexModel : AbpPageModel |
||||
|
{ |
||||
|
public void OnGet() |
||||
|
{ |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,4 @@ |
|||||
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers |
||||
|
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI |
||||
|
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap |
||||
|
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling |
||||
Loading…
Reference in new issue