-
Notifications
You must be signed in to change notification settings - Fork 583
Add caching for client credentials token #10430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Caches the token to improve performance. Closes helidon-io#10422.
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
Thank you for signing the OCA. |
Hi @botsteve, I’ve opened a PR for the issue. Please review it when you get a chance and let me know if any changes are needed. Thanks! |
Hi @spericas, when you have a moment, could you please review this PR for me? Thanks! |
Hi @spericas, resolved checkstyle errors, could you please approve the workflow. |
Please try to avoid (re)formatting code that you aren't modifying. |
Hi @romain-grecourt, I've addressed the bugs which were causing the build checks to fail. When you have some time, I’d appreciate it if you could review the latest changes. Thanks! |
Closes the issue #10422
This PR introduces a thread-safe, in-memory cache for the OIDC client credentials access token.
Previously, a new token was fetched via a network call for every protected outbound request, causing unnecessary latency. This change implements a double-checked locking pattern to ensure a token is fetched only when the cached one is missing or expired.