AnsweredAssumed Answered

Not able to authticate user in CA user directory using java LDAP

Question asked by chandan44 on Mar 23, 2017
Latest reply on Mar 31, 2017 by Bill_Patton

HI, I am not able to authenticate user on CA user directory using LDAP java. Below is my code can you please tell me where i am not correct.

Hashtable<String, String> env = new Hashtable<String, String>(11);
            env.put(Context.REFERRAL, "follow");
            String providerUrl = "ldap://ip:10389";
            env.put(Context.PROVIDER_URL, providerUrl);
            env.put(Context.SECURITY_AUTHENTICATION, "simple");
            env.put(Context.SECURITY_PRINCIPAL, "cn=administrator");
            env.put(Context.SECURITY_CREDENTIALS, "password123");
            Context context = new InitialContext(env);

Please help.