code: public void authenticate(String username, String password) {
          ldapTemplate.authenticate(query().where("objectClass").is("simpleSecurityObject").and("cn").is(username), password);
          LOGGER.info("Successfully authenticated " + username);
      }
docs: Authenticate against ldap.
  
  @param username the username
  @param password the password