2010-10-03 10:25:40 +02:00
|
|
|
## @file
|
|
|
|
# Deprecated: use "cda" parameter instead
|
|
|
|
|
|
|
|
## @class
|
|
|
|
# Deprecated: use "cda" parameter instead
|
2007-02-23 06:31:32 +01:00
|
|
|
package Lemonldap::NG::Portal::CDA;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use Lemonldap::NG::Portal::SharedConf qw(:all);
|
|
|
|
|
2010-11-20 16:05:40 +01:00
|
|
|
our $VERSION = '1.0.0';
|
2008-12-04 14:53:05 +01:00
|
|
|
use base ('Lemonldap::NG::Portal::SharedConf');
|
2007-02-23 06:31:32 +01:00
|
|
|
|
|
|
|
*EXPORT_OK = *Lemonldap::NG::Portal::SharedConf::EXPORT_OK;
|
|
|
|
*EXPORT_TAGS = *Lemonldap::NG::Portal::SharedConf::EXPORT_TAGS;
|
|
|
|
*EXPORT = *Lemonldap::NG::Portal::SharedConf::EXPORT;
|
|
|
|
|
|
|
|
##################
|
|
|
|
# OVERLOADED SUB #
|
|
|
|
##################
|
|
|
|
|
2010-10-03 10:25:40 +02:00
|
|
|
## @cmethod Lemonldap::NG::Portal::CDA new(array params)
|
|
|
|
# Call Lemonldap::NG::Portal::SharedConf::new() with "cda" parameter set to 1
|
|
|
|
# @param params Lemonldap::NG::Portal::SharedConf::new() parameters
|
|
|
|
# @return New Lemonldap::NG::Portal::CDA object
|
2009-02-17 16:39:14 +01:00
|
|
|
sub new {
|
|
|
|
my $class = shift;
|
2009-12-11 22:17:06 +01:00
|
|
|
my $self = $class->SUPER::new(@_);
|
2009-06-15 16:13:09 +02:00
|
|
|
$self->{cda} = 1;
|
2009-02-17 16:39:14 +01:00
|
|
|
return $self;
|
2007-02-23 06:31:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
__END__
|
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
2010-01-03 09:09:59 +01:00
|
|
|
=encoding utf8
|
|
|
|
|
2007-02-23 06:31:32 +01:00
|
|
|
Lemonldap::NG::Portal::CDA - Perl extension for building Lemonldap::NG
|
|
|
|
compatible portals with Cross Domain Authentication.
|
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
use Lemonldap::NG::Portal::SharedConf;
|
|
|
|
my $portal = new Lemonldap::NG::Portal::SharedConf( {
|
2009-06-15 16:13:09 +02:00
|
|
|
cda => 1,
|
2007-02-23 06:31:32 +01:00
|
|
|
configStorage => {
|
|
|
|
type => 'DBI',
|
|
|
|
dbiChain => "dbi:mysql:...",
|
|
|
|
dbiUser => "lemonldap",
|
|
|
|
dbiPassword => "password",
|
|
|
|
dbiTable => "lmConfig",
|
|
|
|
},
|
|
|
|
} );
|
|
|
|
|
|
|
|
if($portal->process()) {
|
|
|
|
# Write here the menu with CGI methods. This page is displayed ONLY IF
|
|
|
|
# the user was not redirected here.
|
2013-10-17 21:21:45 +02:00
|
|
|
print $portal->header('text/html; charset=utf-8'); # DON'T FORGET THIS (see L<CGI(3)>)
|
2007-02-23 06:31:32 +01:00
|
|
|
print "...";
|
|
|
|
|
|
|
|
# or redirect the user to the menu
|
|
|
|
print $portal->redirect( -uri => 'https://portal/menu');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
# Write here the html form used to authenticate with CGI methods.
|
|
|
|
# $portal->error returns the error message if athentification failed
|
|
|
|
# Warning: by defaut, input names are "user" and "password"
|
2013-10-17 21:21:45 +02:00
|
|
|
print $portal->header('text/html; charset=utf-8'); # DON'T FORGET THIS (see L<CGI(3)>)
|
2007-02-23 06:31:32 +01:00
|
|
|
print "...";
|
|
|
|
print '<form method="POST">';
|
|
|
|
# In your form, the following value is required for redirection
|
|
|
|
print '<input type="hidden" name="url" value="'.$portal->param('url').'">';
|
|
|
|
# Next, login and password
|
|
|
|
print 'Login : <input name="user"><br>';
|
2015-06-11 14:59:20 +02:00
|
|
|
print 'Password : <input name="password" type="password">';
|
2007-02-23 06:31:32 +01:00
|
|
|
print '<input type="submit" value="go" />';
|
|
|
|
print '</form>';
|
|
|
|
}
|
|
|
|
|
|
|
|
Modify your httpd.conf:
|
|
|
|
|
|
|
|
<Location /My/File>
|
|
|
|
SSLVerifyClient require
|
|
|
|
SSLOptions +ExportCertData +CompatEnvVars +StdEnvVars
|
|
|
|
</Location>
|
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
2009-06-15 16:13:09 +02:00
|
|
|
This file is maintened only for compatibility. Now set "cda => 1" in the
|
|
|
|
portal.
|
2007-02-23 06:31:32 +01:00
|
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
|
|
|
L<Lemonldap::NG::SharedConf>, L<Lemonldap::NG::Handler>,
|
2007-04-02 21:13:05 +02:00
|
|
|
L<Lemonldap::NG::Handler::CDA>,
|
2010-10-26 08:08:16 +02:00
|
|
|
L<http://lemonldap-ng.org/>
|
2007-02-23 06:31:32 +01:00
|
|
|
|
|
|
|
=head1 AUTHOR
|
|
|
|
|
2013-01-31 06:33:10 +01:00
|
|
|
=over
|
|
|
|
|
|
|
|
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
|
|
|
|
|
|
|
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
|
|
|
2013-02-01 06:37:38 +01:00
|
|
|
=item Thomas Chemineau, E<lt>thomas.chemineau@gmail.comE<gt>
|
2013-01-31 06:33:10 +01:00
|
|
|
|
|
|
|
=back
|
2007-02-23 06:31:32 +01:00
|
|
|
|
2007-04-14 15:12:11 +02:00
|
|
|
=head1 BUG REPORT
|
|
|
|
|
|
|
|
Use OW2 system to report bug or ask for features:
|
2010-10-26 08:08:16 +02:00
|
|
|
L<http://jira.ow2.org>
|
2007-04-14 15:12:11 +02:00
|
|
|
|
|
|
|
=head1 DOWNLOAD
|
|
|
|
|
|
|
|
Lemonldap::NG is available at
|
|
|
|
L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
|
|
|
|
2007-02-23 06:31:32 +01:00
|
|
|
=head1 COPYRIGHT AND LICENSE
|
|
|
|
|
2013-01-31 06:33:10 +01:00
|
|
|
=over
|
|
|
|
|
2016-01-21 22:15:19 +01:00
|
|
|
=item Copyright (C) 2007-2010 by Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
2013-01-31 06:33:10 +01:00
|
|
|
|
2016-01-21 22:15:19 +01:00
|
|
|
=item Copyright (C) 2010-2012 by Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
2013-01-31 06:33:10 +01:00
|
|
|
|
2013-02-01 06:37:38 +01:00
|
|
|
=item Copyright (C) 2008 by Thomas Chemineau, E<lt>thomas.chemineau@gmail.comE<gt>
|
2013-01-31 06:33:10 +01:00
|
|
|
|
|
|
|
=back
|
2007-02-23 06:31:32 +01:00
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify
|
2013-01-31 06:33:10 +01:00
|
|
|
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/>.
|
2007-02-23 06:31:32 +01:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|