Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: CGI directory access control

by gryphon (Abbot)
on Feb 06, 2001 at 23:47 UTC ( #56758=note: print w/ replies, xml ) Need Help??


in reply to CGI directory access control

Greetings chorg,

If you can't use .htaccess files, and you don't want to use CGI, then I see it that you have only two options remaining:

  1. Use your web server's built-in security system.
  2. Use a combination of JavaScript and cookies.

The problem with #1 is that you're going to be at the mercy of your server. Most servers only offer HTTP authentication which looks and functions much like .htaccess files do. However, some really cool web servers allow you to massively customize the authentication process in order to make it "look nicer" for your client.

Option #2 is better in some ways. It lets you keep every page in HTML with no CGI and no server issues. It's somewhat annoying because it forces users to allow cookies, but IMHO, everyone should set cookies to auto-go.

With #2, you call a JavaScript file from your HTML document that checks for an authentication cookie. If no cookie exists, you boot the user to an authentication page. That page itself will probably have to be CGI based.

The real negative with this system is that a user could either turn off JavaScript or figure out how your authentication cookie is stored and create one for themselves.

-Gryphon.


Comment on Re: CGI directory access control

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2014-11-25 22:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (160 votes), past polls