Browse Source

feat(session): add session_id claim type in the IDS module

pull/987/head
colin 1 year ago
parent
commit
ca7110cd6b
  1. 7
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Session/LINGYUN/Abp/IdentityServer/Session/AbpIdentityServerSessionModule.cs
  2. 4
      aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json
  3. 4
      aspnet-core/services/LY.MicroService.IdentityServer/appsettings.Development.json

7
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 LINGYUN.Abp.Identity.Session;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.IdentityServer;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.Security.Claims;
namespace LINGYUN.Abp.IdentityServer.Session; namespace LINGYUN.Abp.IdentityServer.Session;
@ -20,6 +22,11 @@ public class AbpIdentityServerSessionModule : AbpModule
options.EventServiceHandlers.Add<AbpIdentitySessionEventServiceHandler>(); options.EventServiceHandlers.Add<AbpIdentitySessionEventServiceHandler>();
}); });
Configure<AbpClaimsServiceOptions>(options =>
{
options.RequestedClaims.Add(AbpClaimTypes.SessionId);
});
Configure<IdentitySessionSignInOptions>(options => Configure<IdentitySessionSignInOptions>(options =>
{ {
// UserLoginSuccessEvent由IdentityServer发布, 无需显式保存会话 // UserLoginSuccessEvent由IdentityServer发布, 无需显式保存会话

4
aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json

@ -88,7 +88,9 @@
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://127.0.0.1:44385/",
"ApiName": "lingyun-abp-application" "Audience": "lingyun-abp-application",
"MapInboundClaims": false,
"RequireHttpsMetadata": false
}, },
"OpenIddict": { "OpenIddict": {
"Applications": { "Applications": {

4
aspnet-core/services/LY.MicroService.IdentityServer/appsettings.Development.json

@ -88,7 +88,9 @@
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://127.0.0.1:44385/", "Authority": "http://127.0.0.1:44385/",
"ApiName": "lingyun-abp-application" "Audience": "lingyun-abp-application",
"MapInboundClaims": false,
"RequireHttpsMetadata": false
}, },
"IdentityServer": { "IdentityServer": {
"Clients": { "Clients": {

Loading…
Cancel
Save