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 (userDetailsContextMapper != null) { ldapAuthenticationProvider .setUserDetailsContextMapper(userDetailsContextMapper); } return ldapAuthenticationProvider; }
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 (userDetailsContextMapper != null) { ldapAuthenticationProvider .setUserDetailsContextMapper(userDetailsContextMapper); } return ldapAuthenticationProvider; }
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 (userDetailsContextMapper != null) { ldapAuthenticationProvider .setUserDetailsContextMapper(userDetailsContextMapper); } return ldapAuthenticationProvider; }
private LdapAuthenticationProvider build() throws Exception { BaseLdapPathContextSource contextSource = getContextSource(); LdapAuthenticator ldapAuthenticator = createLdapAuthenticator(contextSource); DefaultLdapAuthoritiesPopulator authoritiesPopulator = new DefaultLdapAuthoritiesPopulator( contextSource, groupSearchBase); authoritiesPopulator.setGroupRoleAttribute(groupRoleAttribute); authoritiesPopulator.setGroupSearchFilter(groupSearchFilter); LdapAuthenticationProvider ldapAuthenticationProvider = new LdapAuthenticationProvider( ldapAuthenticator, authoritiesPopulator); SimpleAuthorityMapper simpleAuthorityMapper = new SimpleAuthorityMapper(); simpleAuthorityMapper.setPrefix(rolePrefix); simpleAuthorityMapper.afterPropertiesSet(); ldapAuthenticationProvider.setAuthoritiesMapper(simpleAuthorityMapper); if(userDetailsContextMapper != null) { ldapAuthenticationProvider.setUserDetailsContextMapper(userDetailsContextMapper); } return ldapAuthenticationProvider; }