Lemonldap::NG::Handler::SharedConf - Perl extension for adding dynamic configuration to Lemonldap::NG::Handler. To use for inheritance.
package My::Package; use Lemonldap::NG::Handler::SharedConf; @ISA = qw(Lemonldap::NG::Handler::SharedConf); sub getConf { # Write here your configuration download system # It has to return a hash reference containing # global configuration variables: # { # locationRules => { '^/.*$' => '$ou =~ /brh/'}, # globalStorage => 'Apache::Session::MySQL', # globalStorageOptions => { # ... # } # portal => 'https://portal/', # } } __PACKAGE__->init ( { localStorage => "Cache::DBFile", localStorageOptions => {}, reloadTime => 1200, # Default: 600 } );
Change configuration :
# <apache>/conf/httpd.conf <Location /location/that/I/ve/choosed> Order deny,allow Deny from all Allow from my.manager.com PerlInitHandler My::Package::refresh </Location>
Lemonldap is a simple Web-SSO based on Apache::Session modules. It simplifies the build of a protected area with a few changes in the application (they just have to read some headers for accounting).
It manages both authentication and authorization and provides headers for accounting. So you can have a full AAA protection for your web space.
This library splits Lemonldap::NG::Handler initialization into 2 phases: local initialization and global configuration set. It can be used if you want to write a module that can change its global configuration without restarting Apache.
Like Lemonldap::NG::Handler::init() but read only localStorage related options. You may change default time between two configuration checks with the reloadTime parameter (default 600s).
reloadTime
Does nothing by default. You've to overload it to write your own configuration download system.
Same as Lemonldap::NG::Handler.
Each new Apache child checks if there's a configuration stored in the local store. If not, it calls getConf to get one and store it in the local store by calling setconf.
Every 600 seconds, each Apache child checks if the local stored configuration has changed and reload it if it has.
When refresh subroutine is called (by http for example: see synopsis), getConf is called to get the new configuration and setconf is called to store it in the local store.
Lemonldap::NG::Handler
http://lemonldap.sourceforge.net/
Xavier Guimard, <x.guimard@free.fr>
Copyright (C) 2005 by Xavier Guimard
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.
Lemonldap was originaly written by Eric german who decided to publish him in 2003 under the terms of the GNU General Public License version 2.
To install Lemonldap::NG::Handler, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lemonldap::NG::Handler
CPAN shell
perl -MCPAN -e shell install Lemonldap::NG::Handler
For more information on module installation, please visit the detailed CPAN module installation guide.