add legacy support for ldap protocol