@Override
    public Optional<Resource> find() {
        val issuer = oidcProperties.getCore().getIssuer();
        val entity = mongoTemplate.findById(issuer, OidcJsonWebKeystoreEntity.class,
            oidcProperties.getJwks().getMongo().getCollection());
        return Optional.ofNullable(entity)
            .map(Unchecked.function(jwks ->
                OidcJsonWebKeystoreGeneratorService.toResource(new JsonWebKeySet(jwks.getData()))));
    }
This is {@link OidcMongoDbJsonWebKeystoreGeneratorService}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-oidc-mongo/src/main/java/org/apereo/cas/oidc/jwks/generator/mongo/OidcMongoDbJsonWebKeystoreGeneratorService.java