Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Basic / Digest authentication in website

by rowdog (Curate)
on Jul 11, 2010 at 21:37 UTC ( #848882=note: print w/replies, xml ) Need Help??

in reply to Basic / Digest authentication in website

LWP handles digest authentication as long as you get the credentials right. A simple example...

#!/usr/bin/perl -T use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->credentials('', 'test', 'guest', 'guest'); my $response = $ua->get(''); $response->is_success or die $response->status_line; print $response->decoded_content;

You can check your credentials with Firefox. Open the URL, notice the realm it tells you, enter user/pass and verify that you can actually log in. If all that checks out, you might need to deal with cookies and/or Javascript.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2016-10-21 22:02 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (291 votes). Check out past polls.