public final class JkuVerificationKeyResolver extends Object implements CloseableVerificationKeyResolver
AsyncHttpsJwksVerificationKeyResolver
and
uses it for key verification.Constructor and Description |
---|
JkuVerificationKeyResolver(Collection<String> domainWhitelist) |
JkuVerificationKeyResolver(Collection<String> domainWhitelist,
boolean unsafeAllowed) |
JkuVerificationKeyResolver(Function<String,AsyncHttpsJwks> httpsJwksSupplier,
Collection<String> domainWhitelist,
boolean disambiguateKey,
boolean unsafeAllowed) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static boolean |
hasValidJkuDomain(Collection<String> domainWhitelist,
String requiredProtocol,
String jku) |
Key |
resolveKey(org.jose4j.jws.JsonWebSignature jws,
List<org.jose4j.jwx.JsonWebStructure> nestingContext) |
public JkuVerificationKeyResolver(Collection<String> domainWhitelist)
public JkuVerificationKeyResolver(Collection<String> domainWhitelist, boolean unsafeAllowed)
public JkuVerificationKeyResolver(Function<String,AsyncHttpsJwks> httpsJwksSupplier, Collection<String> domainWhitelist, boolean disambiguateKey, boolean unsafeAllowed)
public Key resolveKey(org.jose4j.jws.JsonWebSignature jws, List<org.jose4j.jwx.JsonWebStructure> nestingContext) throws org.jose4j.lang.UnresolvableKeyException
resolveKey
in interface org.jose4j.keys.resolvers.VerificationKeyResolver
org.jose4j.lang.UnresolvableKeyException
public static boolean hasValidJkuDomain(Collection<String> domainWhitelist, String requiredProtocol, String jku)
public void close()
close
in interface Closeable
close
in interface AutoCloseable