use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class CasCoreUtilSerializationConfiguration method componentSerializationPlan.
@ConditionalOnMissingBean(name = "componentSerializationPlan")
@Autowired
@Bean
public ComponentSerializationPlan componentSerializationPlan(final List<ComponentSerializationPlanConfigurator> configurers) {
final DefaultComponentSerializationPlan plan = new DefaultComponentSerializationPlan();
configurers.forEach(c -> {
final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
LOGGER.debug("Configuring component serialization plan [{}]", name);
c.configureComponentSerializationPlan(plan);
});
return plan;
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class CasCoreValidationConfiguration method serviceValidationAuthorizers.
@Autowired
@Bean
@ConditionalOnMissingBean(name = "serviceValidationAuthorizers")
public ServiceTicketValidationAuthorizersExecutionPlan serviceValidationAuthorizers(final List<ServiceTicketValidationAuthorizerConfigurer> configurers) {
final DefaultServiceTicketValidationAuthorizersExecutionPlan plan = new DefaultServiceTicketValidationAuthorizersExecutionPlan();
configurers.forEach(c -> {
final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
LOGGER.debug("Configuring service ticket validation authorizer execution plan [{}]", name);
c.configureAuthorizersExecutionPlan(plan);
});
return plan;
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class HazelcastTicketRegistryConfiguration method ticketRegistry.
@Autowired
@Bean
public TicketRegistry ticketRegistry(@Qualifier("ticketCatalog") final TicketCatalog ticketCatalog) {
final HazelcastTicketRegistryProperties hz = casProperties.getTicket().getRegistry().getHazelcast();
final HazelcastTicketRegistry r = new HazelcastTicketRegistry(hazelcast(ticketCatalog), ticketCatalog, hz.getPageSize());
r.setCipherExecutor(CoreTicketUtils.newTicketRegistryCipherExecutor(hz.getCrypto(), "hazelcast"));
return r;
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class CasRestConfiguration method serviceTicketResourceEntityResponseFactory.
@Bean
@ConditionalOnMissingBean(name = "serviceTicketResourceEntityResponseFactory")
@Autowired
public ServiceTicketResourceEntityResponseFactory serviceTicketResourceEntityResponseFactory(final List<ServiceTicketResourceEntityResponseFactoryConfigurer> configurers) {
final DefaultServiceTicketResourceEntityResponseFactoryPlan plan = new DefaultServiceTicketResourceEntityResponseFactoryPlan();
configurers.forEach(c -> c.configureEntityResponseFactory(plan));
return new CompositeServiceTicketResourceEntityResponseFactory(plan.getFactories());
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class JpaYubiKeyConfiguration method transactionManagerYubiKey.
@Autowired
@Bean
public PlatformTransactionManager transactionManagerYubiKey(@Qualifier("yubiKeyEntityManagerFactory") final EntityManagerFactory emf) {
final JpaTransactionManager mgmr = new JpaTransactionManager();
mgmr.setEntityManagerFactory(emf);
return mgmr;
}
Aggregations