Commits

tludewig committed 78ee8a4

fix #17 ldap auth

Comments (0)

Files changed (1)

plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPAuthenticationHandler.java

 import java.text.MessageFormat;
 
 import java.util.HashSet;
+import java.util.Hashtable;
 import java.util.Properties;
-import java.util.Set;
 
 import javax.naming.Context;
 import javax.naming.NamingEnumeration;
         {
           SearchResult sr = searchResult.next();
           String userDn = sr.getName() + "," + baseDn;
-          Properties userProperties = new Properties(ldapProperties);
+          Hashtable<String, String> userProperties = new Hashtable<String,
+                                                       String>(ldapProperties);
 
           userProperties.put(Context.SECURITY_PRINCIPAL, userDn);
           userProperties.put(Context.SECURITY_CREDENTIALS, password);
 
             // read dynamic group attribute
             getGroups(userAttributes, groups);
-
             result = new AuthenticationResult(user, groups);
           }
           catch (NamingException ex)
    */
   private void buildLdapProperties()
   {
-    ldapProperties = new Properties();
+    ldapProperties = new Hashtable<String, String>();
     ldapProperties.put(Context.INITIAL_CONTEXT_FACTORY,
                        "com.sun.jndi.ldap.LdapCtxFactory");
     ldapProperties.put(Context.PROVIDER_URL, config.getHostUrl());
   private LDAPConfig config;
 
   /** Field description */
-  private Properties ldapProperties;
+  private Hashtable<String, String> ldapProperties;
 
   /** Field description */
   private Store<LDAPConfig> store;