Skip to content

Commit

Permalink
fix: metadata extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
damikael committed May 2, 2023
1 parent 6fd00c9 commit 7f5df08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,13 @@ public function addContact($type, $details)
$eexts[] = new \SAML2\XML\Chunk($ext_elem_CessionarioCommittente);
}

if (isset($details['extensions'])) {
foreach($details['extensions'] as $e_key => $e_val) {
$ext_elem = $ext_dom->createElement($e_key, $e_val? $e_val : '');
$eexts[] = new \SAML2\XML\Chunk($ext_elem);
}
}

$e->setExtensions($eexts);

if (!empty($details['attributes'])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class Metadata
'fpa.CAP',
'fpa.Comune',
'fpa.Provincia',
'fpa.Nazione'
'fpa.Nazione',
'extensions'
];


Expand Down

0 comments on commit 7f5df08

Please sign in to comment.