/** * [Put your description here] */ function main($content, $conf) { $this->conf = $conf; $this->pi_setPiVarDefaults(); $this->pi_USER_INT_obj = 1; // Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object! $this->pi_loadLL(); $this->typeExecution = "prod"; $urlCas = "none"; $portCas = "none"; if ($this->typeExecution == "dev") { $urlCas = "xinf-devlinux.intranet.haras-nationaux.fr"; $portCas = 7777; } else { if ($this->typeExecution == "prod") { $urlCas = "cerbere.haras-nationaux.fr"; $portCas = 443; } } session_start(); if (isset($_GET["action"]) && $_GET["action"] == "disconnect") { phpCAS::setDebug(); phpCAS::client(CAS_VERSION_2_0, $urlCas, $portCas, 'cas', 'true'); $ur = phpCAS::getServerLogoutURL(); phpCAS::killSession(); //Suppression de la sesssion de harasire setcookie("netid", "", time() - 3600, "/", ".haras-nationaux.fr"); //$urCid = "http://www4.haras-nationaux.fr/cid-internet-web/InvalidateSessionServlet?service=".$ur; $content .= '<IFRAME src="' . $ur . '" frameborder="no" height="600" width="670"></IFRAME>'; return $this->pi_wrapInBaseClass($content); } }
function RWSPLOCas($r_csp) { global $RWSESL3; if (isset($_SESSION['rwscas']['cookiejar'])) { $r_ckf = $_SESSION['rwscas']['cookiejar']; } if (empty($r_csp->config->hostname) || !$r_csp->config->logoutcas) { if (isset($r_ckf)) { if (file_exists($r_ckf)) { unlink($r_ckf); } unset($_SESSION['rwscas']['cookiejar']); } unset($_SESSION['rwscas']); return; } list($r_v1, $r_v2, $r_v3) = explode(".", phpCAS::getVersion()); $r_csp->connectCAS(); $r_lou = phpCAS::getServerLogoutURL(); $r_ch = curl_init(); curl_setopt($r_ch, CURLOPT_URL, $r_lou); curl_setopt($r_ch, CURLOPT_HTTPGET, true); curl_setopt($r_ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($r_ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($r_ch, CURLOPT_FAILONERROR, true); curl_setopt($r_ch, CURLOPT_TIMEOUT, 30); curl_setopt($r_ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($r_ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($r_ch, CURLOPT_USERAGENT, "PHP"); if (isset($r_ckf)) { curl_setopt($r_ch, CURLOPT_COOKIEFILE, $r_ckf); curl_setopt($r_ch, CURLOPT_COOKIEJAR, $r_ckf); } curl_exec($r_ch); curl_close($r_ch); if (isset($r_ckf)) { if (file_exists($r_ckf)) { unlink($r_ckf); } unset($_SESSION['rwscas']['cookiejar']); } unset($_SESSION['rwscas']); session_unset(); session_destroy(); }
public function getLogoutRedirect() { $_SESSION = array(); session_destroy(); return phpCAS::getServerLogoutURL(); }