Hi,
I have a custom login page/form which sends the username + password to a custom UserDetailsService.
I need to verify the entered password against LDAP. But, I don't know how to retrieve the password.
When browsing the AD with LDAP, I do not see a password attribute. All users have a password though.
Currently I have this code:
All configuration is fine, because I can load a user's details+authorizations by only querying the AD with the user's login name (which is done in another method).Code:/** * custom load user details test * @param userID the user id * @param password the entered password in the Form */ public void loadUserDetails(String userID, String password){ this.filterBasedLdapUserSearch.setDerefLinkFlag(true); this.filterBasedLdapUserSearch.setSearchSubtree(true); // get the user's entire context DirContextOperations context = this.filterBasedLdapUserSearch.searchForUser(userID); String password2 = context.getStringAttribute(?????????); }
So, how can I get the password from the AD using Spring LDAP via the DirContextOperations ?
Thanks for your help,
Coen




