curl-and-python

RE: NTLM Proxy authentication

From: Kjetil Jacobsen <kjetilja_at_gmail.com>
Date: Wed, 15 Jun 2005 09:34:04 +0200

hi,

the pycurl equivalent of the CURLAUTH_* options are named HTTPAUTH_*, so
setting the PROXYAUTH option in pycurl looks something like this:

p = pycurl.Curl()
...
p.setopt(pycurl.PROXYAUTH, pycurl.HTTPAUTH_NTLM)
...

        - kjetil

-----Original Message-----
From: curl-and-python-bounces_at_cool.haxx.se
[mailto:curl-and-python-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: 14 June 2005 23:34
To: curl stuff in python
Subject: Re: NTLM Proxy authentication

On Tue, 14 Jun 2005, Andrew Bushnell wrote:

> I am poking through the source/documentation, but I am in need of
> using Pycurl to connect to a proxy server that uses NTLM authentication.
> Therefore, I need to setup my pycurl connection using the proxy
> username and port, and also specify the information for the
> authentication (username, password, domain) has anyone had any
> experience with this, any samples out there?
>
> I know for normal "Basic" authentication, I can set the PROXYUSERPWD
> option for the proxy, but I do not see how to add domain etc. information.

You set domain by preceeding the user name with [domain] [slash or
blackslash]
like:

   "domain\user:password"

(This is even how some windows HTTP servers expect you to do when using
Basic.)

You enable NTLM for the proxy auth by setting PROXYAUTH to CURLAUTH_NTLM (or
at least the pycurl equivalent)

Disclaimer: I'm speaking about generic libcurl here, I'm not fluent in
pycURL details.

--
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-and-python
_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-and-python
Received on 2005-06-15