Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: LWP::UserAgent vs. NTLM Challenge/Response

by atemon (Chaplain)
on Oct 04, 2007 at 14:36 UTC ( [id://642666]=note: print w/replies, xml ) Need Help??


in reply to LWP::UserAgent vs. NTLM Challenge/Response

In many cases, the site with SSO sets session cookies to keep track of authenticated sessios. Please try enabling cookie jars for LWP::Useragent, to store cookies either by adding

$ua->cookie_jar({ file => "$ENV{HOME}/.cookies.txt" });
or
require HTTP::Cookies; $ua->cookie_jar(HTTP::Cookies->new(file => "$ENV{HOME}/.cookies.txt" +));
or even
$ua->cookie_jar({}); #this will store cookie in memory. Not in file
to your code. Enable cookie jar before you send the request.

Hope this helps.

--VC

Replies are listed 'Best First'.
Re^2: LWP::UserAgent vs. NTLM Challenge/Response
by jpk236 (Monk) on Oct 04, 2007 at 15:18 UTC
    VC:

    Thanks for the reply. I tried all three of your examples and none of them seemed to help.

    This is all that was written to cookies.txt after I ran the script a few times with the first two examples:
    #LWP-Cookies-1.0
    - Justin

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://642666]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2024-04-23 12:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found