Add array handling for additional audiences (#2453)

reject-browser-part-of-url
Maxime Besson 4 years ago
parent ce66a1e62d
commit 21098bcce5
  1. 10
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Api/Common.pm

@ -107,6 +107,9 @@ sub _translateValueConfToApi {
elsif ( $optionName eq "oidcRPMetaDataOptionsPostLogoutRedirectUris" ) {
return [ split( /\s+/, $optionValue, ) ];
}
elsif ( $optionName eq "oidcRPMetaDataOptionsAdditionalAudiences" ) {
return [ split( /\s+/, $optionValue, ) ];
}
else {
return $optionValue;
}
@ -129,6 +132,13 @@ sub _translateValueApiToConf {
return join( ' ', @{$optionValue} );
}
# additionalAudiences is handled as an array
elsif ( $optionName eq 'additionalAudiences' ) {
die "postLogoutRedirectUris is not an array\n"
unless ( ref($optionValue) eq "ARRAY" );
return join( ' ', @{$optionValue} );
}
# Translate JSON booleans to integers
elsif ( JSON::is_bool($optionValue) ) {
return $optionValue ? 1 : 0;

Loading…
Cancel
Save