Manage exported variables for WebID (#636)

This commit is contained in:
Clément Oudot 2014-02-18 16:34:08 +00:00
parent 7b9a5b1887
commit c4f277c8c8
5 changed files with 21 additions and 5 deletions

View File

@ -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',

View File

@ -132,6 +132,7 @@ sub unserialize {
|samlStorageOptions
|sessionDataToRemember
|vhostOptions
|webIDExportedVars
)$/
and $v ||= {} and not ref($v)
)

View File

@ -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

View File

@ -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",

View File

@ -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;