return new String((byte[]) context.getObjectAttribute("userPassword"));
}
});
} catch (EntryNotFoundException e) {
logger.info("cannot found {} in ldap", userName);
throw new AuthenticationException("ldap user " + userName + " not found");
}
try {
return (LdapPasswordHandler.getInstance().verify(ldapPassword, password));
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);