Skip to content

Commit 17c75f1

Browse files
committed
Merge pull request #30 from data-licious/master
Some fixes
2 parents 92990b5 + c38aafa commit 17c75f1

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected function prepareForXml() {
9191
* @return \DOMElement
9292
*/
9393
function getXml(\DOMNode $parent, SerializationContext $context) {
94-
$result = $context->getDocument()->createElement('AuthnStatement');
94+
$result = $context->getDocument()->createElementNS(Protocol::NS_ASSERTION, 'saml:AuthnStatement');
9595
$parent->appendChild($result);
9696

9797
$result->setAttribute('AuthnInstant', Helper::time2string($this->getAuthnInstant()));
@@ -134,4 +134,4 @@ function loadFromXml(\DOMElement $xml) {
134134
}
135135

136136

137-
}
137+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function getSubjectConfirmations()
6868
*/
6969
public function getXml(\DOMNode $parent, SerializationContext $context)
7070
{
71-
$result = $context->getDocument()->createElement('Subject');
71+
$result = $context->getDocument()->createElementNS(Protocol::NS_ASSERTION, 'saml:Subject');
7272
$parent->appendChild($result);
7373

7474
if ($this->getNameID()) {
@@ -132,4 +132,4 @@ protected function loadXmlCallback($object)
132132
}
133133
}
134134

135-
}
135+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected function prepareForXml() {
9292
function getXml(\DOMNode $parent, SerializationContext $context) {
9393
$this->prepareForXml();
9494

95-
$result = $context->getDocument()->createElement('SubjectConfirmation');
95+
$result = $context->getDocument()->createElementNS(Protocol::NS_ASSERTION, 'saml:SubjectConfirmation');
9696
$parent->appendChild($result);
9797

9898
$result->setAttribute('Method', $this->getMethod());
@@ -150,4 +150,4 @@ function ($obj) {
150150
);
151151
}
152152

153-
}
153+
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ public function getRecipient() {
122122
* @return \DOMElement
123123
*/
124124
function getXml(\DOMNode $parent, SerializationContext $context) {
125-
$result = $context->getDocument()->createElement('SubjectConfirmationData');
125+
$result = $context->getDocument()->createElementNS(Protocol::NS_ASSERTION, 'saml:SubjectConfirmationData');
126126
$parent->appendChild($result);
127127

128128
if ($this->getNotBefore()) {
129129
$result->setAttribute('NotBefore', Helper::time2string($this->getNotBefore()));
130130
}
131131
if ($this->getNotOnOrAfter()) {
132-
$result->setAttribute('NotOnOrAfter', Helper::time2string($this->getNotBefore()));
132+
$result->setAttribute('NotOnOrAfter', Helper::time2string($this->getNotOnOrAfter()));
133133
}
134134

135135
foreach (array('Recipient', 'InResponseTo', 'Address') as $name) {
@@ -160,4 +160,4 @@ function loadFromXml(\DOMElement $xml) {
160160
}
161161

162162

163-
}
163+
}

0 commit comments

Comments
 (0)