private static Resource getJsonWebKeySetResource(final OidcRegisteredService service,
                                                     final ResourceLoader resourceLoader) {
        val serviceJwks = SpringExpressionLanguageValueResolver.getInstance().resolve(service.getJwks());
        if (StringUtils.isNotBlank(serviceJwks)) {
            if (ResourceUtils.doesResourceExist(serviceJwks)) {
                return resourceLoader.getResource(serviceJwks);
            }
            return new InputStreamResource(new ByteArrayInputStream(serviceJwks.getBytes(StandardCharsets.UTF_8)), "JWKS");
        }
        return null;
    }
Gets json web key from jwks.

@param jwks         the jwks
@param requestedKey the kid
@param usage        the usage
@return the json web key from jwks
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/jwks/OidcJsonWebKeyStoreUtils.java