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(mvcBuilder => { mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpAccountWebIdentityServerModule).Assembly); }); } public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => { options.FileSets.AddEmbedded(); }); //Configure(options => //{ // options.EventServiceHandlers.Add(); //}); Configure(options => { options.RequestedClaims.Add(AbpClaimTypes.SessionId); }); context.Services.Replace( ServiceDescriptor.Transient()); context.Services.Replace( ServiceDescriptor.Transient()); } }