Search in sources :

Example 56 with Autowired

use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.

the class CasWebflowContextConfiguration method casWebflowExecutionPlan.

@Autowired
@Bean
public CasWebflowExecutionPlan casWebflowExecutionPlan(final List<CasWebflowExecutionPlanConfigurer> configurers) {
    final DefaultCasWebflowExecutionPlan plan = new DefaultCasWebflowExecutionPlan();
    configurers.forEach(c -> c.configureWebflowExecutionPlan(plan));
    plan.execute();
    return plan;
}
Also used : DefaultCasWebflowExecutionPlan(org.apereo.cas.web.flow.configurer.plan.DefaultCasWebflowExecutionPlan) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 57 with Autowired

use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.

the class CasCoreLogoutConfiguration method logoutExecutionPlan.

@ConditionalOnMissingBean(name = "logoutExecutionPlan")
@Autowired
@Bean
public LogoutExecutionPlan logoutExecutionPlan(final List<LogoutExecutionPlanConfigurer> configurers) {
    final DefaultLogoutExecutionPlan plan = new DefaultLogoutExecutionPlan();
    configurers.forEach(c -> {
        final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
        LOGGER.debug("Configuring logout execution plan [{}]", name);
        c.configureLogoutExecutionPlan(plan);
    });
    return plan;
}
Also used : DefaultLogoutExecutionPlan(org.apereo.cas.logout.DefaultLogoutExecutionPlan) 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 58 with Autowired

use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.

the class OpenIdConfiguration method openIdPostUrlHandlerMapping.

@Autowired
@Bean
public OpenIdPostUrlHandlerMapping openIdPostUrlHandlerMapping(@Qualifier("argumentExtractor") final ArgumentExtractor argumentExtractor) {
    final OpenIdValidateController c = new OpenIdValidateController(cas20WithoutProxyProtocolValidationSpecification, authenticationSystemSupport, servicesManager, centralAuthenticationService, proxy20Handler, argumentExtractor, multifactorTriggerSelectionStrategy, authenticationContextValidator, cas3ServiceJsonView, casOpenIdServiceSuccessView, casOpenIdServiceFailureView, casProperties.getAuthn().getMfa().getAuthenticationContextAttribute(), serverManager(), validationAuthorizers, casProperties.getSso().isRenewAuthnEnabled());
    final DelegatingController controller = new DelegatingController();
    controller.setDelegates(CollectionUtils.wrapList(smartOpenIdAssociationController(), c));
    final OpenIdPostUrlHandlerMapping m = new OpenIdPostUrlHandlerMapping();
    m.setOrder(1);
    final Properties mappings = new Properties();
    mappings.put("/login", controller);
    m.setMappings(mappings);
    return m;
}
Also used : OpenIdValidateController(org.apereo.cas.support.openid.web.mvc.OpenIdValidateController) DelegatingController(org.apereo.cas.web.DelegatingController) OpenIdPostUrlHandlerMapping(org.apereo.cas.support.openid.web.support.OpenIdPostUrlHandlerMapping) CasConfigurationProperties(org.apereo.cas.configuration.CasConfigurationProperties) EnableConfigurationProperties(org.springframework.boot.context.properties.EnableConfigurationProperties) Properties(java.util.Properties) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 59 with Autowired

use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.

the class CasRestConfiguration method restHttpRequestCredentialFactory.

@Autowired
@Bean
public RestHttpRequestCredentialFactory restHttpRequestCredentialFactory(final List<RestHttpRequestCredentialFactoryConfigurer> configurers) {
    final ChainingRestHttpRequestCredentialFactory factory = new ChainingRestHttpRequestCredentialFactory();
    configurers.forEach(c -> c.configureCredentialFactory(factory));
    return factory;
}
Also used : ChainingRestHttpRequestCredentialFactory(org.apereo.cas.rest.factory.ChainingRestHttpRequestCredentialFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 60 with Autowired

use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.

the class SamlIdPJpaMetadataConfiguration method transactionManagerSamlMetadata.

@Autowired
@Bean
public PlatformTransactionManager transactionManagerSamlMetadata(@Qualifier("samlMetadataEntityManagerFactory") 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) OpenSamlConfigBean(org.apereo.cas.support.saml.OpenSamlConfigBean) 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