From 36c9aa24094d5d848d60cfb383ee9dacc8e47dcd Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Mon, 15 Jun 2009 14:13:09 +0000 Subject: [PATCH] Change CDA parameter to cda. --- modules/lemonldap-ng-portal/example/slavePortal.pl | 5 +++-- .../lemonldap-ng-portal/lib/Lemonldap/NG/Portal.pm | 5 ----- .../lib/Lemonldap/NG/Portal/CDA.pm | 12 +++++------- .../lib/Lemonldap/NG/Portal/Simple.pm | 2 +- .../t/40-Lemonldap-NG-Portal-CDA.t | 2 +- 5 files changed, 10 insertions(+), 16 deletions(-) diff --git a/modules/lemonldap-ng-portal/example/slavePortal.pl b/modules/lemonldap-ng-portal/example/slavePortal.pl index 935615732..b1d0abad9 100755 --- a/modules/lemonldap-ng-portal/example/slavePortal.pl +++ b/modules/lemonldap-ng-portal/example/slavePortal.pl @@ -36,10 +36,11 @@ cross-domain-authentication mechanism and generates the cookie =cut -use Lemonldap::NG::Portal::CDA; +use Lemonldap::NG::Portal::SharedConf; -my $portal = Lemonldap::NG::Portal::CDA->new( +my $portal = Lemonldap::NG::Portal::SharedConf->new( { + cda => 1, # SUBROUTINES OVERLOAD # 2 cases : # 1 - If LDAP search is not needed (the master SSO gives all diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal.pm index f00369fc4..75286a597 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal.pm @@ -480,11 +480,6 @@ Liberty-Alliance mechanisms to authenticate users to read portal configuration from a central database. It inherits from L. It's the more used module. -=item * L: this module inherits from -L and provides the capability to use -handlers in different domains that the portal itself. See -L for more. - =back =head1 SEE ALSO diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/CDA.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/CDA.pm index 1cb816b35..ea3152917 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/CDA.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/CDA.pm @@ -3,7 +3,7 @@ package Lemonldap::NG::Portal::CDA; use strict; use Lemonldap::NG::Portal::SharedConf qw(:all); -our $VERSION = '0.05'; +our $VERSION = '0.1'; use base ('Lemonldap::NG::Portal::SharedConf'); *EXPORT_OK = *Lemonldap::NG::Portal::SharedConf::EXPORT_OK; @@ -17,7 +17,7 @@ use base ('Lemonldap::NG::Portal::SharedConf'); sub new { my $class = shift; my $self = $class->SUPER::new(@_); - $self->{CDA} = 1; + $self->{cda} = 1; return $self; } @@ -33,6 +33,7 @@ compatible portals with Cross Domain Authentication. use Lemonldap::NG::Portal::SharedConf; my $portal = new Lemonldap::NG::Portal::SharedConf( { + cda => 1, configStorage => { type => 'DBI', dbiChain => "dbi:mysql:...", @@ -76,11 +77,8 @@ Modify your httpd.conf: =head1 DESCRIPTION -This library just overload few methods of L -to add Cross Domain Authentication. Handlers that are not used in the same -domain than the portal must inherit from L. - -See L for usage and other methods. +This file is maintened only for compatibility. Now set "cda => 1" in the +portal. =head1 SEE ALSO diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm index 3b6dd81af..a4e265de0 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm @@ -889,7 +889,7 @@ sub autoRedirect { { # Cross-domain mechanism - if ( $self->{CDA} + if ( $self->{cda} and $self->{id} and $self->{urldc} !~ m#^https?://[^/]*$self->{domain}/#oi ) { diff --git a/modules/lemonldap-ng-portal/t/40-Lemonldap-NG-Portal-CDA.t b/modules/lemonldap-ng-portal/t/40-Lemonldap-NG-Portal-CDA.t index 408ed4149..3f8786a71 100644 --- a/modules/lemonldap-ng-portal/t/40-Lemonldap-NG-Portal-CDA.t +++ b/modules/lemonldap-ng-portal/t/40-Lemonldap-NG-Portal-CDA.t @@ -34,5 +34,5 @@ ok( 'Portal object' ); -ok( $p->{CDA}, 'CDA is set' ); +ok( $p->{cda}, 'CDA is set' );