diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 11:11:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 11:11:40 +0000 |
commit | 7731832751ab9f3c6ddeb66f186d3d7fa1934a6d (patch) | |
tree | e91015872543a59be2aad26c2fea02e41b57005d /contrib/ldapc++/src/LDAPBindRequest.h | |
parent | Initial commit. (diff) | |
download | openldap-upstream.tar.xz openldap-upstream.zip |
Adding upstream version 2.4.57+dfsg.upstream/2.4.57+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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..1a4d54d --- /dev/null +++ b/contrib/ldapc++/src/LDAPBindRequest.h @@ -0,0 +1,61 @@ +// $OpenLDAP$ +/* + * Copyright 2000-2021 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 + |