generalized the case for ldap