Commit beb02d8a authored by Xavier Guimard's avatar Xavier Guimard

Skeleton of a SOAP configuration access

git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/trunk@39 1dbb9719-a921-0410-b57f-c3a383c2c641
parent a6409f23
Revision history for Perl extension Lemonldap::NG::Handler.
0.75 Sat Feb 24 16:36:56
- Adding cross-domain-authentication support
0.74 Sun Feb 4 19:27:34 2007
- unprotect system documentation
- remove warning on Apache-1.3 ($ENV{MOD_PERL_API_VERSION} does not exist)
......
......@@ -2,7 +2,7 @@ package Lemonldap::NG::Handler;
print STDERR
"See Lemonldap::NG::Handler(3) to know which Lemonldap::NG::Handler::* module to use.";
our $VERSION = "0.74";
our $VERSION = "0.75";
1;
......
......@@ -6,7 +6,7 @@ use MIME::Base64;
use Exporter 'import';
use Safe;
our $VERSION = '0.74';
our $VERSION = '0.75';
our %EXPORT_TAGS = (
localStorage =>
......
Revision history for Perl extension Lemonldap::NG::Manager.
0.44 Sat Feb 24 16:32:34 2007
- Adding SOAP support to access to configuration
0.43 Sun Jan 28 19:10:24 2007
- Little correction on patch 0.41->0.42
......
......@@ -53,6 +53,7 @@ lib/Lemonldap/NG/Manager/Base.pm
lib/Lemonldap/NG/Manager/Conf.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
Makefile.PL
MANIFEST
......@@ -60,3 +61,7 @@ META.yml Module meta-data (added by MakeMaker)
README
TODO
t/Lemonldap-NG-Manager.t
t/Lemonldap-NG-Manager-Conf.t
t/Lemonldap-NG-Manager-Conf-DBI.t
t/Lemonldap-NG-Manager-Conf-File.t
t/Lemonldap-NG-Manager-Conf-SOAP.t
......@@ -12,7 +12,7 @@ require Lemonldap::NG::Manager::Help;
our @ISA = qw(Lemonldap::NG::Manager::Base);
our $VERSION = '0.43';
our $VERSION = '0.44';
sub new {
my ( $class, $args ) = @_;
......
package Lemonldap::NG::Manager::Conf::SOAP;
use strict;
use SOAP::Lite;
our $VERSION = 0.1;
sub prereq {
my $self = shift;
unless ( $self->{proxy} and $self->{uri} ) {
print STDERR 'No SOAP parameters found (proxy and uri)';
return 0;
}
1;
}
sub _connect {
my $self = shift;
$self->{service} ||= SOAP::Lite -> uri($self->{uri})
-> proxy($self->{proxy});
}
sub _soapCall {
my $self = shift;
my $func = shift;
$self->_connect;
my $conf = $self->{service}->$func(@_)->result;
return @$conf;
}
sub available {
my $self = shift;
return $self->_soapCall('available',@_);
}
sub lastCfg {
my $self = shift;
return $self->_soapCall('lastCfg',@_);
}
sub store {
my $self = shift;
return $self->_soapCall('store',@_);
}
sub load {
my $self = shift;
return $self->_soapCall('load',@_);
}
1;
__END__
package Lemonldap::NG::Manager::SOAPServer;
use strict;
use SOAP::Transport::HTTP;
use Lemonldap::NG::Manager::Conf;
our $VERSION = "0.1";
my $config;
sub start {
my ( $args ) = @_;
unless ($args) {
print STDERR "parameters are required, I can't start so\n";
return 0;
}
foreach (qw(configStorage)) {
unless ( $args->{$_} ) {
print STDERR qq/The "$_" parameter is required\n/;
return 0;
}
}
Lemonldap::NG::Manager::SOAPServer::Proxy->new( $args );
$config = Lemonldap::NG::Manager::Conf->new( $args->{configStorage} );
die "Configuration not loaded" unless $config;
SOAP::Transport::HTTP::CGI->dispatch_to(__PACKAGE__."::Proxy")->handle;
}
package Lemonldap::NG::Manager::SOAPServer::Proxy;
sub available {
return $config->available(@_)
}
sub lastCfg {
return $config->lastCfg(@_)
}
sub store {
return $config->store(@_)
}
sub load {
return $config->load(@_)
}
1;
__END__
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Lemonldap-NG-Manager.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 1;
BEGIN { use_ok('Lemonldap::NG::Manager::Conf::DBI') };
#########################
# 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.
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Lemonldap-NG-Manager.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 1;
BEGIN { use_ok('Lemonldap::NG::Manager::Conf::File') };
#########################
# 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.
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Lemonldap-NG-Manager.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 1;
# SOAP::Lite is not required, so Lemonldap::NG::Manager::Conf::SOAP may
# not run.
SKIP: {
eval { require SOAP::Lite };
skip "SOAP::Lite is not installed, so SOAP configuration access will not work", 1 if($@);
use_ok('Lemonldap::NG::Manager::Conf::SOAP');
}
#########################
# 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.
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Lemonldap-NG-Manager.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 1;
BEGIN { use_ok('Lemonldap::NG::Manager::Conf') };
#########################
# 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.
Revision history for Perl extension Lemonldap::NG::Portal.
0.62 Sat Feb 24 16:34:45
- Adding cross-domain-authentication mechanism
0.61 Sun Feb 11 9:10:12
- Existing sessions are now checked
......
Changes
example/index.pl
example/slavePortal.pl
lib/Lemonldap/NG/Portal.pm
lib/Lemonldap/NG/Portal/AuthSSL.pm
lib/Lemonldap/NG/Portal/CDA.pm
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment