这是基于vue-vben-admin 模板适用于abp vNext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

50 lines
1.8 KiB

using IdentityServer4.Validation;
using LINGYUN.Abp.Account.Web.IdentityServer.Handlers;
using LINGYUN.Abp.Account.Web.IdentityServer.Services;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.IdentityServer;
using Volo.Abp.Modularity;
using Volo.Abp.Security.Claims;
using Volo.Abp.VirtualFileSystem;
using VoloAbpAccountWebIdentityServerModule = Volo.Abp.Account.Web.AbpAccountWebIdentityServerModule;
namespace LINGYUN.Abp.Account.Web.IdentityServer;
[DependsOn(
typeof(AbpAccountWebModule),
typeof(VoloAbpAccountWebIdentityServerModule))]
public class AbpAccountWebIdentityServerModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IMvcBuilder>(mvcBuilder =>
{
mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpAccountWebIdentityServerModule).Assembly);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpAccountWebIdentityServerModule>();
});
//Configure<AbpIdentityServerEventOptions>(options =>
//{
// options.EventServiceHandlers.Add<AbpIdentitySessionEventServiceHandler>();
//});
Configure<AbpClaimsServiceOptions>(options =>
{
options.RequestedClaims.Add(AbpClaimTypes.SessionId);
});
context.Services.Replace(
ServiceDescriptor.Transient<IUserInfoRequestValidator, AbpIdentitySessionUserInfoRequestValidator>());
context.Services.Replace(
ServiceDescriptor.Transient<IAuthenticationService, IdentityServerSessionAuthenticationService>());
}
}