Rajesh
Rajesh

Reputation: 1941

openLDAP samples

I want to explore openLDAP.. Can any one suggest me some websites for simple ldap codes?

Upvotes: 0

Views: 1277

Answers (2)

MayurB
MayurB

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.

http://directory.fedoraproject.org/wiki/Main_Page

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

kalyan
kalyan

Reputation: 3106

There are multiple options if you are looking for java libraries

Upvotes: 2

Related Questions