Package uk.co.spudsoft.jwtvalidatorvertx
Interface JsonWebKeySetHandler
- All Known Subinterfaces:
JsonWebKeySetKnownJwksHandler
,JsonWebKeySetOpenIdDiscoveryHandler
- All Known Implementing Classes:
JWKSOpenIdDiscoveryHandlerImpl
,JWKSStaticSetHandlerImpl
public interface JsonWebKeySetHandler
Perform OpenID Connect discovery as per openid-connect-discovery-1_0.
- Author:
- jtalbut
-
Method Summary
-
Method Details
-
optimize
void optimize()Perform whatever initialization is required to get this handler working.This is primarily intended to provide the opportunity for handlers to preload JWKs. It shouldn't matter whether or not the preload has completed, hence this method returns void and it is expected that processing continues in the background.
-
findJwk
Find a JWK for the given issuer and kid. A specific implementation of JsonWebKeySetHandler will either require the issuer to be null, or not null. The issuer should never be extracted from the payload of a JWT for the purpose of finding the JWK. If the client has a mechanism for knowing the issuer of the token it can work with a greater number of issuers, if the client is not able to determine the issuer for a token (before validation) then it must maintain a cache of the keys for all known JWK sets.- Parameters:
issuer
- the issuer of the JWT (and JWK).kid
- The key ID being sought.- Returns:
- A Future that will be completed with a JWK.
-