Skip to content

Commit 93f3f5c

Browse files
author
Sven Kretschmann
committed
fixes #37
Adding the xml namespace prefix for the AudienceRestriction and Audience nodes in the created assertion xml.
1 parent bf9ad29 commit 93f3f5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AerialShip/LightSaml/Model/Assertion/Assertion.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@ function getXml(\DOMNode $parent, SerializationContext $context) {
302302
$conditionsNode->setAttribute('NotBefore', Helper::time2string($this->getNotBefore()));
303303
$conditionsNode->setAttribute('NotOnOrAfter', Helper::time2string($this->getNotOnOrAfter()));
304304
if ($this->getValidAudience()) {
305-
$audienceRestrictionNode = $context->getDocument()->createElement('AudienceRestriction');
305+
$audienceRestrictionNode = $context->getDocument()->createElementNS(Protocol::NS_ASSERTION, 'AudienceRestriction');
306306
$conditionsNode->appendChild($audienceRestrictionNode);
307307
foreach ($this->getValidAudience() as $v) {
308-
$audienceNode = $context->getDocument()->createElement('Audience', $v);
308+
$audienceNode = $context->getDocument()->createElementNS(Protocol::NS_ASSERTION, 'Audience', $v);
309309
$audienceRestrictionNode->appendChild($audienceNode);
310310
}
311311
}

0 commit comments

Comments
 (0)