FR [ 1564429 ] LDAP username registration (OpenLDAP compatibility)

This commit is contained in:
Carlos Ruiz 2008-01-24 21:17:43 +00:00
parent fd1fed9aa2
commit e2d2678df1
1 changed files with 3 additions and 2 deletions

View File

@ -49,8 +49,9 @@ public class LDAP
env.put(Context.PROVIDER_URL, ldapURL);
env.put(Context.SECURITY_AUTHENTICATION, "simple");
// jjanke@compiere.org
StringBuffer principal = new StringBuffer (userName)
.append("@").append(domain);
// For OpenLDAP uncomment the next line
// StringBuffer principal = new StringBuffer("uid=").append(userName).append(",").append(domain);
StringBuffer principal = new StringBuffer(userName).append("@").append(domain);
env.put(Context.SECURITY_PRINCIPAL, principal.toString());
env.put(Context.SECURITY_CREDENTIALS, password);
//