Search in sources :

Example 31 with Autowired

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;
}
Also used : DefaultComponentSerializationPlan(org.apereo.cas.util.serialization.DefaultComponentSerializationPlan) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 32 with Autowired

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;
}
Also used : DefaultServiceTicketValidationAuthorizersExecutionPlan(org.apereo.cas.validation.DefaultServiceTicketValidationAuthorizersExecutionPlan) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 33 with Autowired

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;
}
Also used : HazelcastTicketRegistry(org.apereo.cas.ticket.registry.HazelcastTicketRegistry) HazelcastTicketRegistryProperties(org.apereo.cas.configuration.model.support.hazelcast.HazelcastTicketRegistryProperties) Autowired(org.springframework.beans.factory.annotation.Autowired) Bean(org.springframework.context.annotation.Bean)

Example 34 with Autowired

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());
}
Also used : CompositeServiceTicketResourceEntityResponseFactory(org.apereo.cas.rest.factory.CompositeServiceTicketResourceEntityResponseFactory) DefaultServiceTicketResourceEntityResponseFactoryPlan(org.apereo.cas.rest.plan.DefaultServiceTicketResourceEntityResponseFactoryPlan) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 35 with Autowired

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;
}
Also used : JpaTransactionManager(org.springframework.orm.jpa.JpaTransactionManager) Autowired(org.springframework.beans.factory.annotation.Autowired) Bean(org.springframework.context.annotation.Bean) LocalContainerEntityManagerFactoryBean(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean)

Aggregations

Autowired (org.springframework.beans.factory.annotation.Autowired)68 Bean (org.springframework.context.annotation.Bean)49 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)24 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)16 JpaTransactionManager (org.springframework.orm.jpa.JpaTransactionManager)8 LocalContainerEntityManagerFactoryBean (org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean)8 ThrottleProperties (org.apereo.cas.configuration.model.support.throttle.ThrottleProperties)4 OpenSamlConfigBean (org.apereo.cas.support.saml.OpenSamlConfigBean)3 Field (java.lang.reflect.Field)2 PersonDirectoryPrincipalResolver (org.apereo.cas.authentication.principal.resolvers.PersonDirectoryPrincipalResolver)2 MonitorProperties (org.apereo.cas.configuration.model.core.monitor.MonitorProperties)2 EncryptionRandomizedSigningJwtCryptographyProperties (org.apereo.cas.configuration.model.core.util.EncryptionRandomizedSigningJwtCryptographyProperties)2 DynamoDbTicketRegistryProperties (org.apereo.cas.configuration.model.support.dynamodb.DynamoDbTicketRegistryProperties)2 CasWebflowEventResolver (org.apereo.cas.web.flow.resolver.CasWebflowEventResolver)2 V3ServiceValidateController (org.apereo.cas.web.v3.V3ServiceValidateController)2 FilterRegistrationBean (org.springframework.boot.web.servlet.FilterRegistrationBean)2 EhCacheFactoryBean (org.springframework.cache.ehcache.EhCacheFactoryBean)2 EhCacheManagerFactoryBean (org.springframework.cache.ehcache.EhCacheManagerFactoryBean)2 Lazy (org.springframework.context.annotation.Lazy)2 DeviceResponseMessageSender (com.alliander.osgp.adapter.protocol.oslp.elster.infra.messaging.DeviceResponseMessageSender)1