Skip to content
Snippets Groups Projects
Commit b6c4c02e authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Do not request unnecessary LDAP attributes

parent fee85fe5
1 merge request!24Freetext Checker improvements
......@@ -274,6 +274,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter implements Serv
@Bean
public LdapAuthenticator ldapAuthenticator() throws Exception {
BindAuthenticator authenticator = new BindAuthenticator(ldapContextSource());
authenticator.setUserAttributes(new String[] {ldapUserIdAttr});
if (!"".equals(ldapSearchFilter)) {
logger.debug("ldapSearch: {} {}", ldapSearchBase, ldapSearchFilter);
authenticator.setUserSearch(new FilterBasedLdapUserSearch(ldapSearchBase, ldapSearchFilter, ldapContextSource()));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment