Response Control Problem

R

researcher

I am trying to connect to IBM Directory server using Sun JNDI
implementation. The scenario: Connecting to the directory using an
expired password. When I do this I expect to get a Password Expiration
response control that indicates that the password has been expired.
However when i execute the code I get no response control. The context
returned is null. Snippet of my code is shown below:
Hashtable env = new Hashtable(11);
env.put( Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://.../");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "dn...");
env.put(Context.SECURITY_CREDENTIALS, "...");
Control[] ctls = new Control[] {new PasswordPolicyRequestControl()};

ldapctx = new InitialLdapContext(env,ctls);

It throws AuthenticationException where I try to get the response
control but it returns null.

Thanks.

Ashish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,128
Latest member
ElwoodPhil
Top