diff --git a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Portal/LINGYUN/Abp/OpenIddict/Portal/PortalTokenExtensionGrant.cs b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Portal/LINGYUN/Abp/OpenIddict/Portal/PortalTokenExtensionGrant.cs index d5ad99978..b5d9180e0 100644 --- a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Portal/LINGYUN/Abp/OpenIddict/Portal/PortalTokenExtensionGrant.cs +++ b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Portal/LINGYUN/Abp/OpenIddict/Portal/PortalTokenExtensionGrant.cs @@ -38,7 +38,7 @@ public class PortalTokenExtensionGrant : ITokenExtensionGrant protected SignInManager SignInManager => LazyServiceProvider.LazyGetRequiredService>(); protected IdentityUserManager UserManager => LazyServiceProvider.LazyGetRequiredService(); protected IOpenIddictScopeManager ScopeManager => LazyServiceProvider.LazyGetRequiredService(); - protected AbpOpenIddictClaimDestinationsManager OpenIddictClaimDestinationsManager => LazyServiceProvider.LazyGetRequiredService(); + protected AbpOpenIddictClaimsPrincipalManager OpenIddictClaimsPrincipalManager => LazyServiceProvider.LazyGetRequiredService(); protected ILoggerFactory LoggerFactory => LazyServiceProvider.LazyGetRequiredService(); protected ILogger Logger => LazyServiceProvider.LazyGetService(provider => LoggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance); protected IServiceScopeFactory ServiceScopeFactory => LazyServiceProvider.LazyGetRequiredService(); @@ -269,7 +269,7 @@ protected virtual async Task SetSuccessResultAsync(ExtensionGrant principal.SetScopes(context.Request.GetScopes()); principal.SetResources(await GetResourcesAsync(context.Request.GetScopes())); - await SetClaimsDestinationsAsync(principal); + await SetClaimsDestinationsAsync(context, principal); await IdentitySecurityLogManager.SaveAsync( new IdentitySecurityLogContext @@ -314,9 +314,9 @@ protected virtual async Task> GetResourcesAsync(ImmutableArr return resources; } - protected virtual async Task SetClaimsDestinationsAsync(ClaimsPrincipal principal) + protected virtual async Task SetClaimsDestinationsAsync(ExtensionGrantContext context, ClaimsPrincipal principal) { - await OpenIddictClaimDestinationsManager.SetAsync(principal); + await OpenIddictClaimsPrincipalManager.HandleAsync(context.Request, principal); } public virtual ForbidResult Forbid(AuthenticationProperties properties, params string[] authenticationSchemes)