@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    @ConditionalOnMissingBean(name = "redisYubiKeyTemplate")
    public CasRedisTemplate redisYubiKeyTemplate(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("redisYubiKeyConnectionFactory")
        final RedisConnectionFactory redisYubiKeyConnectionFactory) {
        return BeanSupplier.of(CasRedisTemplate.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> RedisObjectFactory.newRedisTemplate(redisYubiKeyConnectionFactory))
            .otherwiseProxy()
            .get();
    }
This is {@link CasRedisYubiKeyAutoConfiguration}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-yubikey-redis/src/main/java/org/apereo/cas/config/CasRedisYubiKeyAutoConfiguration.java