Apache-SiteControl
view release on metacpan or search on metacpan
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Apache-SiteControl
version: 1.01
version_from: lib/Apache/SiteControl.pm
installdirs: site
requires:
Apache::AuthCookie: 3.04
Apache::Session::File: 1.54
Crypt::CAST5: 0.04
Crypt::CBC: 2.14
distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.17
Makefile.PL view on Meta::CPAN
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'Apache::SiteControl',
VERSION_FROM => 'lib/Apache/SiteControl.pm',
PREREQ_PM => { Apache::AuthCookie => 3.04,
Apache::Session::File => 1.54,
Crypt::CBC => 2.14,
Crypt::CAST5 => 0.04,
}, # e.g., Module::Name => 1.1
ABSTRACT => 'An object-oriented, fine-grained site access control facility',
AUTHOR => 'Tony Kay <tkay@uoregon.edu>',
);
lib/Apache/SiteControl/UserFactory.pm view on Meta::CPAN
package Apache::SiteControl::UserFactory;
use 5.008;
use strict;
use warnings;
use Carp;
use Data::Dumper;
use Apache::SiteControl::User;
use Crypt::CBC;
our $VERSION = "1.0";
our $engine;
our $encryption_key;
sub init_engine
{
my $cipher = shift;
my $key = shift;
if(!defined($engine)) {
$engine = Crypt::CBC->new({ key => $key, cipher => $cipher });
}
}
# Params: Apache request, username, password, other credentials...
sub makeUser
{
my $this = shift;
my $r = shift;
my $username = shift;
my $password = shift;
lib/Apache/SiteControl/UserFactory.pm view on Meta::CPAN
=item UserObjectSavePassword (default 0)
Indicates that the password should be saved in the local session data, so that
it is available to other parts of the web app (and not just the auth system).
This might be necessary if you are logging the user in and out of services on
the back end (like in webmail and database apps).
=item UserObjectPasswordCipher (default CAST5)
The CBC cipher used for encrypting the user passwords in the session files (See
Crypt::CBC for info on allowed ciphers...this value is passed directly to
Crypt::CBC->new). If you are saving user passwords, they will be encrypted when
stored in the apache session files. This gives a little bit of added security,
and makes the apache config the only sensitive file (since that is where you
configure the key itself) instead of every random session file that is laying
around on disk.
There is a global variable in this package called $encryption_key, which will
be used if this variable is not set. The suggested method is to set the
encryption key during server startup using a random value (i.e. from
/dev/random), so that all server forks will inherit the value.
( run in 0.668 second using v1.01-cache-2.11-cpan-df04353d9ac )