@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnMissingBean(name = "redisAuthenticationHandler")
    public AuthenticationHandler redisAuthenticationHandler(
        final CasConfigurationProperties casProperties,
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("redisPrincipalFactory")
        final PrincipalFactory redisPrincipalFactory,
        @Qualifier("authenticationRedisTemplate")
        final CasRedisTemplate authenticationRedisTemplate,
        @Qualifier(ServicesManager.BEAN_NAME)
        final ServicesManager servicesManager) {
        return BeanSupplier.of(AuthenticationHandler.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> {
                val redis = casProperties.getAuthn().getRedis();
                val handler = new RedisAuthenticationHandler(redis.getName(), servicesManager,
                    redisPrincipalFactory, redis.getOrder(), authenticationRedisTemplate);
                handler.setPrincipalNameTransformer(PrincipalNameTransformerUtils.newPrincipalNameTransformer(redis.getPrincipalTransformation()));
                handler.setPasswordEncoder(PasswordEncoderUtils.newPasswordEncoder(redis.getPasswordEncoder(), applicationContext));
                return handler;
            })
            .otherwiseProxy()
            .get();
    }
This is {@link CasRedisAuthenticationAutoConfiguration}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-redis-authentication/src/main/java/org/apereo/cas/config/CasRedisAuthenticationAutoConfiguration.java