Search in sources :

Example 1 with MemcachedTicketRegistryProperties

use of org.apereo.cas.configuration.model.support.memcached.MemcachedTicketRegistryProperties in project cas by apereo.

the class MemcachedTicketRegistryConfiguration method ticketRegistry.

@Bean
public TicketRegistry ticketRegistry() {
    final MemcachedTicketRegistryProperties memcached = casProperties.getTicket().getRegistry().getMemcached();
    final MemcachedPooledClientConnectionFactory factory = new MemcachedPooledClientConnectionFactory(memcached, memcachedTicketRegistryTranscoder());
    final MemcachedTicketRegistry registry = new MemcachedTicketRegistry(factory.getObjectPool());
    final CipherExecutor cipherExecutor = CoreTicketUtils.newTicketRegistryCipherExecutor(memcached.getCrypto(), "memcached");
    registry.setCipherExecutor(cipherExecutor);
    return registry;
}
Also used : MemcachedTicketRegistry(org.apereo.cas.ticket.registry.MemcachedTicketRegistry) MemcachedPooledClientConnectionFactory(org.apereo.cas.memcached.MemcachedPooledClientConnectionFactory) CipherExecutor(org.apereo.cas.CipherExecutor) MemcachedTicketRegistryProperties(org.apereo.cas.configuration.model.support.memcached.MemcachedTicketRegistryProperties) Bean(org.springframework.context.annotation.Bean)

Aggregations

CipherExecutor (org.apereo.cas.CipherExecutor)1 MemcachedTicketRegistryProperties (org.apereo.cas.configuration.model.support.memcached.MemcachedTicketRegistryProperties)1 MemcachedPooledClientConnectionFactory (org.apereo.cas.memcached.MemcachedPooledClientConnectionFactory)1 MemcachedTicketRegistry (org.apereo.cas.ticket.registry.MemcachedTicketRegistry)1 Bean (org.springframework.context.annotation.Bean)1