class DecryptionKeyLocationResolver extends AbstractKeyLocationResolver implements DecryptionKeyResolver {

    @Override
    public Key resolveKey(JsonWebEncryption jwe, List<JsonWebStructure> nestingContext)
            throws UnresolvableKeyException {
        verifyKid(jwe, authContextInfo.getTokenDecryptionKeyId());

        // The key may have been calculated in the constructor from the local PEM, or,
        // if authContextInfo.getTokenKeyId() is not null - from the local JWK(S) content.
        if (key != null) {
            return key;
        }

        // At this point the key can be loaded from either the HTTPS or local JWK(s) content using
        // the current token kid to select the key.
        Key theKey = tryAsDecryptionJwk(jwe);

        if (theKey == null) {
            reportUnresolvableKeyException(authContextInfo.getDecryptionKeyContent(),
                    authContextInfo.getDecryptionKeyLocation());
        }
        return theKey;
    }

    public  DecryptionKeyLocationResolver(JWTAuthContextInfo authContextInfo);

}