diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:23:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:23:53 +0000 |
commit | c000cad09d0b54c455c99271bfb996c2dfe13073 (patch) | |
tree | e47ca809ed512d7fb43ec3d555753b1b658e9819 /contrib/ldapc++/src/LDAPBindRequest.h | |
parent | Initial commit. (diff) | |
download | openldap-c000cad09d0b54c455c99271bfb996c2dfe13073.tar.xz openldap-c000cad09d0b54c455c99271bfb996c2dfe13073.zip |
Adding upstream version 2.4.47+dfsg.upstream/2.4.47+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/ldapc++/src/LDAPBindRequest.h')
-rw-r--r-- | contrib/ldapc++/src/LDAPBindRequest.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/contrib/ldapc++/src/LDAPBindRequest.h b/contrib/ldapc++/src/LDAPBindRequest.h new file mode 100644 index 0000000..9211245 --- /dev/null +++ b/contrib/ldapc++/src/LDAPBindRequest.h @@ -0,0 +1,61 @@ +// $OpenLDAP$ +/* + * Copyright 2000-2018 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#ifndef LDAP_BIND_REQUEST_H +#define LDAP_BIND_REQUEST_H + +#include <LDAPRequest.h> +#include <LDAPResult.h> +#include <SaslInteractionHandler.h> + +class LDAPBindRequest : LDAPRequest { + private: + std::string m_dn; + std::string m_cred; + std::string m_mech; + + public: + LDAPBindRequest( const LDAPBindRequest& req); + //just for simple authentication + LDAPBindRequest(const std::string&, const std::string& passwd, + LDAPAsynConnection *connect, const LDAPConstraints *cons, + bool isReferral=false); + virtual ~LDAPBindRequest(); + virtual LDAPMessageQueue *sendRequest(); +}; + +class LDAPSaslBindRequest : LDAPRequest +{ + public: + LDAPSaslBindRequest( const std::string& mech, const std::string& cred, + LDAPAsynConnection *connect, const LDAPConstraints *cons, + bool isReferral=false); + virtual LDAPMessageQueue *sendRequest(); + virtual ~LDAPSaslBindRequest(); + + private: + std::string m_mech; + std::string m_cred; +}; + +class LDAPSaslInteractiveBind : LDAPRequest +{ + public: + LDAPSaslInteractiveBind( const std::string& mech, int flags, + SaslInteractionHandler *sih, LDAPAsynConnection *connect, + const LDAPConstraints *cons, bool isReferral=false); + virtual LDAPMessageQueue *sendRequest(); + virtual LDAPMsg* getNextMessage() const; + virtual ~LDAPSaslInteractiveBind(); + + private: + std::string m_mech; + int m_flags; + SaslInteractionHandler *m_sih; + LDAPResult *m_res; +}; +#endif //LDAP_BIND_REQUEST_H + |