Skip to content

Commit cf75ee1

Browse files
committed
Remove the old debug infrastructure.
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2542 44740490-163a-0410-bde0-09ae8108e29a
1 parent cc5730e commit cf75ee1

12 files changed

Lines changed: 4 additions & 224 deletions

File tree

lib/SimpleSAML/Bindings/Shib13/HTTPPost.php

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,10 @@ public function sendResponse($response, SimpleSAML_Configuration $idpmd, SimpleS
8181

8282
SimpleSAML_Utilities::debugMessage($response, 'out');
8383

84-
if ($this->configuration->getBoolean('debug', FALSE)) {
85-
$p = new SimpleSAML_XHTML_Template($this->configuration, 'post-debug.php');
86-
$p->data['header'] = 'SAML (Shibboleth 1.3) Response Debug-mode';
87-
$p->data['RelayStateName'] = 'TARGET';
88-
$p->data['RelayState'] = $relayState;
89-
$p->data['destination'] = $shire;
90-
$p->data['response'] = str_replace("\n", "", base64_encode($response));
91-
$p->data['responseHTML'] = htmlspecialchars(SimpleSAML_Utilities::formatXMLString($response));
92-
$p->show();
93-
94-
} else {
95-
SimpleSAML_Utilities::postRedirect($shire, array(
96-
'TARGET' => $relayState,
97-
'SAMLResponse' => base64_encode($response),
98-
));
99-
}
84+
SimpleSAML_Utilities::postRedirect($shire, array(
85+
'TARGET' => $relayState,
86+
'SAMLResponse' => base64_encode($response),
87+
));
10088

10189
}
10290

modules/exampleattributeserver/www/attributeserver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,4 @@
8383
sspmod_saml_Message::addSign($idpMetadata, $spMetadata, $response);
8484

8585
$binding = new SAML2_HTTPPost();
86-
$binding->setDestination(sspmod_saml_Message::getDebugDestination());
8786
$binding->send($response);

modules/saml/lib/Auth/Source/SP.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ private function startSSO2(SimpleSAML_Configuration $idpMetadata, array $state)
242242

243243
SimpleSAML_Logger::debug('Sending SAML 2 AuthnRequest to ' . var_export($idpMetadata->getString('entityid'), TRUE));
244244
$b = new SAML2_HTTPRedirect();
245-
$b->setDestination(sspmod_saml_Message::getDebugDestination());
246245
$b->send($ar);
247246

248247
assert('FALSE');
@@ -372,7 +371,6 @@ public function startSLO2(&$state) {
372371
$lr->setRelayState($id);
373372

374373
$b = new SAML2_HTTPRedirect();
375-
$b->setDestination(sspmod_saml_Message::getDebugDestination());
376374
$b->send($lr);
377375

378376
assert('FALSE');

modules/saml/lib/IdP/SAML2.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public static function sendResponse(array $state) {
6767

6868
/* Send the response. */
6969
$binding = SAML2_Binding::getBinding($protocolBinding);
70-
$binding->setDestination(sspmod_saml_Message::getDebugDestination());
7170
$binding->send($ar);
7271
}
7372

@@ -114,7 +113,6 @@ public static function handleAuthError(SimpleSAML_Error_Exception $exception, ar
114113
));
115114

116115
$binding = SAML2_Binding::getBinding($protocolBinding);
117-
$binding->setDestination(sspmod_saml_Message::getDebugDestination());
118116
$binding->send($ar);
119117
}
120118

@@ -323,7 +321,6 @@ public static function sendLogoutResponse(SimpleSAML_IdP $idp, array $state) {
323321
}
324322

325323
$binding = new SAML2_HTTPRedirect();
326-
$binding->setDestination(sspmod_saml_Message::getDebugDestination());
327324
$binding->send($lr);
328325
}
329326

modules/saml/lib/Message.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,6 @@
1010
*/
1111
class sspmod_saml_Message {
1212

13-
/**
14-
* Retrieve the destination we should send the message to.
15-
*
16-
* This will return a debug endpoint if we have debug enabled. If debug
17-
* is disabled, NULL is returned, in which case the default destination
18-
* will be used.
19-
*
20-
* @return string|NULL The destination the message should be delivered to.
21-
*/
22-
public static function getDebugDestination() {
23-
24-
$globalConfig = SimpleSAML_Configuration::getInstance();
25-
if (!$globalConfig->getBoolean('debug', FALSE)) {
26-
return NULL;
27-
}
28-
29-
return SimpleSAML_Module::getModuleURL('saml/debug.php');
30-
}
31-
32-
3313
/**
3414
* Add signature key and and senders certificate to an element (Message or Assertion).
3515
*

modules/saml/www/debug.php

Lines changed: 0 additions & 85 deletions
This file was deleted.

templates/httpredirect-debug.php

Lines changed: 0 additions & 20 deletions
This file was deleted.

templates/post-debug.php

Lines changed: 0 additions & 73 deletions
This file was deleted.

www/example-simple/attributequery.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ function sendQuery($dataId, $url, $nameId) {
2121
$query->setNameId($nameId);
2222

2323
$binding = new SAML2_HTTPRedirect();
24-
$binding->setDestination(sspmod_saml_Message::getDebugDestination());
2524
$binding->send($query);
2625
}
2726

www/saml2/sp/SingleLogoutService.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555

5656
/* Send response. */
5757
$binding = new SAML2_HTTPRedirect();
58-
$binding->setDestination(sspmod_saml_Message::getDebugDestination());
5958
$binding->send($lr);
6059
} catch (Exception $exception) {
6160
throw new SimpleSAML_Error_Error('LOGOUTREQUEST', $exception);

0 commit comments

Comments
 (0)