ldapReader.h 619 B

12345678910111213141516171819202122
  1. #include "interfaces.h"
  2. struct ldap;
  3. class LDAPReader: public IMySQLLDAPAuthModule
  4. {
  5. public:
  6. LDAPReader(const std::string& uri, const std::string& attribute, const std::string& baseDn, const std::string& filter="");
  7. ~LDAPReader();
  8. bool Authenticate(const std::string& username, const std::string& password) override;
  9. private:
  10. struct ldap* InitConnection();
  11. bool CheckFilter(struct ldap* ldapHandler, const std::string& base);
  12. const std::string uri;
  13. const std::string attribute;
  14. const std::string baseDn;
  15. const std::string filter;
  16. };