summaryrefslogtreecommitdiffstats
path: root/lib/SAML2
diff options
context:
space:
mode:
authorOlav Morken <olav.morken@uninett.no>2010-09-10 13:13:37 +0000
committerOlav Morken <olav.morken@uninett.no>2010-09-10 13:13:37 +0000
commitcc5730e58da57d4bdadc81968d5d2ab0e86c94bd (patch)
tree4458c45e0368ef09239ed99a81f023e8f76c077c /lib/SAML2
parent08f99932953245c9c9ad1e712774c15a26f9f8aa (diff)
downloadsimplesamlphp-cc5730e58da57d4bdadc81968d5d2ab0e86c94bd.zip
simplesamlphp-cc5730e58da57d4bdadc81968d5d2ab0e86c94bd.tar.gz
simplesamlphp-cc5730e58da57d4bdadc81968d5d2ab0e86c94bd.tar.bz2
Log received XML messages to log file when debug is set to TRUE.
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2541 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'lib/SAML2')
-rw-r--r--lib/SAML2/HTTPPost.php5
-rw-r--r--lib/SAML2/HTTPRedirect.php5
-rw-r--r--lib/SAML2/SOAPClient.php4
3 files changed, 14 insertions, 0 deletions
diff --git a/lib/SAML2/HTTPPost.php b/lib/SAML2/HTTPPost.php
index 3a0a85c..fc98537 100644
--- a/lib/SAML2/HTTPPost.php
+++ b/lib/SAML2/HTTPPost.php
@@ -26,6 +26,9 @@ class SAML2_HTTPPost extends SAML2_Binding {
$msgStr = $message->toSignedXML();
$msgStr = $msgStr->ownerDocument->saveXML($msgStr);
+
+ SimpleSAML_Utilities::debugMessage($msgStr, 'out');
+
$msgStr = base64_encode($msgStr);
$msgStr = htmlspecialchars($msgStr);
@@ -86,6 +89,8 @@ END;
$msg = base64_decode($msg);
+ SimpleSAML_Utilities::debugMessage($msg, 'in');
+
$document = new DOMDocument();
$document->loadXML($msg);
$xml = $document->firstChild;
diff --git a/lib/SAML2/HTTPRedirect.php b/lib/SAML2/HTTPRedirect.php
index 71a32b4..24f13c1 100644
--- a/lib/SAML2/HTTPRedirect.php
+++ b/lib/SAML2/HTTPRedirect.php
@@ -30,6 +30,9 @@ class SAML2_HTTPRedirect extends SAML2_Binding {
$msgStr = $message->toUnsignedXML();
$msgStr = $msgStr->ownerDocument->saveXML($msgStr);
+
+ SimpleSAML_Utilities::debugMessage($msgStr, 'out');
+
$msgStr = gzdeflate($msgStr);
$msgStr = base64_encode($msgStr);
@@ -112,6 +115,8 @@ class SAML2_HTTPRedirect extends SAML2_Binding {
throw new Exception('Unknown SAMLEncoding: ' . var_export($encoding, TRUE));
}
+ SimpleSAML_Utilities::debugMessage($msg, 'in');
+
$document = new DOMDocument();
$document->loadXML($msg);
$xml = $document->firstChild;
diff --git a/lib/SAML2/SOAPClient.php b/lib/SAML2/SOAPClient.php
index 292d166..fc1824f 100644
--- a/lib/SAML2/SOAPClient.php
+++ b/lib/SAML2/SOAPClient.php
@@ -91,6 +91,8 @@ class SAML2_SOAPClient {
$request = $msg->toSignedXML();
$request = self::START_SOAP_ENVELOPE . $request->ownerDocument->saveXML($request) . self::END_SOAP_ENVELOPE;
+ SimpleSAML_Utilities::debugMessage($request, 'out');
+
$action = 'http://www.oasis-open.org/committees/security';
$version = '1.1';
$destination = $msg->getDestination();
@@ -102,6 +104,8 @@ class SAML2_SOAPClient {
throw new Exception('Empty SOAP response, check peer certificate.');
}
+ SimpleSAML_Utilities::debugMessage($soapresponsexml, 'in');
+
// Convert to SAML2_Message (DOMElement)
$dom = new DOMDocument();
if (!$dom->loadXML($soapresponsexml)) {