如何使用java中的以下详细信息连接到LDAP服务器?
我有以下java代码,但我得到了错误 提供详细信息
password="some"; domain name=ABF.ADDAS.com user name=SADFA.com\username or SADFA\username
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://ip:389");
//
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "");
env.put(Context.SECURITY_CREDENTIALS, "password");
共 (0) 个答案