From 673c9a030e349a00696f0f8c17feaccc872e3c1f Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 11 Aug 2024 11:11:53 +0800 Subject: [PATCH] Remove `AbpDynamicClaimsOpenIddictClaimsPrincipalHandler`. --- .../AbpOpenIddictAspNetCoreModule.cs | 1 - ...cClaimsOpenIddictClaimsPrincipalHandler.cs | 24 ------------------- 2 files changed, 25 deletions(-) delete mode 100644 modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Claims/AbpDynamicClaimsOpenIddictClaimsPrincipalHandler.cs diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictAspNetCoreModule.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictAspNetCoreModule.cs index 2b890c60672..23f41900b50 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictAspNetCoreModule.cs +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictAspNetCoreModule.cs @@ -24,7 +24,6 @@ public override void ConfigureServices(ServiceConfigurationContext context) Configure(options => { - options.ClaimsPrincipalHandlers.Add(); options.ClaimsPrincipalHandlers.Add(); }); diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Claims/AbpDynamicClaimsOpenIddictClaimsPrincipalHandler.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Claims/AbpDynamicClaimsOpenIddictClaimsPrincipalHandler.cs deleted file mode 100644 index 8fcadcff5c1..00000000000 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Claims/AbpDynamicClaimsOpenIddictClaimsPrincipalHandler.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.Extensions.DependencyInjection; -using OpenIddict.Abstractions; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Security.Claims; - -namespace Volo.Abp.OpenIddict; - -public class AbpDynamicClaimsOpenIddictClaimsPrincipalHandler: IAbpOpenIddictClaimsPrincipalHandler, ITransientDependency -{ - public virtual async Task HandleAsync(AbpOpenIddictClaimsPrincipalHandlerContext context) - { - if (context.OpenIddictRequest.IsClientCredentialsGrantType()) - { - return; - } - - var abpClaimsPrincipalFactory = context - .ScopeServiceProvider - .GetRequiredService(); - - await abpClaimsPrincipalFactory.CreateDynamicAsync(context.Principal); - } -}