LEMONLDAP::NG : Liberty-Alliance integration in progress...

This commit is contained in:
Xavier Guimard 2007-10-22 19:42:19 +00:00
parent 75d0783cfc
commit 2690cc4cfb
6 changed files with 289 additions and 290 deletions

View File

@ -1,5 +1,5 @@
lemonldap-ng (0.8.3-0) unstable; urgency=low
lemonldap-ng (0.9-0) unstable; urgency=low
* Local build
-- Xavier Guimard <x.guimard@free.fr> Sun, 14 Oct 2007 09:11:36 +0200
-- Xavier Guimard <x.guimard@free.fr> Mon, 22 Oct 2007 21:34:23 +0200

View File

@ -1,5 +1,8 @@
Revision history for Perl extension Lemonldap::NG::Portal.
0.8 Mon Oct 15 7:58:25 2007
- Integration of the Liberty Alliance module issued from FederID project
0.77 Mon Jul 30 21:27:08 2007
- Little bug fix in javascript
- DBI::ping is now called each time to avoid timeout

View File

@ -76,8 +76,8 @@ lib/Lemonldap/NG/Portal/CDA.pm
lib/Lemonldap/NG/Portal/SharedConf.pm
lib/Lemonldap/NG/Portal/Simple.pm
Makefile.PL
MANIFEST
META.yml Module meta-data (added by MakeMaker)
MANIFEST This list of files
META.yml
README
t/Lemonldap-NG-Portal-AuthApache.t
t/Lemonldap-NG-Portal-AuthCAS.t

File diff suppressed because it is too large Load Diff

View File

@ -139,25 +139,37 @@ sub redirect {
}
}
# Externalise functions execution
sub _subProcess {
my $self = shift;
my @subs = @_;
my $err = undef;
foreach my $sub (@subs) {
if ( $self->{$sub} ) {
last if ( $err = &{ $self->{$sub} }($self) );
}
else {
last if ( $err = $self->$sub );
}
}
return $err;
}
###############################################################
# MAIN subroutine: call all steps until one returns something #
# different than PE_OK #
###############################################################
sub process {
my ($self) = @_;
$self->{error} = PE_OK;
foreach my $sub
$self->{error} = $self->_subProcess(
qw(controlUrlOrigin controlExistingSession extractFormInfo formateParams
formateFilter connectLDAP bind search setSessionInfo setMacros setGroups
authenticate store unbind buildCookie log autoRedirect) {
if ( $self->{$sub} )
{
last if ( $self->{error} = &{ $self->{$sub} }($self) );
}
else {
last if ( $self->{error} = $self->$sub );
}
}
authenticate store unbind buildCookie log autoRedirect)
);
return ( ( $self->{error} > 0 ) ? 0 : 1 );
}

View File

@ -22,7 +22,7 @@ sub error {
1;
__END__
# Order of the constants
# Order of the constants:
# * PE_OK 0
# * PE_SESSIONEXPIRED 1
# * PE_FORMEMPTY 2
@ -34,6 +34,17 @@ __END__
# * PE_APACHESESSIONERROR 8
# * PE_FIRSTACCESS 9
# * PE_BADCERTIFICATE 10
# * PE_LA_FAILED 11
# * PE_LA_ARTFAILED 12
# * PE_LA_DEFEDFAILED 13
# * PE_LA_QUERYEMPTY 14
# * PE_LA_SOAPFAILED 15
# * PE_LA_SLOFAILED 16
# * PE_LA_SSOFAILED 17
# * PE_LA_SSOINITFAILED 18
# * PE_LA_SESSIONERROR 19
# * PE_LA_SEPFAILED 20
# Not used in errors:
# * PE_DONE -1
@ -70,4 +81,5 @@ sub error_en {
'Authentication required',
'Invalid certificate',
];
}
}