SPUG: Login Page and Cookies

Peter Darley pdarley at kinesis-cem.com
Fri Oct 24 10:36:14 CDT 2003


Sam,
	You might want to look at the Apache::Session stuff if you're using
mod_perl.  It'll handle the cookies for you, and it only takes a couple of
lines to implement.  Additionally it will allow you to have session
variables (saving states between page hits), which can be very nice.  It can
use a variety of databases and files to store the session info.  Check out
http://theoryx5.uwinnipeg.ca/CPAN/data/Apache-Session/Session.html.  If you
want any sample code using this for access control let me know.
Thanks,
Peter Darley

-----Original Message-----
From: spug-list-bounces at mail.pm.org
[mailto:spug-list-bounces at mail.pm.org]On Behalf Of Sam Carpenter
Sent: Friday, October 24, 2003 12:27 AM
To: spug-list at mail.pm.org
Subject: SPUG: Login Page and Cookies


I am just getting started with Perl (switching from Java and .NET) and
I have a project where I want to create a login page instead of using
.htaccess.  I have the book, "Writing CGI Applications with Perl" by
Kevin Meltzer and Brent Michalski.  The authors have an example
application (chapter 14) where they create a login page and use the CGI
module to set and verify cookies to verify whether a user is logged in
or not.  Is this an acceptable way to manage user logins?

For clarification, I am just writing a simple quoting application for a
customer with less than 10 users.  Therefore the security doesn't need
to be bullet-proof but it should be somewhat trustworthy.  I am not
going with .htaccess for aesthetic reasons and a custom login page
gives me easy access to the user id (assuming that getting through
.htaccess would be difficult?).


Thanks,

Sam Carpenter
Closehauled Solutions, LLC

_____________________________________________________________
Seattle Perl Users Group Mailing List
POST TO: spug-list at mail.pm.org  http://spugwiki.perlocity.org
ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
MEETINGS: 3rd Tuesdays, U-District, Seattle WA
WEB PAGE: http://www.seattleperl.org





More information about the spug-list mailing list