BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
I'm try to request a digest authentication protected web page use LWP. The documentation seems to be scattered and severely lacking on how to do this.
I've found reference to a credentials method of LWP::UserAgent, but this requires I supply the realm in addition to the userid and password, which doesn't make much sense because the realm (along with the nonce and qop), is provided by the server, in a header as a part of 401 Unauthorised response:
HTTP/1.1 401 Unauthorized WWW-Authenticate: Digest realm="Realm3", nonce="ded45a7b48533331610bf1 +fb682c920f", qop=auth Content-Type: text/html
So why (and how with a server that changes the realm on a per request basis), do I have to supply it to LWP? Shouldn't it extract these values from the 401 header and use them to construct the authorisation digest?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP and Digest Authentication
by ikegami (Patriarch) on Feb 11, 2009 at 02:30 UTC | |
by BrowserUk (Patriarch) on Feb 11, 2009 at 02:43 UTC | |
by ikegami (Patriarch) on Feb 11, 2009 at 02:46 UTC | |
by BrowserUk (Patriarch) on Feb 11, 2009 at 03:15 UTC | |
by ikegami (Patriarch) on Feb 11, 2009 at 03:51 UTC | |
by BrowserUk (Patriarch) on Feb 11, 2009 at 03:24 UTC | |
by ikegami (Patriarch) on Feb 11, 2009 at 03:49 UTC | |
| |
|
Re: LWP and Digest Authentication
by Anonymous Monk on Feb 11, 2009 at 02:16 UTC | |
by BrowserUk (Patriarch) on Feb 11, 2009 at 02:43 UTC | |
by Anonymous Monk on Feb 11, 2009 at 03:58 UTC |