-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description
Based on #46644.
Right now, when the token expires, OIDC client needs to refresh it, with the current request having to wait.
In general, I believe it is not a real performance concern because it can happen once every access token lifespan period of time which is usually quite long. But if it were possible for the OIDC client never pause, with the timer refreshing expired tokens asynchronously, then it could be useful in some performance critical applications.
We already have something similar with @michalvavrik adding a timed Kubernetes JWT bearer token check.
Implementation ideas
Add an optional property such as quarkus.oidc-client.refresh-interval
, it is configured, a Vertx timer is started, may be in AbstractTokensProducer and it will periodically call getTokens
and subscribe to Uni. May be, rather than having a timer per client, OidcClientsImpl
would have a single timer iterating over all registered clients.