Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl-CGI - Emulating Apache authentication?

by rnewsham (Curate)
on Mar 08, 2013 at 10:18 UTC ( [id://1022382]=note: print w/replies, xml ) Need Help??


in reply to Perl-CGI - Emulating Apache authentication?

You could of course create a cgi based login system in a popup but I don't believe that is what you asking for.

As far as I am aware there is no way to emulate the apache auth functionality. It seems like a waste of effort to duplicate functionality when you can just use it as it is. If you want to manage the users and passwords from perl you can use Apache::Htpasswd to manipulate the .htpasswd file.

Replies are listed 'Best First'.
Re^2: Perl-CGI - Emulating Apache authentication?
by DreamT (Pilgrim) on Mar 08, 2013 at 10:22 UTC
    I want to control the behaviour (enabling/disabling) of the authentication based on dynamic variables in the Perl code, that's why I really can't use it as it is.
    I guess I can use mod_perl in some way, but the environment for this specific task is very strict - I really can't install mod_perl in the target environment.

      I think you really just need to create a cookie based login session system. If you have reasons for not wanting to store users in a database then you can still use a .htpasswd file for storing users. I think App::Authentication::Htpasswd should allow you to do that.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-19 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found