Search in sources :

Example 1 with MongoDbTicketRegistry

use of org.apereo.cas.ticket.registry.MongoDbTicketRegistry in project cas by apereo.

the class MongoDbTicketRegistryConfiguration method ticketRegistry.

@RefreshScope
@Bean
@Autowired
public TicketRegistry ticketRegistry(@Qualifier("ticketCatalog") final TicketCatalog ticketCatalog) {
    final MongoTicketRegistryProperties mongo = casProperties.getTicket().getRegistry().getMongo();
    final MongoDbTicketRegistry registry = new MongoDbTicketRegistry(ticketCatalog, mongoDbTicketRegistryTemplate(), mongo.isDropCollection());
    registry.setCipherExecutor(CoreTicketUtils.newTicketRegistryCipherExecutor(mongo.getCrypto(), "mongo"));
    return registry;
}
Also used : MongoTicketRegistryProperties(org.apereo.cas.configuration.model.support.mongo.ticketregistry.MongoTicketRegistryProperties) MongoDbTicketRegistry(org.apereo.cas.ticket.registry.MongoDbTicketRegistry) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

MongoTicketRegistryProperties (org.apereo.cas.configuration.model.support.mongo.ticketregistry.MongoTicketRegistryProperties)1 MongoDbTicketRegistry (org.apereo.cas.ticket.registry.MongoDbTicketRegistry)1 Autowired (org.springframework.beans.factory.annotation.Autowired)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1