Package org.jose4j.keys.resolvers
Class X509VerificationKeyResolver
java.lang.Object
org.jose4j.keys.resolvers.X509VerificationKeyResolver
- All Implemented Interfaces:
VerificationKeyResolver
-
Constructor Summary
ConstructorDescriptionX509VerificationKeyResolver
(X509Certificate... certificates) X509VerificationKeyResolver
(List<X509Certificate> certificates) -
Method Summary
Modifier and TypeMethodDescriptionresolveKey
(JsonWebSignature jws, List<JsonWebStructure> nestingContext) Choose the key to be used for signature verification on the given JWS.void
setTryAllOnNoThumbHeader
(boolean tryAllOnNoThumbHeader)
-
Constructor Details
-
X509VerificationKeyResolver
-
X509VerificationKeyResolver
-
-
Method Details
-
setTryAllOnNoThumbHeader
public void setTryAllOnNoThumbHeader(boolean tryAllOnNoThumbHeader) -
resolveKey
public Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContext) throws UnresolvableKeyException Description copied from interface:VerificationKeyResolver
Choose the key to be used for signature verification on the given JWS.- Specified by:
resolveKey
in interfaceVerificationKeyResolver
- Parameters:
jws
- the JsonWebSignature that's about to be verifiednestingContext
- a list of JOSE objects, if any, in which the JWS was nested. The last item in the list is the outer most JOSE object (not including the current JWS).- Returns:
- the signature or MAC verification key
- Throws:
UnresolvableKeyException
- if no appropriate key can be found
-