spring-projects / spring-projects/spring-security
Provide a way for OAuth2 Resource server to cache the given tokens during the token lifetime
@jzheaux is already working on this.
Since Mar 6, 2023.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Expected Behavior
The OAuth2 Resource server should have a way to cache tokens (such as JWT) to avoid validating the tokens for every requests.
Current Behavior
Currently, there is no way to cache the tokens which has some life time (or expiry).
Context
We are using OAuth2 for server to server authorization/authentication. Our authorization server leverages JWT type of access token and it has a limited life time. So, for accessing target server, the caller should get the token from Authorization server and it uses that token during the token lifetime. Currently, the Spring OAuth2 client has a way to cache the token for a given life time, for OAuth2 resource server, there is no way to set such configuration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.