Repository navigation
Conversation
Hakaou
marked this pull request as ready for review
December 2, 2026 20:29
Callers that need a token right before a request had to call `updateToken()` and then read the `token` property. `getToken()` does both and rejects when no token is set afterwards. Closes keycloak#18 Signed-off-by: Hakaou <akaou.hassan@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the on-demand
getToken()sketched in #18. My use case is an HTTP interceptor that needs a token for every request.Decisions:
getToken()takes no argument and relies on the default window ofupdateToken().updateToken()does, even while the access token is still valid.Not authenticatedwhen no token is set after the refresh.Not in this PR:
refreshStrategyoption from the sketch.getToken()test with DPoP enabled.An AI agent wrote the code and the tests under my direction.
Closes #18