maliming
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
docs/en/Community-Articles/2022-11-14-How-to-add-a-custom-grant-type-in-OpenIddict/POST.md
|
|
|
@ -73,10 +73,10 @@ public class MyTokenExtensionGrant : ITokenExtensionGrant |
|
|
|
claimsPrincipal.SetResources(await GetResourcesAsync(context, principal.GetScopes())); |
|
|
|
|
|
|
|
//abp version < 7.3 |
|
|
|
await context.HttpContext.RequestServices.GetRequiredService<AbpOpenIddictClaimDestinationsManager>().SetAsync(principal); |
|
|
|
await context.HttpContext.RequestServices.GetRequiredService<AbpOpenIddictClaimDestinationsManager>().SetAsync(claimsPrincipal); |
|
|
|
|
|
|
|
//For abp version >= 7.3 |
|
|
|
await context.HttpContext.RequestServices.GetRequiredService<AbpOpenIddictClaimsPrincipalManager>().HandleAsync(context.Request, principal); |
|
|
|
await context.HttpContext.RequestServices.GetRequiredService<AbpOpenIddictClaimsPrincipalManager>().HandleAsync(context.Request, claimsPrincipal); |
|
|
|
|
|
|
|
return new SignInResult(OpenIddictServerAspNetCoreDefaults.AuthenticationScheme, claimsPrincipal); |
|
|
|
} |
|
|
|
|