Commit e1b7a3f3 authored by Clément OUDOT's avatar Clément OUDOT

Port SAML Token options in 1.4 branch (#LEMONLDAP-1083)

git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/branches/lemonldap-ng_version_1_4-bugfixes@5397 1dbb9719-a921-0410-b57f-c3a383c2c641
parent d682baf7
......@@ -34,7 +34,7 @@ Last-Update: 2016-05-02
-use Mouse;
+use Moose;
our $VERSION = 1.4.6;
our $VERSION = 1.4.11;
@@ -1539,6 +1539,6 @@
......@@ -53,7 +53,7 @@ Last-Update: 2016-05-02
-use Mouse;
+use Moose;
our $VERSION = 1.4.1;
our $VERSION = 1.4.11;
@@ -292,6 +292,6 @@
documentation => 'Redirection port for a virtual host',
......
......@@ -8,7 +8,7 @@ package Lemonldap::NG::Common::Conf::SubAttributes;
use Mouse;
our $VERSION = 1.4.1;
our $VERSION = 1.4.11;
## E
......@@ -165,6 +165,13 @@ has 'samlIDPMetaDataOptionsSignSSOMessage' => (
documentation => 'SAML IDP option sign SSO',
);
has 'samlIDPMetaDataOptionsStoreSAMLToken' => (
is => 'rw',
isa => 'Bool',
default => '0',
documentation => 'SAML IDP option store SAML token',
);
has 'samlSPMetaDataExportedAttributes' => (
is => 'rw',
isa => 'HashRef',
......
......@@ -117,13 +117,15 @@ sub cstruct {
samlIDPMetaDataOptionsSession => {
_nodes => [
qw(samlIDPMetaDataOptionsAdaptSessionUtime samlIDPMetaDataOptionsForceUTF8)
qw(samlIDPMetaDataOptionsAdaptSessionUtime samlIDPMetaDataOptionsForceUTF8 samlIDPMetaDataOptionsStoreSAMLToken)
],
samlIDPMetaDataOptionsAdaptSessionUtime =>
"bool:/samlIDPMetaDataOptions/$k2/samlIDPMetaDataOptionsAdaptSessionUtime",
samlIDPMetaDataOptionsForceUTF8 =>
"bool:/samlIDPMetaDataOptions/$k2/samlIDPMetaDataOptionsForceUTF8",
samlIDPMetaDataOptionsStoreSAMLToken =>
"bool:/samlIDPMetaDataOptions/$k2/samlIDPMetaDataOptionsStoreSAMLToken",
},
......
......@@ -9,7 +9,7 @@ package Lemonldap::NG::Manager::_i18n;
use strict;
use AutoLoader qw(AUTOLOAD);
our $VERSION = '1.4.6';
our $VERSION = '1.4.11';
## @method string translate(string text,string lang)
# Returns $text translated in $lang.
......@@ -464,6 +464,7 @@ sub en {
samlIDPMetaDataOptionsSignature => 'Signature',
samlIDPMetaDataOptionsBinding => 'Binding',
samlIDPMetaDataOptionsSecurity => 'Security',
samlIDPMetaDataOptionsStoreSAMLToken => 'Store SAML Token',
samlSPMetaDataNode => 'SAML service providers',
samlSPMetaDataXML => 'Metadata',
samlSPMetaDataExportedAttributes => 'Exported attributes',
......@@ -985,6 +986,7 @@ sub fr {
samlIDPMetaDataOptionsSignature => 'Signature',
samlIDPMetaDataOptionsBinding => 'Méthode',
samlIDPMetaDataOptionsSecurity => 'Sécurité',
samlIDPMetaDataOptionsStoreSAMLToken => 'Conserver le jeton SAML',
samlSPMetaDataNode => 'Fournisseurs de service SAML',
samlSPMetaDataXML => 'Metadonnées',
samlSPMetaDataExportedAttributes => 'Attributs exportés',
......
......@@ -1130,7 +1130,18 @@ sub setAuthSessionInfo {
# Dump Lasso objects in session
$self->{sessionInfo}->{_lassoSessionDump} = $session->dump() if $session;
$self->{sessionInfo}->{_lassoIdentityDump} = $identity->dump() if $identity;
$self->{sessionInfo}->{_samlToken} = $self->{_samlToken};
# Keep SAML Token in session
my $store_samlToken =
$self->{samlIDPMetaDataOptions}->{$idpConfKey}
->{samlIDPMetaDataOptionsStoreSAMLToken};
if ($store_samlToken) {
$self->lmLog( "Store SAML Token in session", 'debug' );
$self->{sessionInfo}->{_samlToken} = $self->{_samlToken};
}
else {
$self->lmLog( "SAML Token will not be stored in session", 'debug' );
}
$self->{_lassoLogin} = $login;
......
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