session api with ldap