LEMONLDAP::NG : New module Lemonldap::NG::Common. It contains Conf.pm and Cie

This commit is contained in:
Xavier Guimard 2008-11-17 16:59:56 +00:00
parent dd0c815795
commit cae4cbade0
45 changed files with 264 additions and 124 deletions

View File

@ -14,6 +14,7 @@ LDAPPORT="389"
LDAPSUFFIX="dc=example,dc=net"
# Other
VERSION=`head -n1 changelog |sed -e 's/lemonldap-ng (//' -e 's/).*$$//'`
SRCCOMMONDIR=lemonldap-ng-common
SRCHANDLERDIR=lemonldap-ng-handler
SRCPORTALDIR=lemonldap-ng-portal
SRCMANAGERDIR=lemonldap-ng-manager
@ -32,7 +33,11 @@ REALDESTFILECONFDIR=$(REALSYSTEMCONFDIR)conf/
REALDESTSESSIONDIR=$(REALSCRIPTSDIR)sessions/
REALDESTLASPDIR=$(REALSCRIPTSDIR)liberty-alliance-sp-portal
all: handler manager portal
all: common handler manager portal
common: common_conf
@$(MAKE) -C ${SRCCOMMONDIR}
@touch common
handler: handler_conf
@$(MAKE) -C ${SRCHANDLERDIR}
@ -46,7 +51,11 @@ manager: manager_conf
@$(MAKE) -C ${SRCMANAGERDIR}
@touch manager
configure: handler_conf portal_conf manager_conf
configure: common_conf handler_conf portal_conf manager_conf
common_conf:
@cd ${SRCCOMMONDIR}; perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS)
@touch common_conf
handler_conf:
@cd ${SRCHANDLERDIR}; perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS)
@ -60,18 +69,25 @@ manager_conf:
@cd ${SRCMANAGERDIR}; perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS)
@touch manager_conf
test: manager handler portal manager_test handler_test portal_test
test: common handler portal manager common_test handler_test portal_test manager_test
manager_test: manager
@$(MAKE) -C ${SRCMANAGERDIR} test
common_test: common
@$(MAKE) -C ${SRCCOMMONDIR} test
handler_test: handler
@$(MAKE) -C ${SRCHANDLERDIR} test INST_ARCHLIB=../${SRCMANAGERDIR}/blib/lib/
handler_test: handler common_test
@$(MAKE) -C ${SRCHANDLERDIR} test INST_ARCHLIB=../${SRCCOMMONDIR}/blib/lib/
portal_test: portal
@$(MAKE) -C ${SRCPORTALDIR} test INST_ARCHLIB=../${SRCMANAGERDIR}/blib/lib/
portal_test: portal handler_test common_test
@$(MAKE) -C ${SRCPORTALDIR} test INST_ARCHLIB=../${SRCCOMMONDIR}/blib/lib/
install: handler_install portal_install manager_install
manager_test: manager handler_test common_test
@$(MAKE) -C ${SRCMANAGERDIR} test INST_ARCHLIB=../${SRCCOMMONDIR}/blib/lib/
install: common_install handler_install portal_install manager_install
common_install: common
@$(MAKE) -C ${SRCCOMMONDIR} install
@touch common_install
handler_install: handler
@$(MAKE) -C ${SRCHANDLERDIR} install
@ -87,11 +103,15 @@ manager_install: manager
distclean: clean
clean: handler_clean portal_clean manager_clean
clean: common_clean handler_clean portal_clean manager_clean
@rm -rf ${SYSTEMCONFDIR}
@rm -rf ${SCRIPTSDIR}
@rm -vf *gz
common_clean:
- $(MAKE) -C ${SRCCOMMONDIR} distclean
@rm -vf common*
handler_clean:
- $(MAKE) -C ${SRCHANDLERDIR} distclean
@rm -vf handler*
@ -165,6 +185,10 @@ production_install: production_preconf example
uninstall: configure handler_uninstall portal_uninstall manager_uninstall
common_uninstall: common
@$(MAKE) -C ${SRCCOMMONDIR} uninstall
@rm -vf common_uninstall
handler_uninstall: handler
@$(MAKE) -C ${SRCHANDLERDIR} uninstall
@rm -vf handler_uninstall
@ -180,7 +204,7 @@ manager_uninstall: manager
dist: clean
@- $(MAKE) clean
@mkdir -p lemonldap-ng-$(VERSION)
@- cp -pR lemonldap-ng-manager/ lemonldap-ng-portal/ lemonldap-ng-handler/ * lemonldap-ng-$(VERSION)
@- cp -pR lemonldap-ng-common/ lemonldap-ng-manager/ lemonldap-ng-portal/ lemonldap-ng-handler/ * lemonldap-ng-$(VERSION)
@- dir=lemonldap-ng-$(VERSION); find $$dir -name .svn -exec rm -rf {} \; 2>/dev/null
@rm -rf lemonldap-ng-$(VERSION)/lemonldap-ng-$(VERSION)
@tar czf lemonldap-ng-$(VERSION).tar.gz lemonldap-ng-$(VERSION)
@ -189,7 +213,11 @@ dist: clean
debian-dist: dist
@mv lemonldap-ng-$(VERSION).tar.gz lemonldap-ng_$(VERSION).orig.tar.gz
cpan: clean configure handler_cpan portal_cpan manager_cpan
cpan: clean configure common_cpan handler_cpan portal_cpan manager_cpan
common_cpan: common_conf
@$(MAKE) -C ${SRCCOMMONDIR} dist
@mv ${SRCCOMMONDIR}/Lemonldap*.gz .
handler_cpan: handler_conf
@$(MAKE) -C ${SRCHANDLERDIR} dist

View File

@ -1,6 +1,7 @@
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager/Apache/*
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager/Conf*
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::Conf*
debian/tmp/usr/share/perl5/Lemonldap/NG/Common/Apache/*
debian/tmp/usr/share/perl5/Lemonldap/NG/Common/Conf*
debian/tmp/usr/share/man/man3/Lemonldap::NG::Common::Apache::Session::SOAP.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Common::Conf*
debian/tmp/usr/share/man/man1/lmConfig_File2MySQL.1p
debian/tmp/usr/bin/lmConfig* /usr/share/lemonldap-ng/bin
debian/configStorage.pm /usr/share/lemonldap-ng

View File

@ -11,7 +11,6 @@ debian/tmp/usr/share/perl5/auto/Lemonldap/NG/Manager
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::Base.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::SOAPServer.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::Apache::Session::SOAP.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::Restricted.3pm
debian/tmp/var/lib/lemonldap-ng/manager/apply.conf /etc/lemonldap-ng
debian/manager-apache*.conf /etc/lemonldap-ng

View File

@ -75,7 +75,7 @@ install: build
# System to use /etc/lemonldap-ng/storage.conf instead of setting
# manually the configStorage parameter
perl -000 -i -pe 's/(Lemonldap::NG::Manager::Conf.*new\s*\(\s*){[^}]+}/$$1\$$Lemonldap::NG::Conf::configStorage/; s#^use#\nrequire "/usr/share/lemonldap-ng/configStorage.pm";\nuse#m;' \
perl -000 -i -pe 's/(Lemonldap::NG::Common::Conf.*new\s*\(\s*){[^}]+}/$$1\$$Lemonldap::NG::Conf::configStorage/; s#^use#\nrequire "/usr/share/lemonldap-ng/configStorage.pm";\nuse#m;' \
$(DEB_TMP_LM_ROOT)manager/scripts/lmConfigEditor \
$(DEB_TMP_LM_ROOT)portal/scripts/purgeCentralCache

View File

@ -0,0 +1 @@
../../modules/lemonldap-ng-common

View File

@ -0,0 +1,5 @@
Revision history for Perl extension Lemonldap::NG::Common.
0.1 Mon Nov 17 16:34:56 2008
- New package including the old Lemonldap::NG::manager::Conf

View File

@ -0,0 +1,17 @@
Changes
lib/Lemonldap/NG/Common.pm
lib/Lemonldap/NG/Common/Apache/Session/SOAP.pm
lib/Lemonldap/NG/Common/Conf.pm
lib/Lemonldap/NG/Common/Conf/Constants.pm
lib/Lemonldap/NG/Common/Conf/DBI.pm
lib/Lemonldap/NG/Common/Conf/File.pm
lib/Lemonldap/NG/Common/Conf/SOAP.pm
Makefile.PL
MANIFEST
README
scripts/lmConfig_File2MySQL
t/01-Manager-Conf.t
t/02-Manager-Conf-File.t
t/03-Manager-Conf-DBI.t
t/04-Manager-Conf-SOAP.t
t/10-Common.t

View File

@ -0,0 +1,17 @@
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'Lemonldap::NG::Common',
VERSION_FROM => 'lib/Lemonldap/NG/Common.pm', # finds $VERSION
PREREQ_PM => {
'DBI' => 0,
'Storable' => 0,
}, # e.g., Module::Name => 1.1
EXE_FILES => [
'scripts/lmConfig_File2MySQL',
],
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/Lemonldap/NG/Common.pm', # retrieve abstract from module
AUTHOR => 'guimard <guimard@>') : ()),
);

View File

@ -0,0 +1,29 @@
Lemonldap-NG-Common version 0.01
================================
Lemonldap::NG infrastructure common files
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
DEPENDENCIES
This module requires these other modules and libraries:
blah blah blah
COPYRIGHT AND LICENCE
Copyright (C) 2008 by 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.10.0 or,
at your option, any later version of Perl 5 you may have available.

View File

@ -0,0 +1,48 @@
package Lemonldap::NG::Common;
use strict;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(
);
our $VERSION = '0.1';
1;
__END__
# Below is stub documentation for your module. You'd better edit it!
=head1 NAME
Lemonldap::NG::Common - Common files for Lemonldap::NG infrastructure
=head1 DESCRIPTION
Lemonldap::NG is a modular Web-SSO based on Apache::Session modules. It
simplifies the build of a protected area with a few changes in the application.
This package contains common files.
=head1 SEE ALSO
L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Portal>, L<Lemonldap::NG::Handler>
=head1 AUTHOR
Xavier Guimard, E<lt>x.guimard@free.frE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2008 by 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.10.0 or,
at your option, any later version of Perl 5 you may have available.
=cut

View File

@ -1,4 +1,4 @@
package Lemonldap::NG::Manager::Apache::Session::SOAP;
package Lemonldap::NG::Common::Apache::Session::SOAP;
use strict;
use SOAP::Lite;
@ -10,7 +10,7 @@ our ( $user, $password ) = ( '', '' );
BEGIN {
sub SOAP::Transport::HTTP::Client::get_basic_credentials {
return $Lemonldap::NG::Manager::Apache::Session::SOAP::user => $Lemonldap::NG::Manager::Apache::Session::SOAP::password;
return $Lemonldap::NG::Common::Apache::Session::SOAP::user => $Lemonldap::NG::Common::Apache::Session::SOAP::password;
}
}
@ -146,7 +146,7 @@ __END__
=head1 NAME
Lemonldap::NG::Manager::Apache::Session::SOAP - Perl extension written to
Lemonldap::NG::Common::Apache::Session::SOAP - Perl extension written to
access to Lemonldap::NG Web-SSO sessions via SOAP.
=head1 SYNOPSIS
@ -161,7 +161,7 @@ access to Lemonldap::NG Web-SSO sessions via SOAP.
our @ISA = qw(Lemonldap::NG::Handler::Simple);
__PACKAGE__->init ({
globalStorage => 'Lemonldap::NG::Manager::Apache::Session::SOAP',
globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
globalStorageOptions => {
proxy => 'http://manager/cgi-bin/soapserver.pl',
proxyOptions => {
@ -178,7 +178,7 @@ access to Lemonldap::NG Web-SSO sessions via SOAP.
use Lemonldap::NG::Portal::SharedConf;
my $portal = new Lemonldap::NG::Portal::SharedConf (
globalStorage => 'Lemonldap::NG::Manager::Apache::Session::SOAP',
globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
globalStorageOptions => {
proxy => 'http://manager/cgi-bin/soapserver.pl',
proxyOptions => {
@ -198,18 +198,18 @@ manager.
=head1 DESCRIPTION
Lemonldap::NG::Manager::Conf provides a simple interface to access to
Lemonldap::NG::Common::Conf provides a simple interface to access to
Lemonldap::NG Web-SSO configuration. It is used by L<Lemonldap::NG::Handler>,
L<Lemonldap::NG::Portal> and L<Lemonldap::NG::Manager>.
Lemonldap::NG::Manager::Apache::Session::SOAP used with
Lemonldap::NG::Common::Apache::Session::SOAP used with
L<Lemonldap::NG::Manager::SOAPServer> provides the ability to acces to
Lemonldap::NG sessions via SOAP: They act as a proxy to access to the real
Apache::Session module (set as Lemonldap::NG::Manager::SOAPServer parameter).
=head2 SECURITY
As Lemonldap::NG::Manager::Conf::SOAP use SOAP::Lite, you have to see
As Lemonldap::NG::Common::Conf::SOAP use SOAP::Lite, you have to see
L<SOAP::Transport> to know arguments that can be passed to C<proxyOptions>.
Lemonldap::NG provides a system for HTTP basic authentication.
@ -272,7 +272,7 @@ set environment variables.
=head1 SEE ALSO
L<Lemonldap::NG::Manager::SOAPServer>,
L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Manager::Conf::SOAP>,
L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Common::Conf::SOAP>,
L<Lemonldap::NG::Handler>, L<Lemonldap::NG::Portal>,
http://wiki.lemonldap.objectweb.org/xwiki/bin/view/NG/Presentation

View File

@ -1,9 +1,9 @@
package Lemonldap::NG::Manager::Conf;
package Lemonldap::NG::Common::Conf;
use strict;
no strict 'refs';
use Data::Dumper;
use Lemonldap::NG::Manager::Conf::Constants;
use Lemonldap::NG::Common::Conf::Constants;
our $VERSION = 0.51;
our @ISA;
@ -24,7 +24,7 @@ sub new {
print STDERR "configStorage: type is not defined\n";
return 0;
}
$self->{type} = "Lemonldap::NG::Manager::Conf::$self->{type}"
$self->{type} = "Lemonldap::NG::Common::Conf::$self->{type}"
unless $self->{type} =~ /^Lemonldap/;
eval "require $self->{type}";
die($@) if ($@);
@ -142,23 +142,23 @@ __END__
=head1 NAME
Lemonldap::NG::Manager::Conf - Perl extension written to manage Lemonldap::NG
Lemonldap::NG::Common::Conf - Perl extension written to manage Lemonldap::NG
Web-SSO configuration.
=head1 SYNOPSIS
use Lemonldap::NG::Manager::Conf;
my $confAccess = new Lemonldap::NG::Manager::Conf(
use Lemonldap::NG::Common::Conf;
my $confAccess = new Lemonldap::NG::Common::Conf(
{
type=>'File',
dirName=>"/tmp/",
},
) or die "Unable to build Lemonldap::NG::Manager::Conf, see Apache logs";
) or die "Unable to build Lemonldap::NG::Common::Conf, see Apache logs";
my $config = $confAccess->getConf();
=head1 DESCRIPTION
Lemonldap::NG::Manager::Conf provides a simple interface to access to
Lemonldap::NG::Common::Conf provides a simple interface to access to
Lemonldap::NG Web-SSO configuration. It is used by L<Lemonldap::NG::Handler>,
L<Lemonldap::NG::Portal> and L<Lemonldap::NG::Manager>.
@ -172,14 +172,14 @@ choosen type. Examples:
=over
=item * B<File>:
$confAccess = new Lemonldap::NG::Manager::Conf(
$confAccess = new Lemonldap::NG::Common::Conf(
{
type => 'File',
dirName => '/var/lib/lemonldap-ng/',
});
=item * B<DBI>:
$confAccess = new Lemonldap::NG::Manager::Conf(
$confAccess = new Lemonldap::NG::Common::Conf(
{
type => 'DBI',
dbiChain => 'DBI:mysql:database=lemonldap-ng;host=1.2.3.4',
@ -189,7 +189,7 @@ choosen type. Examples:
});
=item * B<SOAP>:
$confAccess = new Lemonldap::NG::Manager::Conf(
$confAccess = new Lemonldap::NG::Common::Conf(
{
type => 'SOAP',
proxy => 'https://manager.example.com/soapmanager.pl',

View File

@ -1,4 +1,4 @@
package Lemonldap::NG::Manager::Conf::Constants;
package Lemonldap::NG::Common::Conf::Constants;
use strict;
use Exporter 'import';

View File

@ -1,14 +1,14 @@
package Lemonldap::NG::Manager::Conf::DBI;
package Lemonldap::NG::Common::Conf::DBI;
use strict;
use DBI;
use MIME::Base64;
use Lemonldap::NG::Manager::Conf::Constants;
use Lemonldap::NG::Common::Conf::Constants;
our $VERSION = 0.17;
BEGIN {
*Lemonldap::NG::Manager::Conf::dbh = \&dbh;
*Lemonldap::NG::Common::Conf::dbh = \&dbh;
}
sub prereq {

View File

@ -1,7 +1,7 @@
package Lemonldap::NG::Manager::Conf::File;
package Lemonldap::NG::Common::Conf::File;
use strict;
use Lemonldap::NG::Manager::Conf::Constants;
use Lemonldap::NG::Common::Conf::Constants;
our $VERSION = 0.22;

View File

@ -1,4 +1,4 @@
package Lemonldap::NG::Manager::Conf::SOAP;
package Lemonldap::NG::Common::Conf::SOAP;
use strict;
use SOAP::Lite;
@ -6,10 +6,10 @@ use SOAP::Lite;
our $VERSION = 0.2;
BEGIN {
*Lemonldap::NG::Manager::Conf::_soapCall = \&_soapCall;
*Lemonldap::NG::Manager::Conf::_connect = \&_connect;
*Lemonldap::NG::Common::Conf::_soapCall = \&_soapCall;
*Lemonldap::NG::Common::Conf::_connect = \&_connect;
sub SOAP::Transport::HTTP::Client::get_basic_credentials {
return $Lemonldap::NG::Manager::Conf::SOAP::username => $Lemonldap::NG::Manager::Conf::SOAP::password;
return $Lemonldap::NG::Common::Conf::SOAP::username => $Lemonldap::NG::Common::Conf::SOAP::password;
}
}
@ -84,7 +84,7 @@ __END__
=head1 NAME
Lemonldap::NG::Manager::Conf::SOAP - Perl extension written to access to
Lemonldap::NG::Common::Conf::SOAP - Perl extension written to access to
Lemonldap::NG Web-SSO configuration via SOAP.
=head1 SYNOPSIS
@ -151,7 +151,7 @@ Lemonldap::NG Web-SSO configuration via SOAP.
=head2 Server side
See L<Lemonldap::NG::Manager::Conf::SOAP> for documentation on client side.
See L<Lemonldap::NG::Common::Conf::SOAP> for documentation on client side.
use Lemonldap::NG::Manager::SOAPServer;
Lemonldap::NG::Manager::SOAPServer->start(
@ -162,16 +162,16 @@ See L<Lemonldap::NG::Manager::Conf::SOAP> for documentation on client side.
=head1 DESCRIPTION
Lemonldap::NG::Manager::Conf provides a simple interface to access to
Lemonldap::NG::Common::Conf provides a simple interface to access to
Lemonldap::NG Web-SSO configuration. It is used by L<Lemonldap::NG::Handler>,
L<Lemonldap::NG::Portal> and L<Lemonldap::NG::Manager>.
Lemonldap::NG::Manager::Conf::SOAP provides the "SOAP" target used to access
Lemonldap::NG::Common::Conf::SOAP provides the "SOAP" target used to access
configuration via SOAP.
=head2 SECURITY
As Lemonldap::NG::Manager::Conf::SOAP use SOAP::Lite, you have to see
As Lemonldap::NG::Common::Conf::SOAP use SOAP::Lite, you have to see
L<SOAP::Transport> to know arguments that can be passed to C<proxyOptions>.
Lemonldap::NG provides a system for HTTP basic authentication.
@ -230,7 +230,7 @@ set environment variables.
=head1 SEE ALSO
L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Manager::Conf::SOAP>,
L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Common::Conf::SOAP>,
L<Lemonldap::NG::Handler>, L<Lemonldap::NG::Portal>,
http://wiki.lemonldap.objectweb.org/xwiki/bin/view/NG/Presentation

View File

@ -1,7 +1,7 @@
#!/usr/bin/perl
use Getopt::Std;
use Lemonldap::NG::Manager::Conf;
use Lemonldap::NG::Common::Conf;
use strict;
# Get ARGS

View File

@ -6,7 +6,7 @@
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 1;
BEGIN { use_ok('Lemonldap::NG::Manager::Conf') }
BEGIN { use_ok('Lemonldap::NG::Common::Conf') }
#########################

View File

@ -6,7 +6,7 @@
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 2;
BEGIN { use_ok('Lemonldap::NG::Manager::Conf') }
BEGIN { use_ok('Lemonldap::NG::Common::Conf') }
#########################
@ -16,7 +16,7 @@ BEGIN { use_ok('Lemonldap::NG::Manager::Conf') }
my $h;
@ARGV = ("help=groups");
ok(
$h = new Lemonldap::NG::Manager::Conf(
$h = new Lemonldap::NG::Common::Conf(
{
type => 'File',
dirName => ".",

View File

@ -6,7 +6,7 @@
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 3;
BEGIN { use_ok('Lemonldap::NG::Manager::Conf') }
BEGIN { use_ok('Lemonldap::NG::Common::Conf') }
#########################
@ -16,7 +16,7 @@ BEGIN { use_ok('Lemonldap::NG::Manager::Conf') }
my $h;
@ARGV = ("help=groups");
ok(
$h = new Lemonldap::NG::Manager::Conf(
$h = new Lemonldap::NG::Common::Conf(
{
type => 'DBI',
dbiChain => "DBI:mysql:database=lemonldap-ng",

View File

@ -7,7 +7,7 @@
use Test::More tests => 4;
# SOAP::Lite is not required, so Lemonldap::NG::Manager::Conf::SOAP may
# SOAP::Lite is not required, so Lemonldap::NG::Common::Conf::SOAP may
# not run.
SKIP: {
eval { require SOAP::Lite };
@ -15,10 +15,10 @@ SKIP: {
"SOAP::Lite is not installed, so SOAP configuration access will not work",
4
if ($@);
use_ok('Lemonldap::NG::Manager::Conf');
use_ok('Lemonldap::NG::Common::Conf');
my $h;
ok(
$h = new Lemonldap::NG::Manager::Conf(
$h = new Lemonldap::NG::Common::Conf(
{
type => 'SOAP',
proxy => 'http://localhost',

View File

@ -0,0 +1,15 @@
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Lemonldap-NG-Common.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 1;
BEGIN { use_ok('Lemonldap::NG::Common') };
#########################
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.

View File

@ -1,7 +1,5 @@
Changes
example/autoProtectedCGI.pl
example/lmH-apache.conf
example/lmH-apache2.conf
example/menu.pl
example/MyHandler.pm
example/MyHandlerLog4Perl.pm

View File

@ -76,7 +76,7 @@ about the way the user will choose. When configuring your Web-SSO, you have to:
* create an array foreach virtual host associating URI regular expressions and
Perl expressions to use to grant access.
Example (See Lemonldap::NG::Manager::Conf(3) to see how configuration is stored
Example (See Lemonldap::NG::Common::Conf(3) to see how configuration is stored)
* Exported variables :

View File

@ -150,7 +150,7 @@ sub localInit {
$localStorageOptions->{namespace} ||= "lemonldap";
$localStorageOptions->{default_expires_in} ||= 600;
}
$lmConf = Lemonldap::NG::Manager::Conf->new( $args->{configStorage} );
$lmConf = Lemonldap::NG::Common::Conf->new( $args->{configStorage} );
$class->defaultValuesInit($args);
}

View File

@ -4,7 +4,7 @@ use strict;
use Lemonldap::NG::Handler::Simple qw(:all);
use Lemonldap::NG::Handler::Vhost;
use Lemonldap::NG::Manager::Conf;
use Lemonldap::NG::Common::Conf;
use Cache::Cache qw($EXPIRES_NEVER);
our @ISA = qw(Lemonldap::NG::Handler::Vhost Lemonldap::NG::Handler::Simple);
@ -61,7 +61,7 @@ sub defaultValuesInit {
sub localInit {
my ( $class, $args ) = @_;
$lmConf = Lemonldap::NG::Manager::Conf->new( $args->{configStorage} );
$lmConf = Lemonldap::NG::Common::Conf->new( $args->{configStorage} );
$class->defaultValuesInit($args);
$class->SUPER::localInit($args);
}
@ -259,7 +259,7 @@ with the C<reloadTime> parameter (default 600s).
=head3 getConf
Call Lemonldap::NG::Manager::Conf with the configStorage parameter.
Call Lemonldap::NG::Common::Conf with the configStorage parameter.
=head1 OPERATION

View File

@ -266,7 +266,7 @@ sub safe {
my $class = shift;
return $safe if($safe);
$safe = new Safe;
my @t = split /\s+/, $customFunctions;
my @t = $customFunctions ? split( /\s+/, $customFunctions ) : ();
$safe->share( '&encode_base64', '$datas', '&lmSetHeaderIn', '$apacheRequest', @t );
foreach(@t) {
$class->lmLog("Custom function : $_",'debug');

View File

@ -85,13 +85,7 @@ lib/Lemonldap/NG/Manager.pm
lib/Lemonldap/NG/Manager/_HTML.pm
lib/Lemonldap/NG/Manager/_i18n.pm
lib/Lemonldap/NG/Manager/_Response.pm
lib/Lemonldap/NG/Manager/Apache/Session/SOAP.pm
lib/Lemonldap/NG/Manager/Base.pm
lib/Lemonldap/NG/Manager/Conf.pm
lib/Lemonldap/NG/Manager/Conf/Constants.pm
lib/Lemonldap/NG/Manager/Conf/DBI.pm
lib/Lemonldap/NG/Manager/Conf/File.pm
lib/Lemonldap/NG/Manager/Conf/SOAP.pm
lib/Lemonldap/NG/Manager/Help.pm
lib/Lemonldap/NG/Manager/Restricted.pm
lib/Lemonldap/NG/Manager/Sessions.pm
@ -100,11 +94,6 @@ Makefile.PL
MANIFEST
META.yml Module meta-data (added by MakeMaker)
README
scripts/lmConfig_File2MySQL
t/01-Manager-Conf.t
t/02-Manager-Conf-File.t
t/03-Manager-Conf-DBI.t
t/04-Manager-Conf-SOAP.t
t/10-Manager.t
t/20-Manager-i18n.t
t/50-Manager-SOAPServer.t

View File

@ -5,15 +5,10 @@ WriteMakefile(
NAME => 'Lemonldap::NG::Manager',
VERSION_FROM => 'lib/Lemonldap/NG/Manager.pm', # finds $VERSION
PREREQ_PM => {
'DBI' => 0,
'CGI' => 3.08,
'Storable' => 0,
'XML::Simple' => 0,
'LWP::UserAgent' => 0,
}, # e.g., Module::Name => 1.1
EXE_FILES => [
'scripts/lmConfig_File2MySQL',
],
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/Lemonldap/NG/Manager.pm', # retrieve abstract from module
AUTHOR => 'Xavier Guimard <x.guimard@free.fr>') : ()),

View File

@ -75,7 +75,7 @@ about the way the user will choose. When configuring your Web-SSO, you have to:
* create an array foreach virtual host associating URI regular expressions and
Perl expressions to use to grant access.
Example (See Lemonldap::NG::Manager::Conf(3) to see how configuration is stored
Example (See Lemonldap::NG::Common::Conf(3) to see how configuration is stored)
* Exported variables :

View File

@ -1,7 +1,7 @@
#!/usr/bin/perl
use Lemonldap::NG::Manager::Conf;
use Lemonldap::NG::Manager::Conf::Constants;
use Lemonldap::NG::Common::Conf;
use Lemonldap::NG::Common::Conf::Constants;
use Data::Dumper;
use strict;
@ -11,7 +11,7 @@ our $editFile = `mktemp`;
chomp $refFile;
chomp $editFile;
my $conf = Lemonldap::NG::Manager::Conf->new(
my $conf = Lemonldap::NG::Common::Conf->new(
{
type => 'File',
dirName => '__CONFDIR__',

View File

@ -5,12 +5,12 @@ use strict;
use XML::Simple;
use Lemonldap::NG::Manager::Base;
use Lemonldap::NG::Manager::Conf;
use Lemonldap::NG::Common::Conf;
use Lemonldap::NG::Manager::_HTML;
require Lemonldap::NG::Manager::_Response;
require Lemonldap::NG::Manager::_i18n;
require Lemonldap::NG::Manager::Help;
use Lemonldap::NG::Manager::Conf::Constants;
use Lemonldap::NG::Common::Conf::Constants;
use LWP::UserAgent;
use Safe;
use MIME::Base64;
@ -756,7 +756,7 @@ sub config {
my $self = shift;
return $self->{_config} if $self->{_config};
$self->{_config} =
Lemonldap::NG::Manager::Conf->new( $self->{configStorage} );
Lemonldap::NG::Common::Conf->new( $self->{configStorage} );
unless ( $self->{_config} ) {
die "Configuration not loaded\n";
}
@ -834,8 +834,8 @@ configuration database system. the key 'type' must be set. Example:
dbiPassword => "pass",
}
See L<Lemonldap::Manager::NG::Manager::Conf::File> or
L<Lemonldap::Manager::NG::Manager::Conf::DBI> to know which keys are required.
See L<Lemonldap::Manager::NG::Common::Conf::File> or
L<Lemonldap::Manager::NG::Common::Conf::DBI> to know which keys are required.
=item * B<dhtmlXTreeImageLocation> (required): the location of the directory
containing dhtmlXTree images (provided in example/imgs). If this parameter

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Manager::Restricted;
use strict;
use Lemonldap::NG::Manager;
use Lemonldap::NG::Manager::Conf::Constants;
use Lemonldap::NG::Common::Conf::Constants;
our @ISA = qw(Lemonldap::NG::Manager);
our $VERSION = "0.1";

View File

@ -2,7 +2,7 @@ package Lemonldap::NG::Manager::SOAPServer;
use strict;
use SOAP::Transport::HTTP;
use Lemonldap::NG::Manager::Conf;
use Lemonldap::NG::Common::Conf;
use UNIVERSAL qw(isa);
our $VERSION = "0.3";
@ -33,7 +33,7 @@ sub new {
die qq/The "configStorage" parameter is required\n/;
return ();
}
$self->{config} = Lemonldap::NG::Manager::Conf->new( $self->{configStorage} );
$self->{config} = Lemonldap::NG::Common::Conf->new( $self->{configStorage} );
die "Configuration not loaded" unless $self->{config};
}
return $self;
@ -199,10 +199,10 @@ Lemonldap::NG Web-SSO configuration or sessions via SOAP.
=head2 Client side
See L<Lemonldap::NG::Manager::Conf::SOAP> for documentation on client side
See L<Lemonldap::NG::Common::Conf::SOAP> for documentation on client side
configuration access.
See L<Lemonldap::NG::Manager::Apache::Session::SOAP> for documentation on client side
See L<Lemonldap::NG::Common::Apache::Session::SOAP> for documentation on client side
sessions access.
=head3 Configuration access
@ -267,13 +267,13 @@ sessions access.
=head3 Sessions access
Use simply Lemonldap::NG::Manager::Apache::Session::SOAP in the 'Apache session
Use simply Lemonldap::NG::Common::Apache::Session::SOAP in the 'Apache session
module'parameter (instead of Apache::Session::MySQL or
Apache::Session::File).
=head1 DESCRIPTION
Lemonldap::NG::Manager::Conf provides a simple interface to access to
Lemonldap::NG::Common::Conf provides a simple interface to access to
Lemonldap::NG Web-SSO configuration. It is used by L<Lemonldap::NG::Handler>,
L<Lemonldap::NG::Portal> and L<Lemonldap::NG::Manager>.
@ -299,7 +299,7 @@ overload this package.
Since Lemonldap::NG::Manager::SOAPServer act as a CGI, you can protect
configuration access by any of the HTTP protection mecanisms.
See L<Lemonldap::NG::Manager::Conf::SOAP> for the security in the client
See L<Lemonldap::NG::Common::Conf::SOAP> for the security in the client
side.
In "session" mode, you can control what functions can be used by SOAP. By
@ -308,7 +308,7 @@ Use "AuthorizedFunctions" parameter to grant other functions.
=head1 SEE ALSO
L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Manager::Conf::SOAP>,
L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Common::Conf::SOAP>,
L<Lemonldap::NG::Handler>, L<Lemonldap::NG::Portal>,
http://wiki.lemonldap.objectweb.org/xwiki/bin/view/NG/Presentation

View File

@ -6,7 +6,7 @@ package Lemonldap::NG::Manager::_HTML;
use AutoLoader qw(AUTOLOAD);
require Lemonldap::NG::Manager::_i18n;
use Lemonldap::NG::Manager::Conf::Constants;
use Lemonldap::NG::Common::Conf::Constants;
our $VERSION = '0.31';

View File

@ -7,7 +7,7 @@
use Test::More tests => 3;
# SOAP::Lite is not required, so Lemonldap::NG::Manager::Conf::SOAP may
# SOAP::Lite is not required, so Lemonldap::NG::Common::Conf::SOAP may
# not run.
SKIP: {
eval { require SOAP::Transport::HTTP };

View File

@ -1,6 +1,4 @@
Changes
example/apps/apps-list.dtd
example/apps/apps-list.xml
example/apps/docs.png
example/apps/tools.png
example/apps/web.png

View File

@ -75,7 +75,7 @@ about the way the user will choose. When configuring your Web-SSO, you have to:
* create an array foreach virtual host associating URI regular expressions and
Perl expressions to use to grant access.
Example (See Lemonldap::NG::Manager::Conf(3) to see how configuration is stored
Example (See Lemonldap::NG::Common::Conf(3) to see how configuration is stored)
* Exported variables :

View File

@ -66,8 +66,8 @@ BEGIN {
}
}
use Lemonldap::NG::Manager::Conf;
use Lemonldap::NG::Manager::Conf::Constants;
use Lemonldap::NG::Common::Conf;
use Lemonldap::NG::Common::Conf::Constants;
use strict;
use DBI;
@ -80,7 +80,7 @@ print $cgi->header(
print "LEMONLDAP::NG::PORTAL STATUS\n\nConfiguration : ";
my $lmconf = Lemonldap::NG::Manager::Conf->new(
my $lmconf = Lemonldap::NG::Common::Conf->new(
{
type => 'File',
dirName => '__CONFDIR__',

View File

@ -67,12 +67,12 @@ BEGIN {
}
}
use Lemonldap::NG::Manager::Conf;
use Lemonldap::NG::Manager::Conf::Constants;
use Lemonldap::NG::Common::Conf;
use Lemonldap::NG::Common::Conf::Constants;
use strict;
use DBI;
my $lmconf = Lemonldap::NG::Manager::Conf->new(
my $lmconf = Lemonldap::NG::Common::Conf->new(
{
type => 'File',
dirName => '__CONFDIR__',

View File

@ -364,7 +364,7 @@ constructor (new()).
=item * configStorage I<(required for Lemonldap::NG::Portal::SharedConf)> :
describe how to find configuration generated by L<Lemonldap::NG::Manager>. See
L<Lemonldap::NG::Manager::Conf> for more
L<Lemonldap::NG::Common::Conf> for more
=item * caPath, caFile : if you use ldap+tls you can overwrite cafile or capath
options with those parameters. This is usefull if you use a shared

View File

@ -21,7 +21,7 @@ sub _safe {
my $self = shift;
return $self->{_safe} if($self->{_safe});
$self->{_safe} = new Safe;
my @t = split /\s+/, $self->{customFunctions};
my @t = $self->{customFunctions} ? split( /\s+/, $self->{customFunctions} ) : ();
foreach(@t) {
next if(__PACKAGE__->can($_));
my $sub = /::/ ? $_ : "$self->{caller}::$_";

View File

@ -2,7 +2,7 @@ package Lemonldap::NG::Portal::SharedConf;
use strict;
use Lemonldap::NG::Portal::Simple qw(:all);
use Lemonldap::NG::Manager::Conf;
use Lemonldap::NG::Common::Conf;
use Safe;
*EXPORT_OK = *Lemonldap::NG::Portal::Simple::EXPORT_OK;
@ -19,9 +19,9 @@ our $safe = new Safe;
# OVERLOADED SUB #
##################
# getConf: all parameters returned by the Lemonldap::NG::Manager::Conf object
# getConf: all parameters returned by the Lemonldap::NG::Common::Conf object
# are copied in $self
# See Lemonldap::NG::Manager::Conf(3) for more
# See Lemonldap::NG::Common::Conf(3) for more
sub getConf {
my $self = shift;
my %args;
@ -42,7 +42,7 @@ sub getConf {
}
unless ($tmp) {
$self->{lmConf} =
Lemonldap::NG::Manager::Conf->new( $self->{configStorage} )
Lemonldap::NG::Common::Conf->new( $self->{configStorage} )
unless $self->{lmConf};
return 0 unless ( ref( $self->{lmConf} ) );
$tmp = $self->{lmConf}->getConf;

View File

@ -12,7 +12,7 @@ use Test::More tests => 1;
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
# SOAP::Lite is not required, so Lemonldap::NG::Manager::Conf::SOAP may
# SOAP::Lite is not required, so Lemonldap::NG::Common::Conf::SOAP may
# not run.
SKIP: {
eval { require AuthCAS };

View File

@ -7,7 +7,7 @@
use Test::More tests => 1;
# SOAP::Lite is not required, so Lemonldap::NG::Manager::Conf::SOAP may
# SOAP::Lite is not required, so Lemonldap::NG::Common::Conf::SOAP may
# not run.
SKIP: {
eval { require lasso };