Class JWKOpenIdResolverImpl

java.lang.Object
org.forgerock.oauth.resolvers.BaseOpenIdResolver
org.forgerock.oauth.resolvers.JWKOpenIdResolverImpl
All Implemented Interfaces:
GenericOpenIdResolver<SignedJwt>, OpenIdResolver

public class JWKOpenIdResolverImpl extends BaseOpenIdResolver
This class exists to allow Open Id Providers to supply or promote a JWK exposure point for their public keys. We convert the exposed keys they provide according to the algorithm defined by their JWK and offer their keys in a map key'd on their keyId. The map of keys is loaded on construction, and reloaded each time an Open Id token is passed in to this resolver whose keyId does not exist within the list that we currently have. This means that we will cache the keys for as long as they are valid, and as soon as we receive a request to verify using a key which we don't have we discard our current keys and re-fill our map.