use of org.apereo.cas.configuration.model.support.mongo.ticketregistry.MongoTicketRegistryProperties in project cas by apereo.
the class MongoDbTicketRegistryConfiguration method mongoDbTicketRegistryTemplate.
@ConditionalOnMissingBean(name = "mongoDbTicketRegistryTemplate")
@Bean
public MongoTemplate mongoDbTicketRegistryTemplate() {
final MongoDbConnectionFactory factory = new MongoDbConnectionFactory();
final MongoTicketRegistryProperties mongo = casProperties.getTicket().getRegistry().getMongo();
return factory.buildMongoTemplate(mongo);
}
use of org.apereo.cas.configuration.model.support.mongo.ticketregistry.MongoTicketRegistryProperties 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;
}
Aggregations