@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    public TicketRegistry ticketRegistry(
        @Qualifier(TicketCatalog.BEAN_NAME)
        final TicketCatalog ticketCatalog,
        final CasConfigurationProperties casProperties,
        @Qualifier("mongoDbTicketRegistryTemplate")
        final MongoOperations mongoDbTicketRegistryTemplate,
        @Qualifier(TicketSerializationManager.BEAN_NAME)
        final TicketSerializationManager ticketSerializationManager,
        final ConfigurableApplicationContext applicationContext) {

        val mongo = casProperties.getTicket().getRegistry().getMongo();
        new MongoDbTicketRegistryFacilitator(ticketCatalog,
            mongoDbTicketRegistryTemplate, mongo).createTicketCollections();

        val cipher = CoreTicketUtils.newTicketRegistryCipherExecutor(mongo.getCrypto(), "mongo");
        return new MongoDbTicketRegistry(cipher, ticketSerializationManager,
            ticketCatalog, applicationContext, mongoDbTicketRegistryTemplate);
    }
This is {@link MongoDbTicketRegistryConfiguration}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-mongo-ticket-registry/src/main/java/org/apereo/cas/config/MongoDbTicketRegistryConfiguration.java