use of org.apereo.cas.ticket.registry.MemcachedTicketRegistry 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;
}
use of org.apereo.cas.ticket.registry.MemcachedTicketRegistry in project cas by apereo.
the class MemcachedTicketRegistryConfiguration method ticketRegistry.
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public TicketRegistry ticketRegistry(final CasConfigurationProperties casProperties, @Qualifier("memcachedTicketRegistryTranscoder") final Transcoder memcachedTicketRegistryTranscoder) {
val memcached = casProperties.getTicket().getRegistry().getMemcached();
val factory = new MemcachedPooledClientConnectionFactory(memcached, memcachedTicketRegistryTranscoder);
val registry = new MemcachedTicketRegistry(factory.getObjectPool());
val cipherExecutor = CoreTicketUtils.newTicketRegistryCipherExecutor(memcached.getCrypto(), "memcached");
registry.setCipherExecutor(cipherExecutor);
return registry;
}
Aggregations