[Xitami] Password protected Perl CGI.

Ewen McNeill xitami@lists.xitami.org
Tue, 14 Aug 2001 20:58:50 +1200


In message <sb77bf12.020@GWM.SC.EDU>, "David Michaels" writes:
>First part.  I have been searching for a simple way to password protect a Perl 
>CGI program.  

1. Let the webserver do it with basic authentication. 

2. Have the CGI pretend to do basic authentication, by sending
   authentication required responses out unless it sees the right
   authentication header.  (Basic authentication is just that, basic.
   I've done it in a few lines of code several times, and if you can
   live with a hard coded username/password it's even easier.)

Basic authentication is robust against someone book marking the page;
they'll be prompted once-per-session when they come back to the page.

Xitami can do all of this for you if you set up the xitami.aut file
appropriately.

Ewen

-- 
Ewen McNeill, Technical Consultant, iMatix Corporation  www.imatix.com