Lemonldap::NG::Handler 0.06 review

Download
by rbytes.net on

License: Perl Artistic License
File size: 0K
Developer: Xavier Guimard
0 stars award from rbytes.net

Lemonldap::NG::Handler is a Perl extension for building a Lemonldap compatible handler.

SYNOPSIS

Create your own package:

package My::Package;
use Lemonldap::NG::Handler;

our @ISA = qw(Lemonldap::NG::Handler);

__PACKAGE__->init ({locationRules => { 'default' => '$ou =~ /brh/'},
globalStorage => 'Apache::Session::MySQL',
globalStorageOptions => {
DataSource => 'dbi:mysql:database=dbname;host=127.0.0.1',
UserName => 'db_user',
Password => 'db_password',
TableName => 'sessions',
LockDataSource => 'dbi:mysql:database=dbname;host=127.0.0.1',
LockUserName => 'db_user',
LockPassword => 'db_password',
},
localStorage => 'Cache::DBFile',
localStorageOptions => {},
portal => 'https://portal/',
});

More complete example
package My::Package;
use Lemonldap::NG::Handler;

our @ISA = qw(Lemonldap::NG::Handler);

__PACKAGE__->init ( { locationRules => {
'^/pj/.*$' => q($qualif="opj"),
'^/rh/.*$' => q($ou=~/brh/),
'^/rh_or_opj.*$' => q($qualif="opj or $ou=~/brh/),
default => 'accept', # means that all authenticated users are greanted
},
globalStorage => 'Apache::Session::MySQL',
globalStorageOptions => {
DataSource => 'dbi:mysql:database=dbname;host=127.0.0.1',
UserName => 'db_user',
Password => 'db_password',
TableName => 'sessions',
LockDataSource => 'dbi:mysql:database=dbname;host=127.0.0.1',
LockUserName => 'db_user',
LockPassword => 'db_password',
},
localStorage => 'Cache::DBFile',
localStorageOptions => {},
cookieName => 'lemon',
portal => 'https://portal/',
whatToTrace => '$uid',
exportedHeaders => {
'Auth-User' => '$uid',
'Unit' => '$ou',
https => 1,
}
);
Call your package in < apache-directory>/conf/httpd.conf
PerlRequire MyFile
# TOTAL PROTECTION
PerlInitHandler My::Package
# OR SELECTED AREA
< Location /protected-area >
PerlInitHandler My::Package
< /Location >

Requirements:
Perl

Lemonldap::NG::Handler 0.06 search tags