| @@ 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 |
|
| @@ 128-141 (lines=14) @@ | ||
| 125 | * @param SAML2_Assertion $newAssertion |
|
| 126 | * @param ServiceProvider $targetServiceProvider |
|
| 127 | */ |
|
| 128 | private function addSubjectConfirmationFor(SAML2_Assertion $newAssertion, ServiceProvider $targetServiceProvider) |
|
| 129 | { |
|
| 130 | $confirmation = new \SAML2_XML_saml_SubjectConfirmation(); |
|
| 131 | $confirmation->Method = \SAML2_Const::CM_BEARER; |
|
| 132 | ||
| 133 | $confirmationData = new \SAML2_XML_saml_SubjectConfirmationData(); |
|
| 134 | $confirmationData->InResponseTo = $this->proxyStateHandler->getRequestId(); |
|
| 135 | $confirmationData->Recipient = $targetServiceProvider->getAssertionConsumerUrl(); |
|
| 136 | $confirmationData->NotOnOrAfter = $this->getTimestamp('PT8H'); |
|
| 137 | ||
| 138 | $confirmation->SubjectConfirmationData = $confirmationData; |
|
| 139 | ||
| 140 | $newAssertion->setSubjectConfirmation([$confirmation]); |
|
| 141 | } |
|
| 142 | ||
| 143 | /** |
|
| 144 | * @param SAML2_Assertion $newAssertion |
|