diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Attributes.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Attributes.pm index 61278d75a..7980df364 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Attributes.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Attributes.pm @@ -1400,6 +1400,13 @@ has 'webIDAuthnLevel' => ( documentation => 'WebID authentication level', ); +has 'webIDExportedVars' => ( + is => 'rw', + isa => 'HashRef', + default => sub { return {}; }, + documentation => 'WebID exported variables', +); + has 'whatToTrace' => ( is => 'rw', isa => 'Str', diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm index 6246b5083..427d5e77c 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm @@ -132,6 +132,7 @@ sub unserialize { |samlStorageOptions |sessionDataToRemember |vhostOptions + |webIDExportedVars )$/ and $v ||= {} and not ref($v) ) diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm index 747fd74ae..f687dee91 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm @@ -599,10 +599,16 @@ sub struct { # WebID webIDParams => { - _nodes => [qw(webIDAuthnLevel webIDWhitelist)], - _help => 'authWebID', - webIDAuthnLevel => 'int:webIDAuthnLevel', - webIDWhitelist => 'text:/webIDWhitelist', + _nodes => + [qw(webIDAuthnLevel cn:webIDExportedVars webIDWhitelist)], + _help => 'authWebID', + webIDAuthnLevel => 'int:webIDAuthnLevel', + webIDExportedVars => { + _nodes => ['hash:/webIDExportedVars:vars:btext'], + _js => 'hashRoot', + _help => 'authWebID', + }, + webIDWhitelist => 'text:/webIDWhitelist', }, # DBI diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm index eedea7121..c37c5272e 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm @@ -389,6 +389,7 @@ sub en { virtualHosts => 'Virtual Hosts', warning => 'Warning', webIDAuthnLevel => 'Authentication level', + webIDExportedVars => 'Exported variables', webIDParams => 'WebID parameters', webIDWhitelist => 'WebID whitelist', whatToTrace => "REMOTE_USER", @@ -880,6 +881,7 @@ sub fr { virtualHosts => 'Hôtes virtuels', warning => 'Attention', webIDAuthnLevel => 'Niveau d\'authentification', + webIDExportedVars => 'Variables exportées', webIDParams => 'Paramètres WebID', webIDWhitelist => 'Liste blanche WebID', whatToTrace => "REMOTE_USER", diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBWebID.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBWebID.pm index 434cc6120..de8c072ba 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBWebID.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBWebID.pm @@ -45,7 +45,7 @@ sub setSessionInfo { return PE_ERROR; } - while ( my ( $k, $v ) = each %{ $self->{exportedVars} } ) { + while ( my ( $k, $v ) = each ( %{ $self->{exportedVars} } , %{ $self->{webIDExportedVars} } ) ) { my $attr = $k; my $req; $attr =~ s/^!// and $req = 1;