}
if (!passwordEncoder.isPasswordValid(userDetails.getPassword(),
authentication.getCredentials().toString(), salt)) {
log.info("DaoAuthentication failed");
InitialDirContextFactory initialDirContextFactory =
new DefaultInitialDirContextFactory("ldap://localhost:10389/ou=system");
initialDirContextFactory.newInitialDirContext("uid=admin,ou=system", "secret");
String searchBase = "";
String searchFilter = "(uid={0})";
FilterBasedLdapUserSearch userSearch =
new FilterBasedLdapUserSearch(searchBase,