Common name, lets say "John Smith" is used compose the DN, but is it posible to compose a full DN using UID.
Im currently doing this and it works.
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,
env.put(Context.PROVIDER_URL, "ldap://myDomain.com");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "CN=John Smith,OU=IT,OU=MyCompany,OU=Users,DC=myDomain,DC=com");
env.put(Context.SECURITY_CREDENTIALS, "myPassWrd");
Now I want to use UID
, for example J.smith, for authentication instead of his full name. Any ideas?
I use:
Works for me.