Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

ldap java connection

// Hi have a great day :) 
Hashtable<String, String> environment = new Hashtable<String, String>();

environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
environment.put(Context.PROVIDER_URL, "ldap://localhost:10389");
environment.put(Context.SECURITY_AUTHENTICATION, "simple");
environment.put(Context.SECURITY_PRINCIPAL, "cn=Joe Simms,ou=Users,dc=baeldung,dc=com");
environment.put(Context.SECURITY_CREDENTIALS, "12345");
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #ldap #java #connection
ADD COMMENT
Topic
Name
4+6 =