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