Cache store interface for the new JWKSourceBuilder
It seems that in latest version 9.29 the RemoteJWKSet
and DefaultJWKSetCache
classes have been deprecated.
Replaced with JWKSourceBuilder
and setting the caching, retrying mechanisms there.
Here is my issue, before this deprecation i was extending the DefaultJWKSetCache
and overridding the put
function to save and retrieve saved JWK keysets from sharedpreference in Android.
With the deprecation of RemoteJWKSet
and DefaultJWKSetCache
, how can I save and retrieve a cached keyset from sharedpreferences with these new apis?
Or rather how do i supply my own cache implementation to the JWKSourceBuilder
?
Comments (3)
-
-
- changed title to Cache store interface for the new JWKSourceBuilder
Changed title
-
Fortunately there is already a
CachedObject
abstraction, what seems to be missing is an interface for its storage (rather than simply instantiating it as a variable). - Log in to comment
At present there is no simple way to provide your own store for cached JWK sets.
Would you be interested in working on this and suggesting a PR?
The deprecated classes will be around for a long time, so it’s okay to continue using them.
BTW, here is a guide for how to use the new facility.
https://connect2id.com/products/nimbus-jose-jwt/examples/enhanced-jwk-retrieval