X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FApache2%2FAuthen%2FPassphrase.pm;fp=lib%2FApache2%2FAuthen%2FPassphrase.pm;h=bea2bca35a2fb3e1728ac4cc4a4c2c5e1f9ffc49;hb=7c87e9956212e10070c94f02caf0d9998e4cc433;hp=4beea0e0e8e10160a55465c48cbbb1ea7a923122;hpb=f7fdbaad4baa1b241e5f5bfa30c7585abb10b0bd;p=apache2-authen-passphrase.git diff --git a/lib/Apache2/Authen/Passphrase.pm b/lib/Apache2/Authen/Passphrase.pm index 4beea0e..bea2bca 100644 --- a/lib/Apache2/Authen/Passphrase.pm +++ b/lib/Apache2/Authen/Passphrase.pm @@ -1,4 +1,6 @@ -package Apache2::Authen::Passphrase 0.001001; +package Apache2::Authen::Passphrase; + +our $VERSION = 0.002; use 5.014000; use strict; @@ -23,7 +25,7 @@ our @EXPORT_OK = qw/pwset pwcheck pwhash USER_REGEX PASSPHRASE_VERSION INVALID_U ################################################## -our $rootdir; +our $rootdir //= $ENV{AAP_ROOTDIR}; sub pwhash{ my ($pass)=@_; @@ -103,6 +105,14 @@ Apache2::Authen::Passphrase - basic authentication with Authen::Passphrase Apache2::Authen::Passphrase is a perl module which provides easy-to-use Apache2 authentication. It exports some utility functions and it contains a PerlAuthenHandler. +The password hashes are stored in YAML files in an directory (called the C), one file per user. + +Set the C like this: + + $Apache2::Authen::Passphrase::rootdir = '/path/to/rootdir'; + +or by setting the C enviroment variable to the desired value. + =head1 FUNCTIONS =over @@ -149,6 +159,16 @@ Uses C with a cost factor of 10 =back +=head1 ENVIRONMENT + +=over + +=item AAP_ROOTDIR + +If the C is not explicitly set, it is taken from this environment variable. + +=back + =head1 AUTHOR Marius Gavrilescu, Emarius@ieval.roE