Authenticate Domino users

Hi,

  1. I am trying to authenticate Domino users from a JNDI/LDAP based program. If the user is non-existent or password is invalid we are getting the same exception. I am mentioning the exception what we are getting.

ldapManager.getErrorStackTrace() = javax.naming.AuthenticationException: [LDAP: error code 49 - Failed, invalid credentials for CN=lotustest lotus test,O=agi]

  1. When the user password is expired we are not getting the password expired exception from the server system. How to get the password expired exception when the user is expired.

Please give me answers for these 2 questions.

Thanks in advance

jnc