use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class SamlConfiguration method samlValidateController.
@Autowired
@Bean
public SamlValidateController samlValidateController(@Qualifier("argumentExtractor") final ArgumentExtractor argumentExtractor) {
final SamlValidateController c = new SamlValidateController();
c.setValidationSpecification(cas20WithoutProxyProtocolValidationSpecification);
c.setSuccessView(casSamlServiceSuccessView());
c.setFailureView(casSamlServiceFailureView());
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 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 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 MemcachedTicketRegistryConfiguration method ticketRegistry.
@Autowired
@Bean
public TicketRegistry ticketRegistry(@Qualifier("memcachedClient") final MemcachedClientIF memcachedClientIF) {
final MemCacheTicketRegistry registry = new MemCacheTicketRegistry(memcachedClientIF);
registry.setCipherExecutor(Beans.newTicketRegistryCipherExecutor(casProperties.getTicket().getRegistry().getMemcached().getCrypto()));
return registry;
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class LdapMonitorConfiguration method pooledLdapConnectionFactoryMonitor.
@Autowired
@Bean
public Monitor pooledLdapConnectionFactoryMonitor(@Qualifier("pooledConnectionFactoryMonitorExecutorService") final ExecutorService executor) {
final MonitorProperties.Ldap ldap = casProperties.getMonitor().getLdap();
final PooledConnectionFactory connectionFactory = Beans.newLdaptivePooledConnectionFactory(ldap);
return new PooledLdapConnectionFactoryMonitor(executor, Long.valueOf(ldap.getMaxWait()).intValue(), connectionFactory, new SearchValidator());
}
Aggregations