Search code examples
spring-authorization-server

how to add expire to a consent in spring-authorization-server?


when I agreed to an authorization,I never need to re authorize.

I want it will be valid for a period of time(like one month).

How to achieve it?


Solution

  • One way to achieve this would to be implement a custom OAuth2AuthorizationConsentService that stores the consent in Redis with a TTL (time-to-live).