1 // $OpenLDAP$ 2 /* 3 * Copyright 2000-2021 The OpenLDAP Foundation, All Rights Reserved. 4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file 5 */ 6 7 #ifndef LDAP_BIND_REQUEST_H 8 #define LDAP_BIND_REQUEST_H 9 10 #include <LDAPRequest.h> 11 #include <LDAPResult.h> 12 #include <SaslInteractionHandler.h> 13 14 class LDAPBindRequest : LDAPRequest { 15 private: 16 std::string m_dn; 17 std::string m_cred; 18 std::string m_mech; 19 20 public: 21 LDAPBindRequest( const LDAPBindRequest& req); 22 //just for simple authentication 23 LDAPBindRequest(const std::string&, const std::string& passwd, 24 LDAPAsynConnection *connect, const LDAPConstraints *cons, 25 bool isReferral=false); 26 virtual ~LDAPBindRequest(); 27 virtual LDAPMessageQueue *sendRequest(); 28 }; 29 30 class LDAPSaslBindRequest : LDAPRequest 31 { 32 public: 33 LDAPSaslBindRequest( const std::string& mech, const std::string& cred, 34 LDAPAsynConnection *connect, const LDAPConstraints *cons, 35 bool isReferral=false); 36 virtual LDAPMessageQueue *sendRequest(); 37 virtual ~LDAPSaslBindRequest(); 38 39 private: 40 std::string m_mech; 41 std::string m_cred; 42 }; 43 44 class LDAPSaslInteractiveBind : LDAPRequest 45 { 46 public: 47 LDAPSaslInteractiveBind( const std::string& mech, int flags, 48 SaslInteractionHandler *sih, LDAPAsynConnection *connect, 49 const LDAPConstraints *cons, bool isReferral=false); 50 virtual LDAPMessageQueue *sendRequest(); 51 virtual LDAPMsg* getNextMessage() const; 52 virtual ~LDAPSaslInteractiveBind(); 53 54 private: 55 std::string m_mech; 56 int m_flags; 57 SaslInteractionHandler *m_sih; 58 LDAPResult *m_res; 59 }; 60 #endif //LDAP_BIND_REQUEST_H 61 62