Skip to content

Commit

Permalink
fix(openiddict): rename AbpOpenIddictClaimsPrincipalManager
Browse files Browse the repository at this point in the history
  • Loading branch information
colinin committed Aug 10, 2023
1 parent 78e169a commit 1d6d62a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class PortalTokenExtensionGrant : ITokenExtensionGrant
protected SignInManager<IdentityUser> SignInManager => LazyServiceProvider.LazyGetRequiredService<SignInManager<IdentityUser>>();
protected IdentityUserManager UserManager => LazyServiceProvider.LazyGetRequiredService<IdentityUserManager>();
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 ILogger Logger => LazyServiceProvider.LazyGetService<ILogger>(provider => LoggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance);
protected IServiceScopeFactory ServiceScopeFactory => LazyServiceProvider.LazyGetRequiredService<IServiceScopeFactory>();
Expand Down Expand Up @@ -269,7 +269,7 @@ protected virtual async Task<IActionResult> 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
Expand Down Expand Up @@ -314,9 +314,9 @@ protected virtual async Task<IEnumerable<string>> 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)
Expand Down

0 comments on commit 1d6d62a

Please sign in to comment.