Response Control Problem  
Author Message
a_thesis





PostPosted: 2004-11-10 5:13:00 Top

java-programmer, Response Control Problem 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