FR [ 1564429 ] LDAP username registration (OpenLDAP compatibility)
This commit is contained in:
parent
fd1fed9aa2
commit
e2d2678df1
|
@ -49,8 +49,9 @@ public class LDAP
|
||||||
env.put(Context.PROVIDER_URL, ldapURL);
|
env.put(Context.PROVIDER_URL, ldapURL);
|
||||||
env.put(Context.SECURITY_AUTHENTICATION, "simple");
|
env.put(Context.SECURITY_AUTHENTICATION, "simple");
|
||||||
// jjanke@compiere.org
|
// jjanke@compiere.org
|
||||||
StringBuffer principal = new StringBuffer (userName)
|
// For OpenLDAP uncomment the next line
|
||||||
.append("@").append(domain);
|
// 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_PRINCIPAL, principal.toString());
|
||||||
env.put(Context.SECURITY_CREDENTIALS, password);
|
env.put(Context.SECURITY_CREDENTIALS, password);
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue