Reputation: 1941
I want to explore openLDAP.. Can any one suggest me some websites for simple ldap codes?
Upvotes: 0
Views: 1277
Reputation: 3649
If you want to explore what is LDAP.You can go for 389 Directory Server(Open LDAP ) Refer below link.Install it.It has GUI for administration.
For JNDI ,to call you can refer below site and code below to connect LDAP server
http://docs.oracle.com/javase/jndi/tutorial/ldap/models/operations.html
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, providerUrl);
env.put(Context.SECURITY_PRINCIPAL, UserContextBean.getEntrydn());
env.put(Context.SECURITY_CREDENTIALS, password);
env.put(Context.SECURITY_AUTHENTICATION, authenticationType);
LDAPContext ctx = new InitialLdapContext(env, null);
This ctx can be use to access directory.
Upvotes: 1