Skip to content

Commit 2cb81ee

Browse files
committed
Log received response (especially) for debug page
Also flush logs on debug page so we have maximum information available to do the debugging. Closes: #256
1 parent 29c113b commit 2cb81ee

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

library/EngineBlock/Corto/Module/Service/SingleSignOn.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,14 @@ private function _displayDebugResponse($serviceName)
705705
/** @var Response|EngineBlock_Saml2_ResponseAnnotationDecorator $response */
706706
$response = $_SESSION['debugIdpResponse'];
707707

708+
$log = $this->_server->getLogger();
709+
$log->info(
710+
'Received response to IdP debug page',
711+
['saml_response' => $response->toUnsignedXML()->ownerDocument->saveXML()]
712+
);
713+
$application = EngineBlock_ApplicationSingleton::getInstance();
714+
$application->flushLog('IdP debug page; activating all logs');
715+
708716
if (isset($_POST['mail'])) {
709717
$this->_sendDebugMail($response);
710718
}
@@ -713,8 +721,7 @@ private function _displayDebugResponse($serviceName)
713721
$normalizer = new EngineBlock_Attributes_Normalizer($attributes);
714722
$attributes = $normalizer->normalize();
715723

716-
$validationResult = EngineBlock_ApplicationSingleton::getInstance()
717-
->getDiContainer()
724+
$validationResult = $application->getDiContainer()
718725
->getAttributeValidator()
719726
->validate($attributes);
720727

0 commit comments

Comments
 (0)