Skip to content

Commit

Permalink
CAS-1085
Browse files Browse the repository at this point in the history
fix to both LDAP handlers to use the provided PasswordEncoder.
  • Loading branch information
battags committed Jan 4, 2012
1 parent 1201406 commit 5b59f03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void handleNameClassPair(final NameClassPair nameClassPair) {
this.log.debug("Performing LDAP bind with credential: " + dn);
test = this.getContextSource().getContext(
finalDn,
credentials.getPassword());
getPasswordEncoder().encode(credentials.getPassword()));

if (test != null) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected boolean authenticateUsernamePasswordInternal(final UsernamePasswordCre
final String transformedUsername = getPrincipalNameTransformer().transform(credentials.getUsername());
final String bindDn = LdapUtils.getFilterWithValues(getFilter(), transformedUsername);
this.log.debug("Performing LDAP bind with credential: " + bindDn);
dirContext = this.getContextSource().getContext(bindDn, credentials.getPassword());
dirContext = this.getContextSource().getContext(bindDn, getPasswordEncoder().encode(credentials.getPassword()));
return true;
} catch (final NamingException e) {
log.debug(e.getMessage(), e);
Expand Down

0 comments on commit 5b59f03

Please sign in to comment.