Back to index

openldap  2.4.31
LDAPBindRequest.h
Go to the documentation of this file.
00001 // $OpenLDAP$
00002 /*
00003  * Copyright 2000-2012 The OpenLDAP Foundation, All Rights Reserved.
00004  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
00005  */
00006 
00007 #ifndef LDAP_BIND_REQUEST_H
00008 #define LDAP_BIND_REQUEST_H
00009 
00010 #include <LDAPRequest.h>
00011 #include <LDAPResult.h>
00012 #include <SaslInteractionHandler.h>
00013 
00014 class LDAPBindRequest : LDAPRequest {
00015     private:
00016         std::string m_dn;
00017         std::string m_cred;
00018         std::string m_mech;
00019 
00020     public:
00021         LDAPBindRequest( const LDAPBindRequest& req);
00022         //just for simple authentication
00023         LDAPBindRequest(const std::string&, const std::string& passwd, 
00024                 LDAPAsynConnection *connect, const LDAPConstraints *cons, 
00025                 bool isReferral=false);
00026         virtual ~LDAPBindRequest();
00027         virtual LDAPMessageQueue *sendRequest();
00028 };
00029 
00030 class LDAPSaslBindRequest : LDAPRequest
00031 {
00032     public:
00033         LDAPSaslBindRequest( const std::string& mech, const std::string& cred, 
00034         LDAPAsynConnection *connect, const LDAPConstraints *cons, 
00035                 bool isReferral=false);
00036         virtual LDAPMessageQueue *sendRequest();
00037         virtual ~LDAPSaslBindRequest();
00038 
00039     private:
00040         std::string m_mech;
00041         std::string m_cred;
00042 };
00043 
00044 class LDAPSaslInteractiveBind : LDAPRequest
00045 {
00046     public:
00047         LDAPSaslInteractiveBind( const std::string& mech, int flags,
00048                 SaslInteractionHandler *sih, LDAPAsynConnection *connect, 
00049                 const LDAPConstraints *cons, bool isReferral=false);
00050         virtual LDAPMessageQueue *sendRequest();
00051         virtual LDAPMsg* getNextMessage() const;
00052         virtual ~LDAPSaslInteractiveBind();
00053 
00054     private:
00055         std::string m_mech;
00056         int m_flags;
00057         SaslInteractionHandler *m_sih;
00058         LDAPResult *m_res;
00059 };
00060 #endif //LDAP_BIND_REQUEST_H
00061