From 225ace30c693516b9b33e9f5f65b2090aeb2a609 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 29 Jul 2009 18:41:40 +0200 Subject: [PATCH] Replace default endpoints for normal behaviour. --- endpoints/saml2.php | 78 +-------------------------------------------- 1 file changed, 1 insertion(+), 77 deletions(-) diff --git a/endpoints/saml2.php b/endpoints/saml2.php index 583fdde..fecb673 100644 --- a/endpoints/saml2.php +++ b/endpoints/saml2.php @@ -2,81 +2,5 @@ require_once('spkitlasso/lassospkit_saml2_endpoint.inc.php'); require_once('spkitlasso/lassospkit_public_api.inc.php'); -class EndpointExemple extends LassoSPKitSaml2Endpoint { - function dispatchAndExit() { - try { - parent::dispatchAndExit(); - } catch (Exception $e) { - $exceptionText = $e->__toString(); - $lines = explode("\n",$exceptionText); - foreach ($lines as $line) { - error_log($line); - } - die('There was an error, shoot yourself !'); - } - } - function headerHtml($title, $url) { - ?> - - - <?php echo $title ?> - - - - - - relayState; - $this->headerHtml("AssertionConsumer endpoint", $r); - if ($ret == 0) { - echo "Ouais on est loggé, aller $r"; - } else { - echo "Une erreur lasso s'est produite de code $ret" . strError($ret); - } - return $ret; - } - function handleSlo($ret) { - $r = $this->relayState; - if ($this->currentHttpMethod == LASSO_HTTP_METHOD_GET && - $this->currentHttpMethod == LASSO_HTTP_METHOD_POST) { - $this->headerHtml("SLO endpoint", $r); - if ($ret) { - echo "Demande de slo échoué: " . strError($ret) . "($ret)"; - } else { - echo "Demande de slo réussie"; - } - echo "Go to $r"; - $this->footerHtml(); - lassospkit_clean(); - } else { - # Specialized - $id = lassospkit_userid(); - error_log("Trying to destroy session $id"); - $session = LassoSPKitUtilsSession::getSingleton(); - $session->id = $id; - $session->clean(); - } - if ($ret) { - error_log("Demande de slo échoué: $ret"); - } else { - error_log("Demande de slo réussie: $ret"); - } - - return $ret; - } - function handleNameIdManagement($ret) { - if ($ret) { - error_log('Erreur lors du nid: ' . $ret . ': ' . strError($ret)); - } - return $ret; - } -} - - -$endpoint = new EndpointExemple(); +$endpoint = new LassoSPKitSaml2Endpoint(); $endpoint->dispatchAndExit();