2000-09-01 14:46:32 -04:00
|
|
|
/*
|
|
|
|
|
* Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
|
|
|
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef LDAP_BIND_REQUEST_H
|
|
|
|
|
#define LDAP_BIND_REQUEST_H
|
|
|
|
|
|
2001-03-15 06:07:58 -05:00
|
|
|
#include <LDAPRequest.h>
|
2007-12-20 07:33:48 -05:00
|
|
|
#include <LDAPResult.h>
|
|
|
|
|
#include <SaslInteractionHandler.h>
|
2000-09-01 14:46:32 -04:00
|
|
|
|
|
|
|
|
class LDAPBindRequest : LDAPRequest {
|
|
|
|
|
private:
|
2001-09-28 12:39:58 -04:00
|
|
|
std::string m_dn;
|
|
|
|
|
std::string m_cred;
|
|
|
|
|
std::string m_mech;
|
2000-09-01 14:46:32 -04:00
|
|
|
|
|
|
|
|
public:
|
2007-12-20 07:33:48 -05:00
|
|
|
LDAPBindRequest( const LDAPBindRequest& req);
|
2000-09-01 14:46:32 -04:00
|
|
|
//just for simple authentication
|
2001-09-28 12:39:58 -04:00
|
|
|
LDAPBindRequest(const std::string&, const std::string& passwd,
|
2000-10-03 14:25:34 -04:00
|
|
|
LDAPAsynConnection *connect, const LDAPConstraints *cons,
|
2000-09-01 14:46:32 -04:00
|
|
|
bool isReferral=false);
|
|
|
|
|
virtual ~LDAPBindRequest();
|
|
|
|
|
virtual LDAPMessageQueue *sendRequest();
|
2007-12-20 07:33:48 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class LDAPSaslBindRequest : LDAPRequest
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
LDAPSaslBindRequest( const std::string& mech, const std::string& cred,
|
|
|
|
|
LDAPAsynConnection *connect, const LDAPConstraints *cons,
|
|
|
|
|
bool isReferral=false);
|
|
|
|
|
virtual LDAPMessageQueue *sendRequest();
|
|
|
|
|
virtual ~LDAPSaslBindRequest();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::string m_mech;
|
|
|
|
|
std::string m_cred;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class LDAPSaslInteractiveBind : LDAPRequest
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
LDAPSaslInteractiveBind( const std::string& mech, int flags,
|
|
|
|
|
SaslInteractionHandler *sih, LDAPAsynConnection *connect,
|
|
|
|
|
const LDAPConstraints *cons, bool isReferral=false);
|
|
|
|
|
virtual LDAPMessageQueue *sendRequest();
|
|
|
|
|
virtual LDAPMsg* getNextMessage() const;
|
|
|
|
|
virtual ~LDAPSaslInteractiveBind();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::string m_mech;
|
|
|
|
|
int m_flags;
|
|
|
|
|
SaslInteractionHandler *m_sih;
|
|
|
|
|
LDAPResult *m_res;
|
2000-09-01 14:46:32 -04:00
|
|
|
};
|
|
|
|
|
#endif //LDAP_BIND_REQUEST_H
|
|
|
|
|
|