Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://56758]
and the rats come out to play...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2018-05-24 01:33 GMT
Find Nodes?
    Voting Booth?