| 1 |
// $OpenLDAP$ |
| 2 |
/* |
| 3 |
* Copyright 2000-2024 The OpenLDAP Foundation, All Rights Reserved. |
| 4 |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef LDAP_REBIND_AUTH_H |
| 8 |
#define LDAP_REBIND_AUTH_H |
| 9 |
|
| 10 |
#include<string> |
| 11 |
|
| 12 |
/** |
| 13 |
* This class represent Authentication information for the case that the |
| 14 |
* library is chasing referrals. |
| 15 |
* |
| 16 |
* The LDAPRebind::getRebindAuth() method returns an object of this type. |
| 17 |
* And the library uses it to authentication to the destination server of a |
| 18 |
* referral. |
| 19 |
* @note currently only SIMPLE authentication is supported by the library |
| 20 |
*/ |
| 21 |
class LDAPRebindAuth{ |
| 22 |
public: |
| 23 |
/** |
| 24 |
* @param dn The DN that should be used for the authentication |
| 25 |
* @param pwd The password that belongs to the DN |
| 26 |
*/ |
| 27 |
LDAPRebindAuth(const std::string& dn="", const std::string& pwd=""); |
| 28 |
|
| 29 |
/** |
| 30 |
* Copy-constructor |
| 31 |
*/ |
| 32 |
LDAPRebindAuth(const LDAPRebindAuth& lra); |
| 33 |
|
| 34 |
/** |
| 35 |
* Destructor |
| 36 |
*/ |
| 37 |
virtual ~LDAPRebindAuth(); |
| 38 |
|
| 39 |
/** |
| 40 |
* @return The DN that was set in the constructor |
| 41 |
*/ |
| 42 |
const std::string& getDN() const; |
| 43 |
|
| 44 |
/** |
| 45 |
* @return The password that was set in the constructor |
| 46 |
*/ |
| 47 |
const std::string& getPassword() const; |
| 48 |
|
| 49 |
private: |
| 50 |
std::string m_dn; |
| 51 |
std::string m_password; |
| 52 |
}; |
| 53 |
|
| 54 |
#endif //LDAP_REBIND_AUTH_H |
| 55 |
|