static Resource toResource(final JsonWebKeySet jsonWebKeySet) {
        val result = jsonWebKeySet.toJson(JsonWebKey.OutputControlLevel.INCLUDE_PRIVATE);
        return new ByteArrayResource(result.getBytes(StandardCharsets.UTF_8), "OIDC JWKS");
    }
To resource.

@param jsonWebKeySet the json web key set
@return the resource
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/jwks/generator/OidcJsonWebKeystoreGeneratorService.java