cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to enter NTLM_AUTH?

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 26 Jan 2005 14:06:50 +0100 (CET)

On Wed, 26 Jan 2005, Mikolaj Rydzewski wrote:

> I'd like (not, I have to...) add NTLM authentication support for my
> application, I use http basic authentication already. The problem is that I
> don't have proper environment to test it. So I'd like to code it once, but
> good.

Use CURLOPT_HTTPAUTH. Set it to the method(s) you want to use:

http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTHTTPAUTH

If NTLM is the only one, set only that.

> In the production environment users login to MS Windows domain with username
> and password, they're prompted for those three parameters (domain, username
> and password). How can I supply them to libcurl? CURLOPT_PROXYUSERPWD
> expects only two arguments (username:password)

The username field should be written "domain\user" in that case. That makes
the full string "domain\user:password".

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2005-01-26