Please clarify lwp authentication?

B

Bob Mariotti

First, I have lwpcook, Perl & LWP, Web Client Programming, Perl in a
Nutshell and Network Programming with Perl ALL in front of me. And, I
have read and reread the sections on LWP. I've also scoured usenet
with google groups but I am still confused because none of these
sources (including perldoc.org) actually explain.

I have a program that must send authentication as a basic header.
This is being accomplished with the following instructions:

$REQ= POST $URL2;
$REQ->authorization_basic("$USERID","$PASSWD");

At this level the content of the USERID and PASSWD are plain text. It
appears that when the $RSP=$UA->request($REQ); is executed, the
modules must be base64_encoding the values because when I dump the
request itself I can see the encoded string.

However, it seems that the encoded string is encoded TWICE.
If I take the encoded string from the logged request and pass it
through a decoder it return the phrase:

BASIC -another_encoded_string-

If I then take the -another_encoded_string- and pass it through the
decoder by itself it returns my plain text USERID and PASSWD string.

Go figure!

Am I understanding this correctly? Because this is not what one is
led to believe when reading all the reference docs.

I just want to understand so we can forever more use it correctly.

Please comment advise?

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

LWP and Xerox printers 1
reading LWP in chunks 6
form post URL encoded 4
LWP::Request technical question? 2
can LWP handle this? 7
problems with LWP & HTTP 4
Caching robots.txt in LWP::RobotUA 1
LWP hangs 7

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top