@Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public TicketRegistry ticketRegistry(
            @Qualifier(CasSSLContext.BEAN_NAME)
            final CasSSLContext casSslContext,
            @Qualifier("redisKeyGeneratorFactory")
            final RedisKeyGeneratorFactory redisKeyGeneratorFactory,
            @Qualifier("casRedisTemplates")
            final RedisTicketRegistry.CasRedisTemplates casRedisTemplates,
            @Qualifier(TicketCatalog.BEAN_NAME)
            final TicketCatalog ticketCatalog,
            @Qualifier(TicketSerializationManager.BEAN_NAME)
            final TicketSerializationManager ticketSerializationManager,
            @Qualifier("redisTicketRegistryCache")
            final ObjectProvider<Cache<String, Ticket>> redisTicketRegistryCache,
            @Qualifier("redisTicketRegistryMessagePublisher")
            final ObjectProvider<RedisTicketRegistryMessagePublisher> redisTicketRegistryMessagePublisher,
            @Qualifier(RedisModulesOperations.BEAN_NAME)
            final ObjectProvider<RedisModulesOperations> redisModulesOperations,
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(TicketRegistry.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(Unchecked.supplier(() -> {
                    val redis = casProperties.getTicket().getRegistry().getRedis();
                    val cipher = CoreTicketUtils.newTicketRegistryCipherExecutor(redis.getCrypto(), "redis");
                    val redisMappingContext = new RedisMappingContext();
                    val keySpaceConfig = redisMappingContext.getMappingConfiguration().getKeyspaceConfiguration();
                    for (val redisKeyGenerator : redisKeyGeneratorFactory.getRedisKeyGenerators()) {
                        val keyspaceSettings = new KeyspaceConfiguration.KeyspaceSettings(RedisTicketDocument.class, redisKeyGenerator.getNamespace());
                        LOGGER.debug("Adding keyspace [{}]", redisKeyGenerator.getNamespace());
                        keySpaceConfig.addKeyspaceSettings(keyspaceSettings);
                    }
                    val adapter = new RedisKeyValueAdapter(casRedisTemplates.getTicketsRedisTemplate(), redisMappingContext);

                    val operations = redisModulesOperations.stream().filter(BeanSupplier::isNotProxy).findFirst();
                    return new RedisTicketRegistry(cipher, ticketSerializationManager, ticketCatalog, applicationContext,
                        casRedisTemplates, redisTicketRegistryCache, redisTicketRegistryMessagePublisher,
                        operations, redisKeyGeneratorFactory, adapter, casProperties);
                }))
                .otherwise(() -> new DefaultTicketRegistry(ticketSerializationManager, ticketCatalog, applicationContext))
                .get();
        }
This is {@link CasRedisTicketRegistryAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-redis-ticket-registry/src/main/java/org/apereo/cas/config/CasRedisTicketRegistryAutoConfiguration.java