curl-library
RE: Using Digest Authentication
Date: Mon, 13 Aug 2007 15:07:09 +1200
Sorry I probably should have also pointed out that there is no user action
involved here i.e digest authentication will be done completely
programmatically.
I'm guessing I need to re-send the request once I get the '401 Unauthorized'
response but is the 'Authorization' header generated automatically by
libcurl.
Thanks
_____
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Chris Brown
Sent: Monday, 13 August 2007 10:56 a.m.
To: curl-library_at_cool.haxx.se
Subject: Using Digest Authentication
Hi
I was wondering if someone could clarify how Digest Authentication should be
implemented using libcurl (I am using version 7.16.3).
I am successfully using libcurl with basic authentication but also need to
implement digest. Using curl_easy_setopt I have set CURLOPT_HTTPAUTH with
CURLAUTH_DIGEST and also set CURLOPT_USERPWD. When I make a request to my
server I get a '100 Continue' response followed by a '401 Unauthorized'
which includes the WWW-Authenticate header with the nonce etc. If my
understanding is correct this should be what is happening for digest
authentication but I am unclear how to proceed from this point.
I imagined that libcurl would automatically respond with the appropriate
authentication based on the nonce etc provided by the server but this
doesn't appear to be happening. Am I missing something? Is there some
further steps I need to take once I receive this response from the server?
Thanks
Chris
__________ NOD32 2454 (20070812) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
Received on 2007-08-13