| @@ 196-204 (lines=9) @@ | ||
| 193 | ||
| 194 | $adaptedAssertion = new AssertionAdapter($assertion); |
|
| 195 | $expectedResponse = $stateHandler->getGatewayRequestId(); |
|
| 196 | if (!$adaptedAssertion->inResponseToMatches($expectedResponse)) { |
|
| 197 | $logger->critical(sprintf( |
|
| 198 | 'Received Response with unexpected InResponseTo: "%s", %s', |
|
| 199 | $adaptedAssertion->getInResponseTo(), |
|
| 200 | ($expectedResponse ? 'expected "' . $expectedResponse . '"' : ' no response expected') |
|
| 201 | )); |
|
| 202 | ||
| 203 | return $this->render('unrecoverableError'); |
|
| 204 | } |
|
| 205 | ||
| 206 | $authenticatedNameId = $assertion->getNameId(); |
|
| 207 | $isSubjectRequested = $stateHandler->hasSubject(); |
|
| @@ 154-164 (lines=11) @@ | ||
| 151 | ||
| 152 | $adaptedAssertion = new AssertionAdapter($assertion); |
|
| 153 | $expectedInResponseTo = $responseContext->getExpectedInResponseTo(); |
|
| 154 | if (!$adaptedAssertion->inResponseToMatches($expectedInResponseTo)) { |
|
| 155 | $logger->critical(sprintf( |
|
| 156 | 'Received Response with unexpected InResponseTo: "%s", %s', |
|
| 157 | $adaptedAssertion->getInResponseTo(), |
|
| 158 | ($expectedInResponseTo ? 'expected "' . $expectedInResponseTo . '"' : ' no response expected') |
|
| 159 | )); |
|
| 160 | ||
| 161 | return $this->render( |
|
| 162 | 'SurfnetStepupGatewayGatewayBundle:Gateway:unrecoverableError.html.twig' |
|
| 163 | ); |
|
| 164 | } |
|
| 165 | ||
| 166 | $logger->notice('Successfully processed SAMLResponse'); |
|
| 167 | ||