Browse Source

auth-server adds the default ui theme

pull/71/head
cKey 5 years ago
parent
commit
e072d1bde8
  1. 2
      aspnet-core/LINGYUN.MicroService.sln
  2. 2
      aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/IAccountAppService.cs
  3. 7
      aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs
  4. 3
      aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj
  5. 34
      aspnet-core/services/account/AuthServer.Host/Pages/Index.cshtml
  6. 11
      aspnet-core/services/account/AuthServer.Host/Pages/Index.cshtml.cs
  7. 4
      aspnet-core/services/account/AuthServer.Host/Pages/_ViewImports.cshtml

2
aspnet-core/LINGYUN.MicroService.sln

@ -213,7 +213,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Domain
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.EntityFrameworkCore", "modules\identity\LINGYUN.Abp.Identity.EntityFrameworkCore\LINGYUN.Abp.Identity.EntityFrameworkCore.csproj", "{6FE7E243-2D99-4567-8786-6C9283D608EF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Domain.Entities.Events", "modules\common\LINGYUN.Abp.Domain.Entities.Events\LINGYUN.Abp.Domain.Entities.Events.csproj", "{AAD8EF65-1FBF-4F3F-8B33-8B76E1EBA4A5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Domain.Entities.Events", "modules\common\LINGYUN.Abp.Domain.Entities.Events\LINGYUN.Abp.Domain.Entities.Events.csproj", "{AAD8EF65-1FBF-4F3F-8B33-8B76E1EBA4A5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

2
aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/IAccountAppService.cs

@ -10,7 +10,7 @@ namespace LINGYUN.Abp.Account
Task<IdentityUserDto> RegisterAsync(WeChatRegisterDto input);
Task ResetPasswordAsync(PasswordResetDto passwordReset);
Task ResetPasswordAsync(PasswordResetDto input);
Task VerifyPhoneNumberAsync(VerifyDto input);
}

7
aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs

@ -16,7 +16,10 @@ using System;
using System.Linq;
using System.Text;
using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.Auditing;
using Volo.Abp.Autofac;
using Volo.Abp.Caching;
@ -48,6 +51,9 @@ namespace AuthServer.Host
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpIdentityServerSmsValidatorModule),
typeof(AbpIdentityServerWeChatValidatorModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountWebIdentityServerModule),
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityServerEntityFrameworkCoreModule),
@ -182,6 +188,7 @@ namespace AuthServer.Host
app.UseMultiTenancy();
app.UseIdentityServer();
app.UseAuditing();
app.UseConfiguredEndpoints();
if (context.GetEnvironment().IsDevelopment())
{

3
aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj

@ -20,6 +20,9 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.Account.Application" Version="3.0.0" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="3.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="3.0.0" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="3.0.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.0" />
<PackageReference Include="Volo.Abp.Identity.AspNetCore" Version="3.0.0" />

34
aspnet-core/services/account/AuthServer.Host/Pages/Index.cshtml

@ -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>
}

11
aspnet-core/services/account/AuthServer.Host/Pages/Index.cshtml.cs

@ -0,0 +1,11 @@
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace AuthServer.Host.Pages
{
public class IndexModel : AbpPageModel
{
public void OnGet()
{
}
}
}

4
aspnet-core/services/account/AuthServer.Host/Pages/_ViewImports.cshtml

@ -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…
Cancel
Save