diff --git a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler.pm b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler.pm index 6a5c2fcc9..be0a8e1be 100644 --- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler.pm +++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler.pm @@ -1,13 +1,12 @@ ## @file -# Alias for Lemonldap::NG::Handler::SharedConf +# Alias for Lemonldap::NG::Handler::DefaultHandler ## @class -# Alias for Lemonldap::NG::Handler::SharedConf +# Alias for Lemonldap::NG::Handler::DefaultHandler package Lemonldap::NG::Handler; -our $VERSION = '1.3.0'; -use Lemonldap::NG::Handler::SharedConf; -use base qw(Lemonldap::NG::Handler::SharedConf); +our $VERSION = '1.4.0'; +use base qw(Lemonldap::NG::Handler::DefaultHandler); 1; @@ -24,40 +23,17 @@ Lemonldap::NG Web-SSO system. =head1 SYNOPSIS -=head2 Create your Apache module - -Create your own package (example using a central configuration database): - - package My::Package; - use Lemonldap::NG::Handler::SharedConf; - @ISA = qw(Lemonldap::NG::Handler::SharedConf); - - __PACKAGE__->init ( { - # Local storage used for sessions and configuration - localStorage => "Cache::DBFile", - localStorageOptions => {...}, - # How to get my configuration - configStorage => { - type => "DBI", - dbiChain => "DBI:mysql:database=lemondb;host=$hostname", - dbiUser => "lemonldap", - dbiPassword => "password", - } - # Uncomment this to activate status module - # status => 1, - } ); - =head2 Configure Apache -Call your package in /apache-dir/conf/httpd.conf: +Call Handler in /apache-dir/conf/httpd.conf: # Load your package PerlRequire /My/File # TOTAL PROTECTION - PerlHeaderParserHandler My::Package + PerlHeaderParserHandler Lemonldap::NG::Handler # OR SELECTED AREA - PerlHeaderParserHandler My::Package + PerlHeaderParserHandler Lemonldap::NG::Handler The configuration is loaded only at Apache start. Create an URI to force @@ -68,35 +44,16 @@ configuration reload, so you don't need to restart Apache at each change: Order deny,allow Deny from all Allow from my.manager.com - PerlHeaderParserHandler My::Package->refresh + PerlHeaderParserHandler Lemonldap::NG::Handler->refresh -You can also disable access control for specific URIs, but be aware that -this is not really secure, since session cookies are sent to the protected -application (so they could be spoofed), and since a user could forge his -own HTTP request headers and they would not be reset. To disable access -control for specific URIs on a secure way, you should set access rule to -'skip' instead. - - - PerlHeaderParserHandler My::Package->unprotect - - To display the status page, add something like this : Order deny,allow Allow from 10.1.1.0/24 Deny from all - PerlHeaderParserHandler My::Package->status - - -If your application has a "logout" URL, you can configure it directly in Apache -configuration file (or in the manager interface). THIS IS DEPRECATED, use the -manager : - - - PerlHeaderParserHandler My::Package->logout + PerlHeaderParserHandler Lemonldap::NG::Handler->status =head1 DESCRIPTION @@ -284,8 +241,8 @@ Lemonldap::NG use 3 levels of cache for authenticated users: parameter (completed with C) and used by L to store authenticated user parameters, -=item * a L module choosed with the C parameter -(completed with C) and used to share authenticated users +=item * a L module choosed with the C parameter +(completed with C) and used to share authenticated users between Apache's threads or processus and of course between virtual hosts, =item * Lemonldap::NG::Handler variables: if the same user use the same thread @@ -329,15 +286,6 @@ Lemonldap::NG::Handler provides different modules: =over -=item * L: base module. It can be used -directly to protect a single host. - -=item * L: module used to managed virtual hosts. - -=item * L: with this module, the -configuration can be centralized. Inherits from -L and L. - =item * L: if you have only a few Perl CGI to protect, you can use this module in your CGI instead of protecting it under L. @@ -356,7 +304,7 @@ download a mod_perl2 backport. =head1 SEE ALSO -L, +L, L, L, L diff --git a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Initialization/LocalInit.pm b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Initialization/LocalInit.pm index 0f9712a80..9afafb66b 100755 --- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Initialization/LocalInit.pm +++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Initialization/LocalInit.pm @@ -15,6 +15,7 @@ package Lemonldap::NG::Handler::Initialization::LocalInit; use Mouse; +use Lemonldap::NG::Handler; # Needed to get VERSION use Lemonldap::NG::Handler::Main::Logger; our $VERSION = '1.3.0'; @@ -208,7 +209,7 @@ sub childInit { PerlPostConfigHandler => sub { my ( $c, $l, $t, $s ) = splice @_; $s->add_version_component( - 'Lemonldap::NG::Handler/' . $VERSION ); + 'Lemonldap::NG::Handler/' . $Lemonldap::NG::Handler::VERSION ); } ) unless ( $args->{hideSignature} ); }