Update POD (#595)
This commit is contained in:
parent
e31eed9589
commit
778c0b997f
|
@ -2,8 +2,6 @@ package Lemonldap::NG::Common;
|
||||||
|
|
||||||
our $VERSION = '2.0.0';
|
our $VERSION = '2.0.0';
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
|
@ -24,13 +22,11 @@ This package contains common files.
|
||||||
|
|
||||||
L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Portal>, L<Lemonldap::NG::Handler>
|
L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Portal>, L<Lemonldap::NG::Handler>
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHORS
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
=item LemonLDAP::NG team L<http://lemonldap-ng.org/team>
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
@ -46,13 +42,7 @@ L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
=head1 COPYRIGHT AND LICENSE
|
||||||
|
|
||||||
=over
|
See COPYING file for details.
|
||||||
|
|
||||||
=item Copyright (C) 2008-2016 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2010-2016 by Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
This library is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -398,15 +398,11 @@ L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Common::Conf::SOAP>,
|
||||||
L<Lemonldap::NG::Handler>, L<Lemonldap::NG::Portal>,
|
L<Lemonldap::NG::Handler>, L<Lemonldap::NG::Portal>,
|
||||||
L<http://lemonldap-ng.org/>
|
L<http://lemonldap-ng.org/>
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHORS
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
=item LemonLDAP::NG team L<http://lemonldap-ng.org/team>
|
||||||
|
|
||||||
=item François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
@ -422,15 +418,7 @@ L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
=head1 COPYRIGHT AND LICENSE
|
||||||
|
|
||||||
=over
|
See COPYING file for details.
|
||||||
|
|
||||||
=item Copyright (C) 2008-2013 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2012 by François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2010-2012 by Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
This library is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -472,8 +472,7 @@ __END__
|
||||||
|
|
||||||
=encoding utf8
|
=encoding utf8
|
||||||
|
|
||||||
Lemonldap::NG::Common::CGI - Simple module to extend L<CGI> to manage
|
Lemonldap::NG::Common::CGI - Simple module to extend L<CGI>. DEPRECATED
|
||||||
HTTP "If-Modified-Since / 304 Not Modified" system.
|
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
@ -487,7 +486,10 @@ HTTP "If-Modified-Since / 304 Not Modified" system.
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
Lemonldap::NG::Common::CGI just add header_public subroutine to CGI module to
|
Lemonldap::NG::Common::CGI just add header_public subroutine to CGI module to
|
||||||
avoid printing HTML elements that can be cached.
|
avoid printing HTML elements that can be cached. It manage HTTP
|
||||||
|
"If-Modified-Since / 304 Not Modified" system.
|
||||||
|
|
||||||
|
This module has been deprecated, now use FastCGI/PSGI packages.
|
||||||
|
|
||||||
=head1 METHODS
|
=head1 METHODS
|
||||||
|
|
||||||
|
@ -496,22 +498,18 @@ avoid printing HTML elements that can be cached.
|
||||||
header_public works like header (see L<CGI>) but the first argument has to be
|
header_public works like header (see L<CGI>) but the first argument has to be
|
||||||
a filename: the last modify date of this file is used for reference.
|
a filename: the last modify date of this file is used for reference.
|
||||||
|
|
||||||
=head2 EXPORT
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
L<Lemonldap::NG::Manager>, L<CGI>,
|
L<http://lemonldap-ng.org/>, L<Lemonldap::NG::Common::PSGI>,
|
||||||
L<http://lemonldap-ng.org/>
|
L<Lemonldap::NG::Common::PSGI::Router>, L<Lemonldap::NG::Handler::PSGI>,
|
||||||
|
L<Lemonldap::NG::Handler::PSGI::Router>, L<Lemonldap::NG::Handler::PSGI::Server>,
|
||||||
|
L<Lemonldap::NG::Handler::PSGI::Try>
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHORS
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
=item LemonLDAP::NG team L<http://lemonldap-ng.org/team>
|
||||||
|
|
||||||
=item François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
@ -527,15 +525,7 @@ L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
=head1 COPYRIGHT AND LICENSE
|
||||||
|
|
||||||
=over
|
See COPYING file for details.
|
||||||
|
|
||||||
=item Copyright (C) 2008-2016 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2012-2013 by François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2010-2016 by Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
This library is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -83,74 +83,3 @@ sub handle {
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
|
||||||
|
|
||||||
=head1 NAME
|
|
||||||
|
|
||||||
=encoding utf8
|
|
||||||
|
|
||||||
Lemonldap::NG::Common::CGI::SOAPServer - Extends L<SOAP::Lite> to be compatible
|
|
||||||
with L<CGI>.
|
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
|
||||||
|
|
||||||
use CGI;
|
|
||||||
use Lemonldap::NG::Common::CGI::SOAPServer;
|
|
||||||
|
|
||||||
my $cgi = CGI->new();
|
|
||||||
Lemonldap::NG::Common::CGI::SOAPServer->dispatch_to('same as SOAP::Lite')
|
|
||||||
->handle($cgi)
|
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
|
||||||
|
|
||||||
This extension just extend L<SOAP::Lite> handle() method to load datas from
|
|
||||||
a L<CGI> object instead of STDIN.
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
|
||||||
|
|
||||||
L<http://lemonldap-ng.org/>, L<Lemonldap::NG::Common::CGI>
|
|
||||||
|
|
||||||
=head1 AUTHOR
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 BUG REPORT
|
|
||||||
|
|
||||||
Use OW2 system to report bug or ask for features:
|
|
||||||
L<http://jira.ow2.org>
|
|
||||||
|
|
||||||
=head1 DOWNLOAD
|
|
||||||
|
|
||||||
Lemonldap::NG is available at
|
|
||||||
L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item Copyright (C) 2008-2010 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2010-2012 by Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see L<http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
|
@ -43,70 +43,3 @@ sub AUTOLOAD {
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
__END__
|
|
||||||
|
|
||||||
=head1 NAME
|
|
||||||
|
|
||||||
=encoding utf8
|
|
||||||
|
|
||||||
Lemonldap::NG::Common::CGI::SOAPService - Wrapper for all SOAP functions of
|
|
||||||
Lemonldap::NG CGIs.
|
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
|
||||||
|
|
||||||
See L<Lemonldap::NG::Common::CGI>
|
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
|
||||||
|
|
||||||
Private class used by L<Lemonldap::NG::Common::CGI> to control SOAP functions
|
|
||||||
access.
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
|
||||||
|
|
||||||
L<http://lemonldap-ng.org/>, L<Lemonldap::NG::Common::CGI>
|
|
||||||
|
|
||||||
=head1 AUTHOR
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 BUG REPORT
|
|
||||||
|
|
||||||
Use OW2 system to report bug or ask for features:
|
|
||||||
L<http://jira.ow2.org>
|
|
||||||
|
|
||||||
=head1 DOWNLOAD
|
|
||||||
|
|
||||||
Lemonldap::NG is available at
|
|
||||||
L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item Copyright (C) 2009-2010 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2010-2012 by Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see L<http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
|
@ -453,6 +453,8 @@ Web-SSO configuration.
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
use Lemonldap::NG::Common::Conf;
|
use Lemonldap::NG::Common::Conf;
|
||||||
|
# Lemonldap::NG::Common::Conf reads loacl configuration from lemonldap-ng.ini.
|
||||||
|
# Parameters can be overriden in a hash:
|
||||||
my $confAccess = new Lemonldap::NG::Common::Conf(
|
my $confAccess = new Lemonldap::NG::Common::Conf(
|
||||||
{
|
{
|
||||||
type=>'File',
|
type=>'File',
|
||||||
|
@ -469,69 +471,39 @@ Web-SSO configuration.
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
) or die "Unable to build Lemonldap::NG::Common::Conf, see Apache logs";
|
) or die "Unable to build Lemonldap::NG::Common::Conf, see Apache logs";
|
||||||
|
# Next, get global configuration. Note that local parameters override global
|
||||||
|
# ones
|
||||||
my $config = $confAccess->getConf();
|
my $config = $confAccess->getConf();
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
Lemonldap::NG::Common::Conf provides a simple interface to access to
|
Lemonldap::NG::Common::Conf is used by all Lemonldap::NG packages to access to
|
||||||
Lemonldap::NG Web-SSO configuration. It is used by L<Lemonldap::NG::Handler>,
|
local/global configuration.
|
||||||
L<Lemonldap::NG::Portal> and L<Lemonldap::NG::Manager>.
|
|
||||||
|
|
||||||
=head2 SUBROUTINES
|
=head2 SUBROUTINES
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item * B<new> (constructor): it takes different arguments depending on the
|
=item * B<new> (constructor)
|
||||||
chosen type. Examples:
|
|
||||||
|
It can takes any Lemonldap::NG parameter to override configuration. The
|
||||||
|
'confFile' parameter can be used to override lemonldap-ng.ini path.
|
||||||
|
Examples:
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item * B<File>:
|
=item * B<Set another lemonldap-ng.ini file>
|
||||||
$confAccess = new Lemonldap::NG::Common::Conf(
|
$confAccess = new Lemonldap::NG::Common::Conf(
|
||||||
{
|
{ confFile => '/opt/lemonldap-ng.ini' } );
|
||||||
type => 'File',
|
=item * B<Override global storage>:
|
||||||
dirName => '/var/lib/lemonldap-ng/',
|
|
||||||
});
|
|
||||||
|
|
||||||
=item * B<DBI>:
|
|
||||||
$confAccess = new Lemonldap::NG::Common::Conf(
|
$confAccess = new Lemonldap::NG::Common::Conf(
|
||||||
{
|
{
|
||||||
type => 'DBI',
|
type => 'File',
|
||||||
dbiChain => 'DBI:mysql:database=lemonldap-ng;host=1.2.3.4',
|
dirName => '/var/lib/lemonldap-ng/conf',
|
||||||
dbiUser => 'lemonldap'
|
});
|
||||||
dbiPassword => 'pass'
|
|
||||||
dbiTable => 'lmConfig',
|
|
||||||
});
|
|
||||||
|
|
||||||
=item * B<SOAP>:
|
|
||||||
$confAccess = new Lemonldap::NG::Common::Conf(
|
|
||||||
{
|
|
||||||
type => 'SOAP',
|
|
||||||
proxy => 'http://auth.example.com/index.pl/config',
|
|
||||||
proxyOptions => {
|
|
||||||
timeout => 5,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
SOAP configuration access is a sort of proxy: the portal is configured to use
|
|
||||||
the real session storage type (DBI or File for example). See HTML documentation
|
|
||||||
for more.
|
|
||||||
|
|
||||||
=item * B<LDAP>:
|
|
||||||
$confAccess = new Lemonldap::NG::Common::Conf(
|
|
||||||
{
|
|
||||||
type => 'LDAP',
|
|
||||||
ldapServer => 'ldap://localhost',
|
|
||||||
ldapConfBranch => 'ou=conf,ou=applications,dc=example,dc=com',
|
|
||||||
ldapBindDN => 'cn=manager,dc=example,dc=com",
|
|
||||||
ldapBindPassword => 'secret'
|
|
||||||
});
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
WARNING: You have to use the same storage type on all Lemonldap::NG parts in
|
|
||||||
the same server.
|
|
||||||
|
|
||||||
=item * B<getConf>: returns a hash reference to the configuration. it takes
|
=item * B<getConf>: returns a hash reference to the configuration. it takes
|
||||||
a hash reference as first argument containing 2 optional parameters:
|
a hash reference as first argument containing 2 optional parameters:
|
||||||
|
|
||||||
|
@ -552,20 +524,13 @@ getConf returns all (C<select * from lmConfig>).
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
L<Lemonldap::NG::Handler>, L<Lemonldap::NG::Portal>,
|
|
||||||
L<http://lemonldap-ng.org/>
|
L<http://lemonldap-ng.org/>
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHORS
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
=item LemonLDAP::NG team L<http://lemonldap-ng.org/team>
|
||||||
|
|
||||||
=item François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Sandro Cazzaniga, E<lt>cazzaniga.sandro@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
@ -581,17 +546,7 @@ L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
=head1 COPYRIGHT AND LICENSE
|
||||||
|
|
||||||
=over
|
See COPYING file for details.
|
||||||
|
|
||||||
=item Copyright (C) 2008-2016 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2012 by Sandro Cazzaniga, E<lt>cazzaniga.sandro@gmail.comE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2012 by François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2009-2016 by Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
This library is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -90,201 +90,3 @@ sub load {
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
|
||||||
|
|
||||||
=head1 NAME
|
|
||||||
|
|
||||||
=encoding utf8
|
|
||||||
|
|
||||||
Lemonldap::NG::Common::Conf::SOAP - Perl extension written to access to
|
|
||||||
Lemonldap::NG Web-SSO configuration via SOAP.
|
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
|
||||||
|
|
||||||
=head2 Client side
|
|
||||||
|
|
||||||
=head3 Area protection (Apache handler)
|
|
||||||
|
|
||||||
package My::Package;
|
|
||||||
|
|
||||||
use base Lemonldap::NG::Handler::SharedConf;
|
|
||||||
|
|
||||||
__PACKAGE__->init ( {
|
|
||||||
localStorage => "Cache::FileCache",
|
|
||||||
localStorageOptions => {
|
|
||||||
'namespace' => 'lemonldap-ng',
|
|
||||||
'default_expires_in' => 600,
|
|
||||||
},
|
|
||||||
configStorage => {
|
|
||||||
type => 'SOAP',
|
|
||||||
proxy => 'http://auth.example.com/index.pl/config',
|
|
||||||
# If soapserver is protected by HTTP Basic:
|
|
||||||
User => 'http-user',
|
|
||||||
Password => 'pass',
|
|
||||||
},
|
|
||||||
https => 0,
|
|
||||||
} );
|
|
||||||
|
|
||||||
=head3 Authentication portal
|
|
||||||
|
|
||||||
use Lemonldap::NG::Portal::SharedConf;
|
|
||||||
|
|
||||||
my $portal = Lemonldap::NG::Portal::SharedConf->new ( {
|
|
||||||
configStorage => {
|
|
||||||
type => 'SOAP',
|
|
||||||
proxy => 'http://auth.example.com/index.pl/config',
|
|
||||||
# If soapserver is protected by HTTP Basic:
|
|
||||||
User => 'http-user',
|
|
||||||
Password => 'pass',
|
|
||||||
}
|
|
||||||
});
|
|
||||||
# Next as usual... See Lemonldap::NG::Portal(3)
|
|
||||||
if($portal->process()) {
|
|
||||||
...
|
|
||||||
|
|
||||||
=head3 Manager
|
|
||||||
|
|
||||||
use Lemonldap::NG::Manager;
|
|
||||||
|
|
||||||
my $m=new Lemonldap::NG::Manager(
|
|
||||||
{
|
|
||||||
configStorage=>{
|
|
||||||
type => 'SOAP',
|
|
||||||
proxy => 'http://auth.example.com/index.pl/config',
|
|
||||||
# If soapserver is protected by HTTP Basic:
|
|
||||||
User => 'http-user',
|
|
||||||
Password => 'pass',
|
|
||||||
},
|
|
||||||
dhtmlXTreeImageLocation=> "/imgs/",
|
|
||||||
}
|
|
||||||
) or die "Unable to start manager";
|
|
||||||
|
|
||||||
$m->doall();
|
|
||||||
|
|
||||||
=head2 Server side
|
|
||||||
|
|
||||||
You just have to set "Soap => 1" in your portal. See HTML documentation for
|
|
||||||
more.
|
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
|
||||||
|
|
||||||
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::Common::Conf::SOAP provides the "SOAP" target used to access
|
|
||||||
configuration via SOAP.
|
|
||||||
|
|
||||||
=head2 SECURITY
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Examples :
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item * HTTP Basic authentication
|
|
||||||
|
|
||||||
package My::Package;
|
|
||||||
|
|
||||||
use base Lemonldap::NG::Handler::SharedConf;
|
|
||||||
|
|
||||||
__PACKAGE__->init ( {
|
|
||||||
localStorage => "Cache::FileCache",
|
|
||||||
localStorageOptions => {
|
|
||||||
'namespace' => 'lemonldap-ng',
|
|
||||||
'default_expires_in' => 600,
|
|
||||||
},
|
|
||||||
configStorage => {
|
|
||||||
type => 'SOAP',
|
|
||||||
proxy => 'http://auth.example.com/index.pl/config',
|
|
||||||
User => 'http-user',
|
|
||||||
Password => 'pass',
|
|
||||||
},
|
|
||||||
https => 1,
|
|
||||||
} );
|
|
||||||
|
|
||||||
=item * SSL Authentication
|
|
||||||
|
|
||||||
SOAP::transport provides a simple way to use SSL certificate: you've just to
|
|
||||||
set environment variables.
|
|
||||||
|
|
||||||
package My::Package;
|
|
||||||
|
|
||||||
use base Lemonldap::NG::Handler::SharedConf;
|
|
||||||
|
|
||||||
# AUTHENTICATION
|
|
||||||
$ENV{HTTPS_CERT_FILE} = 'client-cert.pem';
|
|
||||||
$ENV{HTTPS_KEY_FILE} = 'client-key.pem';
|
|
||||||
|
|
||||||
__PACKAGE__->init ( {
|
|
||||||
localStorage => "Cache::FileCache",
|
|
||||||
localStorageOptions => {
|
|
||||||
'namespace' => 'lemonldap-ng',
|
|
||||||
'default_expires_in' => 600,
|
|
||||||
},
|
|
||||||
configStorage => {
|
|
||||||
type => 'SOAP',
|
|
||||||
proxy => 'http://auth.example.com/index.pl/config',
|
|
||||||
},
|
|
||||||
https => 1,
|
|
||||||
} );
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
|
||||||
|
|
||||||
L<Lemonldap::NG::Common::Conf::SOAP>,
|
|
||||||
L<Lemonldap::NG::Handler>, L<Lemonldap::NG::Portal>,
|
|
||||||
L<http://lemonldap-ng.org/>
|
|
||||||
|
|
||||||
=head1 AUTHOR
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=item François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 BUG REPORT
|
|
||||||
|
|
||||||
Use OW2 system to report bug or ask for features:
|
|
||||||
L<http://jira.ow2.org>
|
|
||||||
|
|
||||||
=head1 DOWNLOAD
|
|
||||||
|
|
||||||
Lemonldap::NG is available at
|
|
||||||
L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item Copyright (C) 2008-2016 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2012-2014 by François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2010-2012 by Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see L<http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
|
@ -461,13 +461,7 @@ L<Lemonldap::NG::Common::PSGI::Request>, L<HTML::Template>,
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
=item LemonLDAP::NG team L<http://lemonldap-ng.org/team>
|
||||||
|
|
||||||
=item François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Thomas Chemineau, E<lt>thomas.chemineau@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
@ -483,13 +477,7 @@ L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
=head1 COPYRIGHT AND LICENSE
|
||||||
|
|
||||||
=over
|
See COPYING file for details.
|
||||||
|
|
||||||
=item Copyright (C) 2015-2016 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2015-2016 by Clément Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
This library is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -151,145 +151,97 @@ PSGIs
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
This package provides HTTP request objects used by Lemonldap::NG PSGIs. It
|
This package provides HTTP request objects used by Lemonldap::NG PSGIs. It
|
||||||
contains common accessors to work with request
|
contains common accessors to work with request. Note that it inherits from
|
||||||
|
L<Plack::Request>.
|
||||||
|
|
||||||
=head1 METHODS
|
=head1 METHODS
|
||||||
|
|
||||||
=head2 Accessors
|
All methods of L<Plack::Request> are available.
|
||||||
|
Lemonldap::NG::Common::PSGI::Request adds the following methods:
|
||||||
|
|
||||||
=head3 accept
|
=head2 accept
|
||||||
|
|
||||||
'Accept' header content.
|
'Accept' header content.
|
||||||
|
|
||||||
=head3 encodings
|
=head2 encodings
|
||||||
|
|
||||||
'Accept-Encoding' header content.
|
'Accept-Encoding' header content.
|
||||||
|
|
||||||
=head3 languages
|
=head2 error
|
||||||
|
|
||||||
'Accept-Language header content.
|
Used to store error value (usually a L<Lemonldap::NG::Portal::Main::Constants>
|
||||||
|
constant).
|
||||||
|
|
||||||
=head3 cookies
|
=head2 jsonBodyToObj
|
||||||
|
|
||||||
'Cookie' header content.
|
|
||||||
|
|
||||||
=head3 hostname
|
|
||||||
|
|
||||||
'Host' header content.
|
|
||||||
|
|
||||||
=head3 remote_ip
|
|
||||||
|
|
||||||
Client IP address.
|
|
||||||
|
|
||||||
=head3 port
|
|
||||||
|
|
||||||
Client TCP port.
|
|
||||||
|
|
||||||
=head3 method
|
|
||||||
|
|
||||||
HTTP method asked by client (GET/POST/PUT/DELETE).
|
|
||||||
|
|
||||||
=head3 get_server_port
|
|
||||||
|
|
||||||
Server port.
|
|
||||||
|
|
||||||
=head3 path
|
|
||||||
|
|
||||||
PATH_INFO content which has been subtracted `scriptname`. So it's the relative
|
|
||||||
path_info for REST calls.
|
|
||||||
|
|
||||||
=head3 uri
|
|
||||||
|
|
||||||
REQUEST_URI environment variable.
|
|
||||||
|
|
||||||
=head3 unparsed_uri
|
|
||||||
|
|
||||||
Same as `uri` but without decoding.
|
|
||||||
|
|
||||||
=head3 user
|
|
||||||
|
|
||||||
REMOTE_USER environment variable. It contains username when a server authentication
|
|
||||||
is done.
|
|
||||||
|
|
||||||
=head3 userData
|
|
||||||
|
|
||||||
Hash reference to be used by Lemonldap::NG::Handler::PSGI. If a server authentication
|
|
||||||
is done, it contains:
|
|
||||||
|
|
||||||
{ _whatToTrace => `user()` }
|
|
||||||
|
|
||||||
=head3 params
|
|
||||||
|
|
||||||
GET parameters.
|
|
||||||
|
|
||||||
=head3 body
|
|
||||||
|
|
||||||
Content of POST requests
|
|
||||||
|
|
||||||
=head3 error
|
|
||||||
|
|
||||||
Set if an error occurs
|
|
||||||
|
|
||||||
=head3 contentType
|
|
||||||
|
|
||||||
Content type of posted datas.
|
|
||||||
|
|
||||||
=head3 contentLength
|
|
||||||
|
|
||||||
Length of posted datas.
|
|
||||||
|
|
||||||
=head3 respHeaders
|
|
||||||
|
|
||||||
Used to store response headers. Be careful, it contains an array, not a hash
|
|
||||||
reference because headers can be multi-valued.
|
|
||||||
|
|
||||||
Exemple:
|
|
||||||
|
|
||||||
$req->respHeaders( "Location" => "http://x.y.z/", Etag => "XYZ", );
|
|
||||||
|
|
||||||
=head2 Private accessors
|
|
||||||
|
|
||||||
=head3 _psgixBuffered
|
|
||||||
|
|
||||||
PSGI psgix.input.buffered variable.
|
|
||||||
|
|
||||||
=head3 _psgiInput
|
|
||||||
|
|
||||||
PSGI psgix.input variable.
|
|
||||||
|
|
||||||
=head2 Methods
|
|
||||||
|
|
||||||
=head3 parseBody()
|
|
||||||
|
|
||||||
Transform JSON or form/url-encoded POST content into GET parameters. Using this
|
|
||||||
it is possible to manage POST requests like GET requests.
|
|
||||||
|
|
||||||
=head3 jsonBodyToObj()
|
|
||||||
|
|
||||||
Get the content of a JSON POST request as Perl object.
|
Get the content of a JSON POST request as Perl object.
|
||||||
|
|
||||||
=head3 wantJSON
|
=head2 languages
|
||||||
|
|
||||||
|
'Accept-Language header content.
|
||||||
|
|
||||||
|
=head2 hostname
|
||||||
|
|
||||||
|
'Host' header content.
|
||||||
|
|
||||||
|
=head2 read-body
|
||||||
|
|
||||||
|
Since body() methods returns an L<IO::Handle> object, this method reads and
|
||||||
|
return the request content as string.
|
||||||
|
|
||||||
|
=head2 respHeaders
|
||||||
|
|
||||||
|
Accessor to 'respHeaders' property. It is used to store headers that have to
|
||||||
|
be pushed in response (see L<Lemonldap::NG::Common::PSGI>).
|
||||||
|
|
||||||
|
Be careful, it contains an array reference, not a hash one because headers
|
||||||
|
can be multi-valued.
|
||||||
|
|
||||||
|
Exemple:
|
||||||
|
|
||||||
|
# Set headers
|
||||||
|
$req->respHeaders( "Location" => "http://x.y.z/", Etag => "XYZ", );
|
||||||
|
# Add header
|
||||||
|
$req->respHeaders->{"X-Key"} = "Value";
|
||||||
|
|
||||||
|
=head2 set_param( $key, $value )
|
||||||
|
|
||||||
|
L<Plack::Request> param() method is read-only. This method can be used to
|
||||||
|
modify a GET parameter value
|
||||||
|
|
||||||
|
=head2 uri
|
||||||
|
|
||||||
|
REQUEST_URI environment variable decoded.
|
||||||
|
|
||||||
|
=head2 user
|
||||||
|
|
||||||
|
REMOTE_USER environment variable. It contains username when a server
|
||||||
|
authentication is done.
|
||||||
|
|
||||||
|
=head2 userData
|
||||||
|
|
||||||
|
Hash reference to the session information (if app inherits from
|
||||||
|
L<Lemonldap::NG::Handler::PSGI> or any other handler PSGI package). If no
|
||||||
|
session information is available, it contains:
|
||||||
|
|
||||||
|
{ _whatToTrace => <REMOTE-USER value> }
|
||||||
|
|
||||||
|
=head2 wantJSON
|
||||||
|
|
||||||
Return true if current request ask JSON content (verify that "Accept" header
|
Return true if current request ask JSON content (verify that "Accept" header
|
||||||
contains "application/json" or "text/json").
|
contains "application/json" or "text/json").
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
L<http://lemonldap-ng.org/>, L<Lemonldap::NG::Portal>, L<Lemonldap::NG::Handler>,
|
L<http://lemonldap-ng.org/>, L<Lemonldap::NG::Common::PSGI>,
|
||||||
L<Plack>, L<PSGI>, L<Lemonldap::NG::Common::PSGI>,
|
L<Lemonldap::NG::Hander::PSGI>, L<Plack::Request>,
|
||||||
L<Lemonldap::NG::Common::PSGI::Router>, L<HTML::Template>,
|
L<Lemonldap::NG::Portal::Main::Constants>,
|
||||||
|
|
||||||
=head1 AUTHORS
|
=head1 AUTHORS
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
=item LemonLDAP::NG team L<http://lemonldap-ng.org/team>
|
||||||
|
|
||||||
=item François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Thomas Chemineau, E<lt>thomas.chemineau@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
@ -305,13 +257,7 @@ L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
=head1 COPYRIGHT AND LICENSE
|
||||||
|
|
||||||
=over
|
See COPYING file for details.
|
||||||
|
|
||||||
=item Copyright (C) 2015-2016 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2015-2016 by Clément Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
This library is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -337,13 +337,7 @@ L<Lemonldap::NG::Common::PSGI::Request>, L<HTML::Template>,
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
=item LemonLDAP::NG team L<http://lemonldap-ng.org/team>
|
||||||
|
|
||||||
=item François-Xavier Deltombe, E<lt>fxdeltombe@gmail.com.E<gt>
|
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Thomas Chemineau, E<lt>thomas.chemineau@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
@ -359,13 +353,7 @@ L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
=head1 COPYRIGHT AND LICENSE
|
||||||
|
|
||||||
=over
|
See COPYING file for details.
|
||||||
|
|
||||||
=item Copyright (C) 2015-2016 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2015-2016 by Clément Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
This library is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -180,70 +180,3 @@ sub groupMatch {
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
|
||||||
|
|
||||||
=head1 NAME
|
|
||||||
|
|
||||||
=encoding utf8
|
|
||||||
|
|
||||||
Lemonldap::NG::Common::Safelib - Contains functions that are automatically
|
|
||||||
imported in Lemonldap::NG Safe objects to be used in expressions like rules,
|
|
||||||
macros,...
|
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
|
||||||
|
|
||||||
Private module not documented.
|
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
|
||||||
|
|
||||||
Private module not documented.
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
|
||||||
|
|
||||||
L<Lemonldap::NG::Manager>, L<Lemonldap::NG::Portal>, L<Lemonldap::NG::Handler>
|
|
||||||
|
|
||||||
=head1 AUTHOR
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 BUG REPORT
|
|
||||||
|
|
||||||
Use OW2 system to report bug or ask for features:
|
|
||||||
L<http://jira.ow2.org>
|
|
||||||
|
|
||||||
=head1 DOWNLOAD
|
|
||||||
|
|
||||||
Lemonldap::NG is available at
|
|
||||||
L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
|
||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item Copyright (C) 2009-2010 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
||||||
|
|
||||||
=item Copyright (C) 2009-2016 by Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see L<http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user