How do you access the HTTP basic authentication username from perl?

泪湿孤枕 提交于 2019-12-04 10:38:00

Under the CGI spec, the HTTP-auth user name will be in the environment variable REMOTE_USER. In Perl you can get this via $ENV{REMOTE_USER}.

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

Christoffer Hammarström

The remote_user() method in the CGI module.

If you're not using the CGI module, the environment variable REMOTE_USER: $ENV{REMOTE_USER}

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!