forked from abpframework/abp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
70 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
samples/MicroserviceDemo/applications/authserver/AuthServer.Host/Pages/Index.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
} |
11 changes: 11 additions & 0 deletions
11
samples/MicroserviceDemo/applications/authserver/AuthServer.Host/Pages/Index.cshtml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
|
||
namespace AuthServer.Host.Pages | ||
{ | ||
public class IndexModel : PageModel | ||
{ | ||
public void OnGet() | ||
{ | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
samples/MicroserviceDemo/applications/authserver/AuthServer.Host/Pages/_ViewImports.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |