0
vitalii-rudkin created
- ABP Framework version: v7.2.2
- UI Type: Angular
- Database System: EF Core (PostgreSQL)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
Hi, Abp team
By reading this article (https://community.abp.io/posts/how-to-add-a-custom-grant-type-in-openiddict.-6v0df94z), I encountered the following question: Can we set a custom expiration time for access tokens only for certain grant types in OpenIddict? Or perhaps there are other tools available to achieve this, or does it require implementing another handler for it?
Best regards, Vitalii Rudkin
1 Answer(s)
-
0
Hi,
You can try:
..... claimsPrincipal.SetAccessTokenLifetime() // set access token lifetime .... await context.HttpContext.RequestServices.GetRequiredService<AbpOpenIddictClaimsPrincipalManager>().HandleAsync(context.Request, principal); return new SignInResult(OpenIddictServerAspNetCoreDefaults.AuthenticationScheme, claimsPrincipal);