use of org.springframework.beans.factory.annotation.Autowired in project spring-framework by spring-projects.
the class AbstractTransactionalAnnotatedConfigClassTests method setDataSource.
@Autowired
public void setDataSource(DataSource dataSource) {
this.dataSourceViaInjection = dataSource;
this.jdbcTemplate = new JdbcTemplate(dataSource);
}
use of org.springframework.beans.factory.annotation.Autowired in project spring-security by spring-projects.
the class WebSecurityConfigurerAdapter method setObjectPostProcessor.
@Autowired
public void setObjectPostProcessor(ObjectPostProcessor<Object> objectPostProcessor) {
this.objectPostProcessor = objectPostProcessor;
authenticationBuilder = new AuthenticationManagerBuilder(objectPostProcessor);
localConfigureAuthenticationBldr = new AuthenticationManagerBuilder(objectPostProcessor) {
@Override
public AuthenticationManagerBuilder eraseCredentials(boolean eraseCredentials) {
authenticationBuilder.eraseCredentials(eraseCredentials);
return super.eraseCredentials(eraseCredentials);
}
};
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class CasValidationConfiguration method legacyValidateController.
@Autowired
@Bean
public LegacyValidateController legacyValidateController(@Qualifier("argumentExtractor") final ArgumentExtractor argumentExtractor) {
final LegacyValidateController c = new LegacyValidateController();
c.setValidationSpecification(this.cas10ProtocolValidationSpecification);
c.setSuccessView(cas1ServiceSuccessView());
c.setFailureView(cas1ServiceFailureView());
c.setProxyHandler(proxy10Handler);
c.setAuthenticationSystemSupport(authenticationSystemSupport);
c.setServicesManager(servicesManager);
c.setCentralAuthenticationService(centralAuthenticationService);
c.setArgumentExtractor(argumentExtractor);
c.setMultifactorTriggerSelectionStrategy(multifactorTriggerSelectionStrategy);
c.setAuthenticationContextValidator(authenticationContextValidator);
c.setJsonView(cas3ServiceJsonView());
c.setAuthnContextAttribute(casProperties.getAuthn().getMfa().getAuthenticationContextAttribute());
return c;
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class CasValidationConfiguration method v3ProxyValidateController.
@Autowired
@Bean
public V3ProxyValidateController v3ProxyValidateController(@Qualifier("argumentExtractor") final ArgumentExtractor argumentExtractor) {
final V3ProxyValidateController c = new V3ProxyValidateController();
c.setValidationSpecification(cas20ProtocolValidationSpecification);
c.setSuccessView(cas3ServiceSuccessView());
c.setFailureView(cas3ServiceFailureView);
c.setProxyHandler(proxy20Handler);
c.setAuthenticationSystemSupport(authenticationSystemSupport);
c.setServicesManager(servicesManager);
c.setCentralAuthenticationService(centralAuthenticationService);
c.setArgumentExtractor(argumentExtractor);
c.setMultifactorTriggerSelectionStrategy(multifactorTriggerSelectionStrategy);
c.setAuthenticationContextValidator(authenticationContextValidator);
c.setJsonView(cas3ServiceJsonView());
c.setAuthnContextAttribute(casProperties.getAuthn().getMfa().getAuthenticationContextAttribute());
return c;
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class JdbcMultifactorAuthnTrustConfiguration method transactionManagerMfaAuthnTrust.
@Autowired
@Bean
public PlatformTransactionManager transactionManagerMfaAuthnTrust(@Qualifier("mfaTrustedAuthnEntityManagerFactory") final EntityManagerFactory emf) {
final JpaTransactionManager mgmr = new JpaTransactionManager();
mgmr.setEntityManagerFactory(emf);
return mgmr;
}
Aggregations