@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnMissingBean(name = "redisPrincipalFactory")
    public PrincipalFactory redisPrincipalFactory(final ConfigurableApplicationContext applicationContext) {
        return BeanSupplier.of(PrincipalFactory.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(PrincipalFactoryUtils::newPrincipalFactory)
            .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