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