Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Getting username and password from the URL.

by chromatic (Archbishop)
on Jun 11, 2000 at 02:27 UTC ( #17550=note: print w/replies, xml ) Need Help??


in reply to Getting username and password from the URL.

$ENV{REMOTE_USER} will give you the username, after it's been authenticated by the web server.

If you've built your own server out of something like HTTP::Daemon, you can get a request object and grab the Authorization header to parse it yourself:

my $r = $daemon->get_request(); my ($username, $password) = split(/:/, $r->header('Authorization'), 2) +;

Update:

Yeah, that did say 'REQUEST_USER' before. Sorry, I merged the right line with the description of 'REQUEST_METHOD' as I read it.

Replies are listed 'Best First'.
Re: Re: Getting username and password from the URL.
by Fastolfe (Vicar) on Apr 08, 2003 at 20:48 UTC
    Are you aware of an existing HTTP::Daemon-side implementation of Digest authentication?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://17550]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2017-12-16 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (459 votes). Check out past polls.

    Notices?