Hi
I am using ldapTemplate.authenticate method to authenticate a user. I can happily do most of the functions.

However, when I pass in an invalid password or a password that has expired, I just get a "false" back. I do not get a handle back to know what exactly is the problem. I want to find out programatically, what the root cause is.

Sample code:
AndFilter filter = new AndFilter();
filter.and(new EqualsFilter("uid", userDn));
boolean isAuth = ldapTemplate.authenticate(DistinguishedName.EMPTY_ PATH, filter
.toString(), password);

Basically, if false, I want to get some error code to know what the problem is.

I have spent some time on it, wondering if I should be using some other api other than authenticate.