
WE::Util::Htpasswd - create apache .htpasswd files from a user database

use WE::Util::Htpasswd;
WE::Util::Htpasswd::create("/var/www/.htpasswd", $complex_user_db);

Create apache .htpasswd files from a WE_Framework user database.
Create the .htpasswd as $dest_file from the (complex) user database object $user_db. Note that the user database should use the "none" CryptMode (that is, store plain text passwords).
Add the entry for a user to the .htpasswd file $dest_file. The user object should be a WE::UserObj object as created in WE::DB::ComplexUser.
Return a string of invalid characters for htpasswd usernames. This is handy for using in ComplexUser:
new WE::DB::ComplexUser(..., ...,
-crypt => "none",
-invalidchars => WE::Util::Htpasswd::invalid_chars(),
-invalidgroupchars => WE::Util::Htgroup::invalid_chars())

Maybe optionally use Apache::Htpasswd from CPAN to create .htpasswd. This would be handy if htpasswd is not available.

Slaven Rezic - slaven@rezic.de

htpasswd(1), WE::DB::ComplexUser, WE::Util::Htgroup, WE::Util::Htaccess.