Browse Source

Merge pull request #859 from colinin/fix-openiddict

fix(openiddict): rename AbpOpenIddictClaimsPrincipalManager
pull/860/head
yx lin 2 years ago
committed by GitHub
parent
commit
4ff0c71f8f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Portal/LINGYUN/Abp/OpenIddict/Portal/PortalTokenExtensionGrant.cs

8
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Portal/LINGYUN/Abp/OpenIddict/Portal/PortalTokenExtensionGrant.cs

@ -38,7 +38,7 @@ public class PortalTokenExtensionGrant : ITokenExtensionGrant
protected SignInManager<IdentityUser> SignInManager => LazyServiceProvider.LazyGetRequiredService<SignInManager<IdentityUser>>(); protected SignInManager<IdentityUser> SignInManager => LazyServiceProvider.LazyGetRequiredService<SignInManager<IdentityUser>>();
protected IdentityUserManager UserManager => LazyServiceProvider.LazyGetRequiredService<IdentityUserManager>(); protected IdentityUserManager UserManager => LazyServiceProvider.LazyGetRequiredService<IdentityUserManager>();
protected IOpenIddictScopeManager ScopeManager => LazyServiceProvider.LazyGetRequiredService<IOpenIddictScopeManager>(); protected IOpenIddictScopeManager ScopeManager => LazyServiceProvider.LazyGetRequiredService<IOpenIddictScopeManager>();
protected AbpOpenIddictClaimDestinationsManager OpenIddictClaimDestinationsManager => LazyServiceProvider.LazyGetRequiredService<AbpOpenIddictClaimDestinationsManager>(); protected AbpOpenIddictClaimsPrincipalManager OpenIddictClaimsPrincipalManager => LazyServiceProvider.LazyGetRequiredService<AbpOpenIddictClaimsPrincipalManager>();
protected ILoggerFactory LoggerFactory => LazyServiceProvider.LazyGetRequiredService<ILoggerFactory>(); protected ILoggerFactory LoggerFactory => LazyServiceProvider.LazyGetRequiredService<ILoggerFactory>();
protected ILogger Logger => LazyServiceProvider.LazyGetService<ILogger>(provider => LoggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance); protected ILogger Logger => LazyServiceProvider.LazyGetService<ILogger>(provider => LoggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance);
protected IServiceScopeFactory ServiceScopeFactory => LazyServiceProvider.LazyGetRequiredService<IServiceScopeFactory>(); protected IServiceScopeFactory ServiceScopeFactory => LazyServiceProvider.LazyGetRequiredService<IServiceScopeFactory>();
@ -269,7 +269,7 @@ public class PortalTokenExtensionGrant : ITokenExtensionGrant
principal.SetScopes(context.Request.GetScopes()); principal.SetScopes(context.Request.GetScopes());
principal.SetResources(await GetResourcesAsync(context.Request.GetScopes())); principal.SetResources(await GetResourcesAsync(context.Request.GetScopes()));
await SetClaimsDestinationsAsync(principal); await SetClaimsDestinationsAsync(context, principal);
await IdentitySecurityLogManager.SaveAsync( await IdentitySecurityLogManager.SaveAsync(
new IdentitySecurityLogContext new IdentitySecurityLogContext
@ -314,9 +314,9 @@ public class PortalTokenExtensionGrant : ITokenExtensionGrant
return resources; 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) public virtual ForbidResult Forbid(AuthenticationProperties properties, params string[] authenticationSchemes)

Loading…
Cancel
Save