cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

CURLOPT_PASSWDFUNCTION

From: Joerg Mueller-Tolk <curl_at_mueller-tolk.de>
Date: Mon, 04 Aug 2003 12:49:04 +0200

Hi all

As far as I am aware of, you can specify a password with the password
callback during curl_easy_perfom() if one is needed.
But the username has to be set before by a call to curl_easy_setopt().
In case of a HTTP operation, I might not know whether some (proxy)
authentification is need and do not want to ask the user for its name
(and domain) needlessly.
Up to now, I wait for a HTTP 407 or "Proxy requires authentification"
error, ask the user for both name and password and do a start over.

What do you think of a new option CURLOPT_AUTHFUNCTION with a callback
similar to

int my_auth(
    void *client,
    char *prompt,
    char *domain_user_passwd_buffer,
    int domain_user_passwd_buflen);

The callback could be called if no CURLOPT_PASSWDFUNCTION is specified
and data is needed.
The format of domain_user_passwd_buffer could be "domain\\user:passwd"
or just "user:passwd".

Joerg M-T

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-04

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET