diff --git a/endpoints/saml2.php b/endpoints/saml2.php
index 0866da2..583fdde 100644
--- a/endpoints/saml2.php
+++ b/endpoints/saml2.php
@@ -1,7 +1,8 @@
__toString();
$lines = explode("\n",$exceptionText);
foreach ($lines as $line) {
- lassospkit_errlog($line);
+ error_log($line);
}
die('There was an error, shoot yourself !');
}
}
- function assertionConsumer() {
- $ret = parent::assertionConsumer();
+ function headerHtml($title, $url) {
+ ?>
+
+
+
+
+
+
+
+
+ relayState;
+ $this->headerHtml("AssertionConsumer endpoint", $r);
if ($ret == 0) {
- $r = $this->relayState;
echo "Ouais on est loggé, aller $r";
} else {
echo "Une erreur lasso s'est produite de code $ret" . strError($ret);
}
-
- }
- function sloBrws() {
- $ret = parent::sloBrws();
- $this->handleSlo($ret);
- }
- function sloSoap() {
- $ret = parent::sloSoap();
- $this->handleSlo($ret);
+ return $ret;
}
function handleSlo($ret) {
- if ($ret) {
- lassospkit_errlog("Demande de slo échoué: $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 {
- lassospkit_errlog("Demande de slo réussie: $ret");
+ # 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 nameIdManagementBrws() {
- $ret = parent::nameIdManagementBrws();
- $this->handleNid($ret);
- }
- function nameIdManagementSoap() {
- $ret = parent::nameIdManagementSoap();
- $this->handleNid($ret);
- }
- function handleNid($ret) {
+ function handleNameIdManagement($ret) {
if ($ret) {
error_log('Erreur lors du nid: ' . $ret . ': ' . strError($ret));
}
+ return $ret;
}
}
-$endpoint = new MyEndpoint();
+$endpoint = new EndpointExemple();
$endpoint->dispatchAndExit();