Add preemptive refresh of JWKSource cache

Issue #456 invalid
Dmitrii Semenov created an issue

Recently, there was added a nice feature to refresh a JWKSet before it’s cache expiration, RefreshAheadCachingJWKSetSource.

However, it is still missing one nice feature - is to fetch preemptively a JWKSet before the first request coming in. As of now, it will only do it on the first request, causing first bunch of requests to be processed slowly, since they would be blocked by a process of fetching a JWKSet. This is however can be easily fixed, since we have already an executor to refresh JWKSets.

Would you consider adding such a feature?

Comments (2)

  1. Vladimir Dzhuvinov

    Hello Dmitrii,

    You may want to post this issue in the Nimbus JOSE+JWT lib issues here:

    https://bitbucket.org/connect2id/nimbus-jose-jwt/issues

    This tracker is for the OAuth / OIDC SDK related issues.

    As for the proposed feature, feel free to make a pull request (also there) and I will ask the original contributor, Thomas, to review it. Please, make sure the feature is locked with a test.

  2. Log in to comment