Package org.jose4j.jwt.consumer
Class SimpleKeyResolver
java.lang.Object
org.jose4j.jwt.consumer.SimpleKeyResolver
- All Implemented Interfaces:
DecryptionKeyResolver,VerificationKeyResolver
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveKey(JsonWebEncryption jwe, List<JsonWebStructure> nestingContext) Choose the key to be used for decryption on the given JWE.resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContext) Choose the key to be used for signature verification on the given JWS.
-
Field Details
-
key
-
-
Constructor Details
-
SimpleKeyResolver
SimpleKeyResolver(Key key)
-
-
Method Details
-
resolveKey
Description copied from interface:DecryptionKeyResolverChoose the key to be used for decryption on the given JWE.- Specified by:
resolveKeyin interfaceDecryptionKeyResolver- Parameters:
jwe- the JsonWebEncryption that's about to be decryptednestingContext- a list of JOSE objects, if any, in which the JWE was nested. The last item in the list is the outer most JOSE object (not including the current JWE).- Returns:
- the decryption key
-
resolveKey
Description copied from interface:VerificationKeyResolverChoose the key to be used for signature verification on the given JWS.- Specified by:
resolveKeyin 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
-