Search in sources :

Example 1 with LdapSpnegoKnownClientSystemsFilterAction

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());
}
Also used : SearchRequest(org.ldaptive.SearchRequest) ConnectionFactory(org.ldaptive.ConnectionFactory) LdapSpnegoKnownClientSystemsFilterAction(org.apereo.cas.web.flow.client.LdapSpnegoKnownClientSystemsFilterAction) SpnegoProperties(org.apereo.cas.configuration.model.support.spnego.SpnegoProperties) SearchFilter(org.ldaptive.SearchFilter) Lazy(org.springframework.context.annotation.Lazy) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) Bean(org.springframework.context.annotation.Bean)

Aggregations

SpnegoProperties (org.apereo.cas.configuration.model.support.spnego.SpnegoProperties)1 LdapSpnegoKnownClientSystemsFilterAction (org.apereo.cas.web.flow.client.LdapSpnegoKnownClientSystemsFilterAction)1 ConnectionFactory (org.ldaptive.ConnectionFactory)1 SearchFilter (org.ldaptive.SearchFilter)1 SearchRequest (org.ldaptive.SearchRequest)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1 Lazy (org.springframework.context.annotation.Lazy)1