use of org.apereo.cas.web.security.authentication.EndpointLdapAuthenticationProvider in project cas by apereo.
the class CasWebSecurityConfigurerAdapter method configureLdapAuthenticationProvider.
/**
* Configure ldap authentication provider.
*
* @param auth the auth
* @param ldap the ldap
*/
protected void configureLdapAuthenticationProvider(final AuthenticationManagerBuilder auth, final LdapSecurityActuatorEndpointsMonitorProperties ldap) {
if (isLdapAuthorizationActive()) {
val connectionFactory = LdapUtils.newLdaptiveConnectionFactory(ldap);
val authenticator = LdapUtils.newLdaptiveAuthenticator(ldap);
endpointLdapAuthenticationProvider = new EndpointLdapAuthenticationProvider(ldap, securityProperties, connectionFactory, authenticator);
auth.authenticationProvider(endpointLdapAuthenticationProvider);
} else {
LOGGER.trace("LDAP authorization is undefined, given no LDAP url, base-dn, search filter or role/group filter is configured");
}
}
Aggregations