| @@ 99-112 (lines=14) @@ | ||
| 96 | * @param SAML2_Assertion $newAssertion |
|
| 97 | * @param ServiceProvider $targetServiceProvider |
|
| 98 | */ |
|
| 99 | private function addSubjectConfirmationFor(SAML2_Assertion $newAssertion, ServiceProvider $targetServiceProvider) |
|
| 100 | { |
|
| 101 | $confirmation = new SAML2_XML_saml_SubjectConfirmation(); |
|
| 102 | $confirmation->Method = SAML2_Const::CM_BEARER; |
|
| 103 | ||
| 104 | $confirmationData = new SAML2_XML_saml_SubjectConfirmationData(); |
|
| 105 | $confirmationData->InResponseTo = $this->stateHandler->getRequestId(); |
|
| 106 | $confirmationData->Recipient = $targetServiceProvider->getAssertionConsumerUrl(); |
|
| 107 | $confirmationData->NotOnOrAfter = $this->getTimestamp('PT8H'); |
|
| 108 | ||
| 109 | $confirmation->SubjectConfirmationData = $confirmationData; |
|
| 110 | ||
| 111 | $newAssertion->setSubjectConfirmation([$confirmation]); |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * @param SAML2_Assertion $newAssertion |
|
| @@ 162-175 (lines=14) @@ | ||
| 159 | * @param SAML2_Assertion $newAssertion |
|
| 160 | * @param ServiceProvider $targetServiceProvider |
|
| 161 | */ |
|
| 162 | private function addSubjectConfirmationFor(SAML2_Assertion $newAssertion, ServiceProvider $targetServiceProvider) |
|
| 163 | { |
|
| 164 | $confirmation = new \SAML2_XML_saml_SubjectConfirmation(); |
|
| 165 | $confirmation->Method = \SAML2_Const::CM_BEARER; |
|
| 166 | ||
| 167 | $confirmationData = new \SAML2_XML_saml_SubjectConfirmationData(); |
|
| 168 | $confirmationData->InResponseTo = $this->proxyStateHandler->getRequestId(); |
|
| 169 | $confirmationData->Recipient = $targetServiceProvider->getAssertionConsumerUrl(); |
|
| 170 | $confirmationData->NotOnOrAfter = $this->getTimestamp('PT8H'); |
|
| 171 | ||
| 172 | $confirmation->SubjectConfirmationData = $confirmationData; |
|
| 173 | ||
| 174 | $newAssertion->setSubjectConfirmation([$confirmation]); |
|
| 175 | } |
|
| 176 | ||
| 177 | /** |
|
| 178 | * @param SAML2_Assertion $newAssertion |
|