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/LDAPRebindAuth.h | |
parent | Initial commit. (diff) | |
download | openldap-upstream/2.4.57+dfsg.tar.xz openldap-upstream/2.4.57+dfsg.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/LDAPRebindAuth.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/contrib/ldapc++/src/LDAPRebindAuth.h b/contrib/ldapc++/src/LDAPRebindAuth.h new file mode 100644 index 0000000..db87a55 --- /dev/null +++ b/contrib/ldapc++/src/LDAPRebindAuth.h @@ -0,0 +1,55 @@ +// $OpenLDAP$ +/* + * Copyright 2000-2021 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#ifndef LDAP_REBIND_AUTH_H +#define LDAP_REBIND_AUTH_H + +#include<string> + +/** + * This class represent Authenication information for the case that the + * library is chasing referrals. + * + * The LDAPRebind::getRebindAuth() method returns an object of this type. + * And the library uses it to authentication to the destination server of a + * referral. + * @note currently only SIMPLE authentication is supported by the library + */ +class LDAPRebindAuth{ + public: + /** + * @param dn The DN that should be used for the authentication + * @param pwd The password that belongs to the DN + */ + LDAPRebindAuth(const std::string& dn="", const std::string& pwd=""); + + /** + * Copy-constructor + */ + LDAPRebindAuth(const LDAPRebindAuth& lra); + + /** + * Destructor + */ + virtual ~LDAPRebindAuth(); + + /** + * @return The DN that was set in the constructor + */ + const std::string& getDN() const; + + /** + * @return The password that was set in the constructor + */ + const std::string& getPassword() const; + + private: + std::string m_dn; + std::string m_password; +}; + +#endif //LDAP_REBIND_AUTH_H + |