@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public ConsentRepository consentRepository(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("consentRedisTemplate")
        final CasRedisTemplate consentRedisTemplate,
        final CasConfigurationProperties casProperties) {
        return BeanSupplier.of(ConsentRepository.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> new RedisConsentRepository(consentRedisTemplate))
            .otherwiseProxy()
            .get();
    }
This is {@link CasConsentRedisAutoConfiguration}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-consent-redis/src/main/java/org/apereo/cas/config/CasConsentRedisAutoConfiguration.java