mirror of https://github.com/abpframework/abp.git
6 changed files with 70 additions and 10 deletions
@ -0,0 +1,23 @@ |
|||||
|
@page |
||||
|
@using Volo.Abp.Users |
||||
|
@model AuthServer.Host.Pages.IndexModel |
||||
|
@inject ICurrentUser CurrentUser |
||||
|
<h1>Running the <strong>AuthServer.Host</strong> application!</h1> |
||||
|
<h2>Current User</h2> |
||||
|
<ul> |
||||
|
<li>IsAuthenticated: @CurrentUser.IsAuthenticated</li> |
||||
|
<li>UserName: @CurrentUser.UserName</li> |
||||
|
<li>Email: @CurrentUser.Email</li> |
||||
|
<li>Roles: @CurrentUser.Roles.JoinAsString(", ")</li> |
||||
|
@*<li>Claims: @CurrentUser.GetAllClaims().Select(c => $"{c.Type}={c.Value}").JoinAsString(" | ")</li>*@ |
||||
|
<li>TenantId: @CurrentUser.TenantId</li> |
||||
|
</ul> |
||||
|
|
||||
|
@if (CurrentUser.IsAuthenticated) |
||||
|
{ |
||||
|
<a abp-button="Primary" asp-controller="Logout" asp-action="Index" asp-area="Account">Logout</a> |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
<a abp-button="Primary" asp-page="/Account/Login">Login</a> |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc.RazorPages; |
||||
|
|
||||
|
namespace AuthServer.Host.Pages |
||||
|
{ |
||||
|
public class IndexModel : PageModel |
||||
|
{ |
||||
|
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