Manager API - fixed bug with exportedAttributes getting mixed up between saml sps #2034
This commit is contained in:
parent
67db0b6865
commit
f14ae6cd4b
|
@ -234,8 +234,17 @@ sub _getSamlSp {
|
||||||
my $metadata = $conf->{samlSPMetaDataXML}->{$confKey}
|
my $metadata = $conf->{samlSPMetaDataXML}->{$confKey}
|
||||||
->{samlSPMetaDataXML};
|
->{samlSPMetaDataXML};
|
||||||
|
|
||||||
|
# Get options
|
||||||
|
my $options = $conf->{samlSPMetaDataOptions}->{$confKey};
|
||||||
|
|
||||||
|
my $samlSp = {
|
||||||
|
confKey => $confKey,
|
||||||
|
metadata => $metadata,
|
||||||
|
exportedAttributes => {},
|
||||||
|
options => $options
|
||||||
|
};
|
||||||
|
|
||||||
# Get exported attributes
|
# Get exported attributes
|
||||||
my %exportedAttributes;
|
|
||||||
foreach (
|
foreach (
|
||||||
keys %{
|
keys %{
|
||||||
$conf->{samlSPMetaDataExportedAttributes}
|
$conf->{samlSPMetaDataExportedAttributes}
|
||||||
|
@ -251,29 +260,22 @@ sub _getSamlSp {
|
||||||
|
|
||||||
$mandatory = !!$mandatory ? 'true' : 'false';
|
$mandatory = !!$mandatory ? 'true' : 'false';
|
||||||
|
|
||||||
$exportedAttributes->{$_} = {
|
$samlSp->{exportedAttributes}->{$_} = {
|
||||||
name => $name,
|
name => $name,
|
||||||
mandatory => $mandatory
|
mandatory => $mandatory
|
||||||
};
|
};
|
||||||
|
|
||||||
if (defined $friendly_name && $friendly_name ne '') {
|
if (defined $friendly_name && $friendly_name ne '') {
|
||||||
$exportedAttributes->{$_}->{friendlyName} = $friendly_name;
|
$samlSp->{exportedAttributes}->{$_}->{friendlyName} = $friendly_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined $format && $format ne '') {
|
if (defined $format && $format ne '') {
|
||||||
$exportedAttributes->{$_}->{format} = $format;
|
$samlSp->{exportedAttributes}->{$_}->{format} = $format;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get options
|
|
||||||
my $options = $conf->{samlSPMetaDataOptions}->{$confKey};
|
|
||||||
|
|
||||||
return {
|
return $samlSp;
|
||||||
confKey => $confKey,
|
|
||||||
metadata => $metadata,
|
|
||||||
exportedAttributes => $exportedAttributes,
|
|
||||||
options => $options
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user