Search in sources :

Example 1 with CouchbaseTicketRegistry

use of org.apereo.cas.ticket.registry.CouchbaseTicketRegistry 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;
}
Also used : CouchbaseTicketRegistryProperties(org.apereo.cas.configuration.model.support.couchbase.ticketregistry.CouchbaseTicketRegistryProperties) CouchbaseTicketRegistry(org.apereo.cas.ticket.registry.CouchbaseTicketRegistry) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) Bean(org.springframework.context.annotation.Bean)

Example 2 with CouchbaseTicketRegistry

use of org.apereo.cas.ticket.registry.CouchbaseTicketRegistry 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;
}
Also used : CouchbaseTicketRegistryProperties(org.apereo.cas.configuration.model.support.couchbase.ticketregistry.CouchbaseTicketRegistryProperties) CouchbaseTicketRegistry(org.apereo.cas.ticket.registry.CouchbaseTicketRegistry) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) Autowired(org.springframework.beans.factory.annotation.Autowired) Bean(org.springframework.context.annotation.Bean)

Aggregations

CouchbaseTicketRegistryProperties (org.apereo.cas.configuration.model.support.couchbase.ticketregistry.CouchbaseTicketRegistryProperties)2 CouchbaseTicketRegistry (org.apereo.cas.ticket.registry.CouchbaseTicketRegistry)2 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)2 Bean (org.springframework.context.annotation.Bean)2 Autowired (org.springframework.beans.factory.annotation.Autowired)1