HTTPPassword.pm -- Perl Module

[ Back To Index ]

NAME
       HTTPPassword -- A perl module which can be used to maintain
       the password file for Apache HTTP authentication.

SYNOPSIS
	 use HTTPPassword;

	 $passwordFile	       = "/absolute/path/of/password/file";
	 $userID	       = "loginid";
	 $userPassword	       = "loginpassword";
	 $userNewPassword      = "newloginpassword";

	 $obj = new HTTPPassword($passwordFile);

	 $obj->addUser($userID, $userPassword);

	 $obj->changeUserPassword($userID, $userNewPassword);
	 $obj->changeUserPassword($userID, $userNewPassword, $userPassword);

	 $obj->generateCryptedPassword($userPassword);

	 $userArrRef = $obj->getPasswordFileUsers();

	 $cryptedPassword = $obj->getUserCryptedPassword($userID);

	 $obj->isUserExist($userID);

	 $obj->isValidUserPassword($userID, $userPassword);

	 $obj->removeUser($userID);


EXAMPLE
       Demonstratino of HTTPPassword.pm
       http://www.tneoh.zoneit.com/perl/HTTPPassword/demo.html

       AuthUserFile Administration Page (New)
       http://www.tneoh.zoneit.com/cgi/AuthUserFileAdmin/
       

DESCRIPTION
       HTTPPassword module is created so that you can easily
       maintain your password file used in Apache's HTTP
       authentication, like adding new user, update user's
       password and remove user.

CHANGES
       1.00->1.01 "removeUser" method now will verify the old
       password if it has been passed. "getPasswordFileUsers"
       method will return all the users' ID in password file.

       1.01->1.02 "srand time ^ $$;" should be 
       "srand(time ^ $$);" and in regular expression, it is 
       better to use "$1" rather than "\1". 
       getPasswordFileUsers() should skip the empty line. And 
       the comparison for the crypted password and the string 
       returned by getUserCryptedPassword() should use "eq" 
       instead of "=" sign.

       1.02->1.03 In isValidUserPassword(), $cryptedPassword 
       should be assigned, instead of doing comparision with 
       the string returned by getUserCryptedPassword().

CREDITS

       Tony Crooks http://www.leedsnet.com 

       Bill Moseley

       Qing (Cool Cat)

SOURCE
       http://www.tneoh.zoneit.com/perl/HTTPPassword/HTTPPassword.pm

AUTHOR
     Simon Tneoh Chee-Boon    tneohcb@pc.jaring.my

       Copyright (c) 1998,1999 Simon Tneoh Chee-Boon. All rights
       reserved.  This program is free software; you can
       redistribute it and/or modify it under the same terms as
       Perl itself.

VERSION
       Version 1.03   07 August 1999


[ Back To Index ]