Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

PHP_AUTH_USER type authentication

by artist (Parson)
on Apr 26, 2007 at 23:05 UTC ( #612286=perlquestion: print w/replies, xml ) Need Help??

artist has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
How I can have PHP_AUTH_USER and PHP_AUTH_PW type of variable using CGI? I am Not using mod_perl. Thanks,
--Artist

Replies are listed 'Best First'.
Re: PHP_AUTH_USER type authentication
by ikegami (Patriarch) on Apr 27, 2007 at 00:01 UTC

    Do those contain the Basic-Authentication / Digest-Authentication credentials? You can fetch the user name using $cgi->remote_user() or $ENV{REMOTE_USER}. The password, however, is not provided by CGI. (It wouldn't be there in the CGI version of PHP either.)

      Does it mean that there is no Perl equivalent for this?
      I like to get username/password and authenticate the user. I don't use any other module to authenticate. I can definitely use it if required. I am not familiar with authentication modules, so please point me in appropriate direction.

      Thanks,

      --Artist
        Hi artist

        In this case, Apache does the authentication for you so you don't need the password part. You may use the username part for other purpose such as custom authorization. You need no module for this authentication type, just Read The Fine Manual from Apache site:

        Authentication, Authorization and Access Control

        I never understand myself why PHP provides such thing.


        Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://612286]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2022-12-04 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?