-
May 26th, 2009, 03:56 PM
#1
Get LDAP error codes with LDAPTemplate.authenticate
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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules