Interface VerificationKeyResolver

All Known Implementing Classes:
EmbeddedJwkVerificationKeyResolver, HttpsJwksVerificationKeyResolver, JwksVerificationKeyResolver, X509VerificationKeyResolver

public interface VerificationKeyResolver
A callback interface for resolving the key (by looking at headers like "kid", for example) to use to verify the JWS signature.
  • Method Summary

    Modifier and Type
    Method
    Description
    Choose the key to be used for signature verification on the given JWS.
  • Method Details

    • resolveKey

      Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContext) throws UnresolvableKeyException
      Choose the key to be used for signature verification on the given JWS.
      Parameters:
      jws - the JsonWebSignature that's about to be verified
      nestingContext - 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