Authentication & Authorization In LDAP (through JNDI)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nicholas_Whitehead
Posted On:   Friday, June 8, 2001 06:29 AM

I am attempting to use LDAP for a custom security model and I would like to know
the general pattern using JNDI to authenticate and authorize.

In order to authenticate a user, do I simply attempt to connect to LDAP using the suppplied
principal and credentials ?

To authorize, is it simply a matter of verifying that a user exists in a specific list of people ?

Thanks.

//Nicholas

Create TopicConnectionFactory on LDAP

Posted By:   Massimo_Pascale  
Posted On:   Friday, June 29, 2001 03:34 AM

First of all ecuse me for my English.


This is my problem :

I would want to create a TopicConnectionFactory on a server
LDAP using JNDI API but I have an Exception as :

LDAP: error code 32 - No such Object


this is th code :

Hashtable env = new Hashtable();

env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.ldapCtxFactory");

env.put(avax.naming.Context.PROVIDER_URL, "ldap://localhost:389");

DirContext ldp = new InitialDirContext(env);

Context jndiContext = new InitialContext();


TopicConnectionFactory topicConnectionFactory = (TopicConnectionFactory)jndiContext.lookup("TopicConnectionFactory");


ldp.bind("TopicConnectionFactory", topicConnectionFactory); //**********HERE IS THE EXCEPTION



I hope that someone can help me.

Ciao ciao.
About | Sitemap | Contact