use of org.apereo.cas.configuration.model.support.couchbase.ticketregistry.CouchbaseTicketRegistryProperties in project cas by apereo.
the class CouchbaseTicketRegistryConfiguration method ticketRegistry.
@RefreshScope
@Bean
public TicketRegistry ticketRegistry() {
final CouchbaseTicketRegistryProperties couchbase = casProperties.getTicket().getRegistry().getCouchbase();
final CouchbaseTicketRegistry c = new CouchbaseTicketRegistry(ticketRegistryCouchbaseClientFactory(), couchbase.isQueryEnabled());
c.setCipherExecutor(Beans.newTicketRegistryCipherExecutor(couchbase.getCrypto()));
return c;
}
use of org.apereo.cas.configuration.model.support.couchbase.ticketregistry.CouchbaseTicketRegistryProperties in project cas by apereo.
the class CouchbaseTicketRegistryConfiguration method ticketRegistry.
@Autowired
@RefreshScope
@Bean
public TicketRegistry ticketRegistry(@Qualifier("ticketCatalog") final TicketCatalog ticketCatalog) {
final CouchbaseTicketRegistryProperties couchbase = casProperties.getTicket().getRegistry().getCouchbase();
final CouchbaseTicketRegistry c = new CouchbaseTicketRegistry(ticketCatalog, ticketRegistryCouchbaseClientFactory());
c.setCipherExecutor(CoreTicketUtils.newTicketRegistryCipherExecutor(couchbase.getCrypto(), "couchbase"));
return c;
}
use of org.apereo.cas.configuration.model.support.couchbase.ticketregistry.CouchbaseTicketRegistryProperties in project cas by apereo.
the class CouchbaseTicketRegistryConfiguration method ticketRegistryCouchbaseClientFactory.
@RefreshScope
@Bean
public CouchbaseClientFactory ticketRegistryCouchbaseClientFactory() {
final CouchbaseTicketRegistryProperties cb = casProperties.getTicket().getRegistry().getCouchbase();
final Set<String> nodes = StringUtils.commaDelimitedListToSet(cb.getNodeSet());
return new CouchbaseClientFactory(nodes, cb.getBucket(), cb.getPassword(), Beans.newDuration(cb.getTimeout()).toMillis(), CouchbaseTicketRegistry.UTIL_DOCUMENT, CouchbaseTicketRegistry.ALL_VIEWS);
}
Aggregations