@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnMissingBean(name = "redisSamlRegisteredServiceMetadataConnectionFactory")
    public RedisConnectionFactory redisSamlRegisteredServiceMetadataConnectionFactory(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier(CasSSLContext.BEAN_NAME)
        final CasSSLContext casSslContext,
        final CasConfigurationProperties casProperties) {
        return BeanSupplier.of(RedisConnectionFactory.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(Unchecked.supplier(() -> {
                val redis = casProperties.getAuthn().getSamlIdp().getMetadata().getRedis();
                return RedisObjectFactory.newRedisConnectionFactory(redis, casSslContext);
            }))
            .otherwiseProxy()
            .get();
    }
This is {@link SamlIdPRedisRegisteredServiceMetadataConfiguration}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-saml-idp-metadata-redis/src/main/java/org/apereo/cas/config/SamlIdPRedisRegisteredServiceMetadataConfiguration.java