WWW::Authenticate - Perl extension for authenticating users
use WWW::Authenticate; # using $username and $password obtained from web page login form # authenticate the username/password combo and set a session cookie Login($dsn,$sql_username,$sql_password,$sql_table,$username,$password)) # before allowing the user to do whatever we want to control, retrieve his # current session & user ID number from cookie and validate the session number my($session,$uid) = GetSessionCookie(); if(!CheckAuth($dsn,$sql_username,$sql_password,$sql_table,$session)) { # we aren't logged in correctly } # logout the user Logout($dsn,$sql_username,$sql_password,$sql_table,$session,$uid)
Authenticate provides a method to easily authenticate web site users using session cookies and a MySQL user database.
Requires the CGI::Cookie module and MySQL.
D. Scott Barninger, barninger@fairfieldcomputers.com Chris Fleizach, chris@fightliteracy.com
Licensed under the GNU General Public License ver. 2.0 see the accompaning LICENSE file
perl(1).
To install WWW::Authenticate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Authenticate
CPAN shell
perl -MCPAN -e shell install WWW::Authenticate
For more information on module installation, please visit the detailed CPAN module installation guide.