Commit 0d256949 authored by Clément OUDOT's avatar Clément OUDOT

Appy patch to 1.4 branch (#LEMONLDAP-1047)

git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/branches/lemonldap-ng_version_1_4-bugfixes@5298 1dbb9719-a921-0410-b57f-c3a383c2c641
parent 4432a086
......@@ -11,7 +11,7 @@ use Lemonldap::NG::Portal::Simple;
#inherits Lemonldap::NG::Portal::_Choice
our $VERSION = '1.0.2';
our $VERSION = '1.4.10';
## @apmethod int authInit()
# Build authentication loop
......@@ -61,6 +61,14 @@ sub authFinish {
return $self->_choice->try( 'authFinish', 0 );
}
## @apmethod int authPostStore()
# Does nothing
# @return Lemonldap::NG::Portal constant
sub authPostStore {
my $self = shift;
return $self->_choice->try( 'authPostStore', 0 );
}
## @apmethod int authLogout()
# Does nothing
# @return Lemonldap::NG::Portal constant
......
......@@ -36,6 +36,11 @@ sub authFinish {
return $self->_multi->try( 'authFinish', 0 );
}
sub authPostStore {
my $self = shift;
return $self->_multi->try( 'authPostStore', 0 );
}
sub authLogout {
my $self = shift;
return $self->_multi->try( 'authLogout', 0 );
......@@ -54,5 +59,6 @@ sub getDisplayType {
return &{$s};
}
1;
......@@ -11,7 +11,7 @@ use Lemonldap::NG::Portal::Simple;
use Lemonldap::NG::Portal::_SAML; #inherits
use Lemonldap::NG::Common::Conf::SAML::Metadata;
our $VERSION = '1.4.2';
our $VERSION = '1.4.10';
our @ISA = qw(Lemonldap::NG::Portal::_SAML);
## @apmethod int authInit()
......@@ -1434,9 +1434,16 @@ sub authForce {
}
## @apmethod boolean authFinish()
# Associate NameID and SessionIndex to a local session
# Do nothing
# @return Lemonldap::NG::Portal error code
sub authFinish {
PE_OK;
}
## @apmethod boolean authPostStore()
# Associate NameID and SessionIndex to a local session
# @return Lemonldap::NG::Portal error code
sub authPostStore {
my $self = shift;
my %h;
......
......@@ -1429,6 +1429,7 @@ sub getSkin {
# - setAuthSessionInfo
# - authenticate
# - authFinish
# - authPostStore
# - userDB module:
# - userDBInit
# - getUser
......@@ -1455,8 +1456,8 @@ sub process {
modifyPassword setSessionInfo setMacros setGroups
setPersistentSessionInfo setLocalGroups sendPasswordMail
authenticate authFinish userDBFinish passwordDBFinish
grantSession removeOther store buildCookie checkNotification
issuerForAuthUser autoRedirect)
grantSession removeOther store authPostStore buildCookie
checkNotification issuerForAuthUser autoRedirect)
);
$self->updateStatus;
return ( ( $self->{error} > 0 ) ? 0 : 1 );
......@@ -1850,7 +1851,7 @@ sub existingSession {
qw(issuerDBInit authInit issuerForUnAuthUser extractFormInfo
userDBInit getUser setAuthSessionInfo setSessionInfo
setMacros setGroups setPersistentSessionInfo
setLocalGroups authenticate authFinish userDBFinish store)
setLocalGroups authenticate authFinish userDBFinish store authPostStore)
);
return $self->{error} || PE_DONE;
}
......@@ -2409,6 +2410,24 @@ sub authFinish {
return $self->{error};
}
## @apmethod int authPostStore
# Call authPostStore method from authentication module
# @return Lemonldap::NG::Portal constant
sub authPostStore {
my $self = shift;
eval { $self->{error} = $self->SUPER::authPostStore; };
if ($@) {
$self->lmLog(
"Optional authPostStore method not defined in current authentication module: $@",
'debug'
);
return PE_OK;
}
return $self->{error};
}
## @apmethod int userDBFinish
# Call userDBFinish method from userDB module
# @return Lemonldap::NG::Portal constant
......
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