From ca7110cd6b0a77bf8ad17c3e663f09539daef709 Mon Sep 17 00:00:00 2001 From: colin Date: Mon, 12 Aug 2024 18:48:50 +0800 Subject: [PATCH] feat(session): add session_id claim type in the IDS module --- .../Session/AbpIdentityServerSessionModule.cs | 7 +++++++ .../appsettings.Development.json | 4 +++- .../appsettings.Development.json | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Session/LINGYUN/Abp/IdentityServer/Session/AbpIdentityServerSessionModule.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Session/LINGYUN/Abp/IdentityServer/Session/AbpIdentityServerSessionModule.cs index bd0abe656..9c9506742 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Session/LINGYUN/Abp/IdentityServer/Session/AbpIdentityServerSessionModule.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Session/LINGYUN/Abp/IdentityServer/Session/AbpIdentityServerSessionModule.cs @@ -3,7 +3,9 @@ using LINGYUN.Abp.Identity; using LINGYUN.Abp.Identity.Session; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; +using Volo.Abp.IdentityServer; using Volo.Abp.Modularity; +using Volo.Abp.Security.Claims; namespace LINGYUN.Abp.IdentityServer.Session; @@ -20,6 +22,11 @@ public class AbpIdentityServerSessionModule : AbpModule options.EventServiceHandlers.Add(); }); + Configure(options => + { + options.RequestedClaims.Add(AbpClaimTypes.SessionId); + }); + Configure(options => { // UserLoginSuccessEvent由IdentityServer发布, 无需显式保存会话 diff --git a/aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json b/aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json index 37f17dbb3..5934155fe 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json +++ b/aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json @@ -88,7 +88,9 @@ }, "AuthServer": { "Authority": "http://127.0.0.1:44385/", - "ApiName": "lingyun-abp-application" + "Audience": "lingyun-abp-application", + "MapInboundClaims": false, + "RequireHttpsMetadata": false }, "OpenIddict": { "Applications": { diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/appsettings.Development.json b/aspnet-core/services/LY.MicroService.IdentityServer/appsettings.Development.json index a87831cdc..4e7fbafda 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/appsettings.Development.json +++ b/aspnet-core/services/LY.MicroService.IdentityServer/appsettings.Development.json @@ -88,7 +88,9 @@ }, "AuthServer": { "Authority": "http://127.0.0.1:44385/", - "ApiName": "lingyun-abp-application" + "Audience": "lingyun-abp-application", + "MapInboundClaims": false, + "RequireHttpsMetadata": false }, "IdentityServer": { "Clients": {