|
/*
* ANNOTATED AND DOCUMENTED BY Eduardo Sobrino
* -----------------------------------------------------------------------------
* Project : General LDAP User Support (UNIX + Windows)
* Contents : Provide a class that define and implements a general support for
* : LDAP User.
* Depends : UNMANAGED C/C++
* Compatible : The following code will complie/run on Win32 (Windows) and any
* : UNIX platform.
* File : ClLdapUser.h
* Copywright : Open Knowledge (c) 2000
* Author : Eduardo Sobrino
* Date : Jun/2000
* Updated : Aug/2000 (Added support for message queue [WIN32 only])
*/
#ifndef INCLUDE_CLLDAPUSER_
#define INCLUDE_CLLDAPUSER_
#include <ClLdap.h>
class ClLdapUser {
private:
ClLdap *pLdap ; // pointer to Ldap session object
TCHAR *pUsersDN ; // user DN
public:
ClLdapUser(ClLdap *pInLdap,TCHAR *pInUsersDN)
{ pLdap = pInLdap ; pUsersDN = xstrdup(pInUsersDN) ; } ;
~ClLdapUser()
{ if (pUsersDN) free(pUsersDN) ; } ;
bool Delete(TCHAR *pUserId) ;
bool Exists(TCHAR *pUserId) ;
bool Find(TCHAR *pUserId,TCHAR *pAttr,TCHAR *pValue,int iValLen) ;
bool Add(TCHAR *pAcct,TCHAR *pUserId,TCHAR *pPassword) ;
bool Add(TCHAR *pUserId,TCHAR *pPassword)
{ return(Add(pUserId,pUserId,pPassword)) ; } ;
bool UpdateAccount(TCHAR *pAcct,TCHAR *pUserId,TCHAR *pNewPassword) ;
bool SetPassword(TCHAR *pUserId,TCHAR *pNewPassword) ;
bool Authenticate(TCHAR *pUserId,TCHAR *pNewPassword) ;
} ;
#endif
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.