Search in sources :

Example 1 with LdapAuthenticator

use of org.springframework.security.ldap.authentication.LdapAuthenticator in project spring-security by spring-projects.

the class LdapAuthenticationProviderConfigurer method build.

private LdapAuthenticationProvider build() throws Exception {
    BaseLdapPathContextSource contextSource = getContextSource();
    LdapAuthenticator ldapAuthenticator = createLdapAuthenticator(contextSource);
    LdapAuthoritiesPopulator authoritiesPopulator = getLdapAuthoritiesPopulator();
    LdapAuthenticationProvider ldapAuthenticationProvider = new LdapAuthenticationProvider(ldapAuthenticator, authoritiesPopulator);
    ldapAuthenticationProvider.setAuthoritiesMapper(getAuthoritiesMapper());
    if (this.userDetailsContextMapper != null) {
        ldapAuthenticationProvider.setUserDetailsContextMapper(this.userDetailsContextMapper);
    }
    return ldapAuthenticationProvider;
}
Also used : LdapAuthoritiesPopulator(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator) DefaultLdapAuthoritiesPopulator(org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator) BaseLdapPathContextSource(org.springframework.ldap.core.support.BaseLdapPathContextSource) LdapAuthenticator(org.springframework.security.ldap.authentication.LdapAuthenticator) AbstractLdapAuthenticator(org.springframework.security.ldap.authentication.AbstractLdapAuthenticator) LdapAuthenticationProvider(org.springframework.security.ldap.authentication.LdapAuthenticationProvider)

Aggregations

BaseLdapPathContextSource (org.springframework.ldap.core.support.BaseLdapPathContextSource)1 AbstractLdapAuthenticator (org.springframework.security.ldap.authentication.AbstractLdapAuthenticator)1 LdapAuthenticationProvider (org.springframework.security.ldap.authentication.LdapAuthenticationProvider)1 LdapAuthenticator (org.springframework.security.ldap.authentication.LdapAuthenticator)1 DefaultLdapAuthoritiesPopulator (org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator)1 LdapAuthoritiesPopulator (org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator)1