Authenticating to OpenDirectory LDAP
Authenticating to OpenDirectory LDAP
- Subject: Authenticating to OpenDirectory LDAP
- From: Merul Patel <email@hidden>
- Date: Fri, 23 Apr 2004 15:41:35 +0100
Hi,
I'm having some problems attempting to authenticate users of my WO
application against the Open Directory LDAP server that comes with
Panther Server.
I'm able to connect anonymously to the LDAP server using EOModeler with
the following bindings:
authentication - none
initialContextFactory - com.sun.jndi.ldap.LdapCtxFactory
password - <BLANK>
plugInClassName - com.webobjects.jndiadaptor.LDAPPlugIn
scope - Subtree
serverURL - ldap://<PANTHERSERVERNAME>/dc=<MYCOMPANY>,dc=com
timeout = 3600
username - <BLANK>
However, if I try to connect using "Simple" authentication, and supply
a "uid=XXXXX" entry for the username and a password I continually get
an Invalid Credentials exception. This is despite the uid being a valid
username and the password being correct.
Am I missing something? I also get the same error when trying to bind a
context to the LDAP server programmatically as shown below:
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL,
"ldap://serverName:389/dc=companyName,dc=com");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "uid=username");
env.put(Context.SECURITY_CREDENTIALS, "password");
try {
Context ctx = new InitialContext(env);
...
TIA,
Mezza
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.