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 .
source share