use of org.apereo.cas.web.flow.client.LdapSpnegoKnownClientSystemsFilterAction in project cas by apereo.
the class SpnegoWebflowActionsConfiguration method ldapSpnegoClientAction.
@Lazy
@Bean
@RefreshScope
public Action ldapSpnegoClientAction() {
final SpnegoProperties spnegoProperties = casProperties.getAuthn().getSpnego();
final ConnectionFactory connectionFactory = Beans.newLdaptivePooledConnectionFactory(spnegoProperties.getLdap());
final SearchFilter filter = Beans.newLdaptiveSearchFilter(spnegoProperties.getLdap().getSearchFilter(), "host", Collections.emptyList());
final SearchRequest searchRequest = Beans.newLdaptiveSearchRequest(spnegoProperties.getLdap().getBaseDn(), filter);
return new LdapSpnegoKnownClientSystemsFilterAction(spnegoProperties.getIpsToCheckPattern(), spnegoProperties.getAlternativeRemoteHostAttribute(), spnegoProperties.getDnsTimeout(), connectionFactory, searchRequest, spnegoProperties.getSpnegoAttributeName());
}
Aggregations