cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: LDAP Authenticate

From: Patrick Monnerat <Patrick.Monnerat_at_datasphere.ch>
Date: Mon, 21 Jul 2008 15:05:26 +0200

 
vromero_at_velneo.com wrote:
 
> I'm trying to use libcurl to authenticate a user in a LDAP, but I
don't know how.

If you intend to use user/password pair to allow access (i.e.:
authenticate) to the LDAP server (LDAP bind), you have to pass it using:
        curl_easy_setopt(handle, CURLOPT_USERPWD, "user:password");

Else if you already have access to the LDAP server and just want to get
some LDAP data based on a username and password, the search expression
depends on your target LDAP data structure: RFC4514 (for DN), RFC4515
(for filters) and RFC4516 (for URL) can help you. Libcurl LDAP output
format is LDIF. Also be aware that passwords are often stored as a
signature in LDAP data: in that case, you have to filter on the
signature, not the password itself...
 
 
Received on 2008-07-21