Search in sources :

Example 1 with JpaTicketRegistry

use of org.apereo.cas.ticket.registry.JpaTicketRegistry in project cas by apereo.

the class JpaTicketRegistryConfiguration method ticketRegistry.

@Bean
@RefreshScope
public TicketRegistry ticketRegistry(@Qualifier("ticketCatalog") final TicketCatalog ticketCatalog) {
    final JpaTicketRegistryProperties jpa = casProperties.getTicket().getRegistry().getJpa();
    final JpaTicketRegistry bean = new JpaTicketRegistry(jpa.getTicketLockType(), ticketCatalog);
    bean.setCipherExecutor(CoreTicketUtils.newTicketRegistryCipherExecutor(jpa.getCrypto(), "jpa"));
    return bean;
}
Also used : JpaTicketRegistryProperties(org.apereo.cas.configuration.model.support.jpa.ticketregistry.JpaTicketRegistryProperties) JpaTicketRegistry(org.apereo.cas.ticket.registry.JpaTicketRegistry) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean) LocalContainerEntityManagerFactoryBean(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean)

Aggregations

JpaTicketRegistryProperties (org.apereo.cas.configuration.model.support.jpa.ticketregistry.JpaTicketRegistryProperties)1 JpaTicketRegistry (org.apereo.cas.ticket.registry.JpaTicketRegistry)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1 LocalContainerEntityManagerFactoryBean (org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean)1