How to access the basic HTTP authentication username from perl?

I need to get the name of the remote user in my CGI script. Where can i find this? I want to display this name on the returned page.

+4
source share
2 answers

In the CGI specification, the HTTP-auth username will be in the REMOTE_USER environment REMOTE_USER . In Perl, you can get this through $ENV{REMOTE_USER} .

You can find descriptions of all the standard CGI environment variables, including REMOTE_USER , in section 4 of RFC 3875 .

+17
source

remote_user() method in

+13
source

Source: https://habr.com/ru/post/1305468/


All Articles