use of org.springframework.beans.factory.annotation.Autowired in project ocvn by devgateway.
the class WebSecurityConfig method configureGlobal.
@Autowired
public void configureGlobal(final AuthenticationManagerBuilder auth) throws Exception {
// we use standard password encoder for all passwords
StandardPasswordEncoder spe = new StandardPasswordEncoder();
auth.userDetailsService(customJPAUserDetailsService).passwordEncoder(spe);
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class CasCoreAuthenticationPrincipalConfiguration method personDirectoryPrincipalResolver.
@Autowired
@RefreshScope
@Bean
@ConditionalOnMissingBean(name = "personDirectoryPrincipalResolver")
public PrincipalResolver personDirectoryPrincipalResolver(@Qualifier("attributeRepository") final IPersonAttributeDao attributeRepository, @Qualifier("principalFactory") final PrincipalFactory principalFactory) {
final PersonDirectoryPrincipalResolver bean = new PersonDirectoryPrincipalResolver();
bean.setAttributeRepository(attributeRepository);
bean.setPrincipalAttributeName(casProperties.getPersonDirectory().getPrincipalAttribute());
bean.setReturnNullIfNoAttributes(casProperties.getPersonDirectory().isReturnNull());
bean.setPrincipalFactory(principalFactory);
return bean;
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class JpaServiceRegistryConfiguration method transactionManagerServiceReg.
@Autowired
@Bean
public PlatformTransactionManager transactionManagerServiceReg(@Qualifier("serviceEntityManagerFactory") final EntityManagerFactory emf) {
final JpaTransactionManager mgmr = new JpaTransactionManager();
mgmr.setEntityManagerFactory(emf);
return mgmr;
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class CasJdbcThrottlingConfiguration method authenticationThrottle.
@Autowired
@Bean
@RefreshScope
public ThrottledSubmissionHandlerInterceptor authenticationThrottle(@Qualifier("auditTrailManager") final AuditTrailManager auditTrailManager) {
final ThrottleProperties throttle = casProperties.getAuthn().getThrottle();
final String appcode = throttle.getAppcode();
final String sqlQueryAudit = throttle.getJdbc().getAuditQuery();
final ThrottleProperties.Failure failure = throttle.getFailure();
return new InspektrThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter(failure.getThreshold(), failure.getRangeSeconds(), throttle.getUsernameParameter(), auditTrailManager, inspektrAuditTrailDataSource(), appcode, sqlQueryAudit, failure.getCode());
}
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(serverManager());
c.setValidationSpecification(this.cas20WithoutProxyProtocolValidationSpecification);
c.setSuccessView(casOpenIdServiceSuccessView);
c.setFailureView(casOpenIdServiceFailureView);
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());
final DelegatingController controller = new DelegatingController();
controller.setDelegates(Arrays.asList(smartOpenIdAssociationController(), c));
final OpenIdPostUrlHandlerMapping m = new OpenIdPostUrlHandlerMapping();
m.setOrder(1);
final Properties mappings = new Properties();
mappings.put("/login", controller);
m.setMappings(mappings);
return m;
}
Aggregations