Commit b394ba25 authored by Yadd's avatar Yadd
Browse files

Import r5060 (#1016)

parent a39c45b4
......@@ -26,7 +26,7 @@ describe('Lemonldap::NG Manager', function() {
element(by.id('t-oidcRPMetaDataNodes/new__rp-example/oidcRPMetaDataOptionsExtraClaims')).click();
element(by.css('.glyphicon-plus-sign')).click();
element(by.id('a-oidcRPMetaDataNodes/new__rp-example/oidcRPMetaDataOptionsExtraClaims')).click();
element(by.id('t-oidcRPMetaDataNodes/new__rp-example/oidcRPMetaDataOptionsExtraClaims/n1')).click();
element(by.id('t-oidcRPMetaDataNodes/new__rp-example/oidcRPMetaDataOptionsExtraClaims/n2')).click();
element(by.id('hashkeyinput')).clear().sendKeys('MyClaim');
element(by.id('hashvalueinput')).clear().sendKeys('MyAttribute');
});
......
......@@ -434,7 +434,10 @@ sub _oidcMetaDataNodes {
my ( $id, $resp ) = ( 1, [] );
# Return all exported attributes if asked
if ( $query =~ /^oidc${type}MetaDataExportedVars$/ ) {
if ( $query =~
/^(?:oidc${type}MetaDataExportedVars|oidcRPMetaDataOptionsExtraClaims)$/
)
{
my $pk = eval { $self->getConfKey( $req, $query )->{$partner} } // {};
return $self->sendError( $req, undef, 400 ) if ( $req->error );
foreach my $h ( sort keys %$pk ) {
......
......@@ -370,7 +370,23 @@ sub _scanNodes {
elsif ( $target =~ /^oidc(?:O|R)PMetaDataOptions/ ) {
my $optKey = $&;
hdebug " $base sub key: $target";
if ( $target =~
if ( $target eq 'oidcRPMetaDataOptionsExtraClaims' ) {
if ( $leaf->{cnodes} ) {
hdebug(' unopened');
$self->newConf->{$target}->{$key} =
$self->refConf->{$target}->{$key} // {};
}
elsif ($h) {
hdebug(' opened');
$self->set( $target, $key, $leaf->{title},
$leaf->{data} );
}
else {
hdebug(" $target: looking for subnodes");
$self->_scanNodes($subNodes);
}
}
elsif ( $target =~
/^(?:$oidcOPMetaDataNodeKeys|$oidcRPMetaDataNodeKeys)/o
)
{
......
......@@ -1149,7 +1149,7 @@ sub getAttributesListFromClaim {
# Additional claims
my $extraClaims =
$self->{oidcRPMetaDataOptions}->{$rp}->{oidcRPMetaDataOptionsExtraClaims};
$self->{oidcRPMetaDataOptionsExtraClaims}->{$rp};
if ($extraClaims) {
foreach my $claim ( keys %$extraClaims ) {
......
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