Open Closed

SetAccessTokenLifetime, SetRefreshTokenLifetime - per application #4257


User avatar
0
mgurer created
  • ABP Framework version: v6.0.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"Hi, I am using microservices pro template and upgraded my project to use openiddict. I want to be able to set different token expiration values for each open-id application when using client-credentials flow. Some global values are set in auth-server/*module.cs but it is not suitable for my case. Here there is a suggested solution, but I cant figure out where to implement it; https://stackoverflow.com/questions/42442109/is-there-a-way-to-have-different-ticket-expiry-lengths-in-openiddict . I will be glad if you have any suggestions. Thanks.

1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Override the HandleClientCredentialsAsync method.

    https://github.com/abpframework/abp/blob/f39082e98d0ce73e2ad3f06f4cc9c24c253cfeee/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.ClientCredentials.cs#L15

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35