-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Related to #9991
JwtDecoders
and ReactiveJwtDecoders
instantiate a RemoteJWKSet
in order to discover reasonable defaults for the JWS algorithms a resource server should accept. NimbusJwtDecoder
and NimbusReactiveJwtDecoder
both instantiate a JWK source as well in order to collect the keys needed to verify JWT signatures.
It would be nice if these shared the same instance. If so, then once JwtDecoders
makes a query for the JWK Set, it's already cached for future decode requests.
This is especially nice with the introduction of SupplierJwtDecoder
, which lazily loads the NimbusJwtDecoder
. Without this proposed optimization, using SupplierJwtDecoder
and JwtDecoders
together would mean that the first decode request would experience three HTTP calls instead of two.