@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    public Supplier<OidcJsonWebKeystoreGeneratorService> mongoOidcJsonWebKeystoreGeneratorService(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties,
        @Qualifier("mongoOidcJsonWebKeystoreTemplate")
        final MongoOperations mongoOidcJsonWebKeystoreTemplate) {
        return BeanSupplier.of(Supplier.class)
            .when(CONDITION_HOST.given(applicationContext.getEnvironment()))
            .and(CONDITION_COLLECTION.given(applicationContext.getEnvironment()))
            .supply(() -> () -> new OidcMongoDbJsonWebKeystoreGeneratorService(mongoOidcJsonWebKeystoreTemplate,
                casProperties.getAuthn().getOidc()))
            .otherwiseProxy()
            .get();
    }
This is {@link CasOidcJwksMongoDbAutoConfiguration}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-oidc-mongo/src/main/java/org/apereo/cas/config/CasOidcJwksMongoDbAutoConfiguration.java