當前位置: 首頁>>代碼示例>>PHP>>正文


PHP phpCAS::getServerLogoutURL方法代碼示例

本文整理匯總了PHP中phpCAS::getServerLogoutURL方法的典型用法代碼示例。如果您正苦於以下問題:PHP phpCAS::getServerLogoutURL方法的具體用法?PHP phpCAS::getServerLogoutURL怎麽用?PHP phpCAS::getServerLogoutURL使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在phpCAS的用法示例。


在下文中一共展示了phpCAS::getServerLogoutURL方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: main

 /**
  * [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);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:stypo3dext,代碼行數:35,代碼來源:class.tx_dlcube04CAS_pi7.php

示例2: RWSPLOCas

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();
}
開發者ID:MoodleMetaData,項目名稱:MoodleMetaData,代碼行數:45,代碼來源:servicelib.php

示例3: getLogoutRedirect

 public function getLogoutRedirect()
 {
     $_SESSION = array();
     session_destroy();
     return phpCAS::getServerLogoutURL();
 }
開發者ID:rmxcc,項目名稱:pydio-core,代碼行數:6,代碼來源:class.casAuthDriver.php


注:本文中的phpCAS::getServerLogoutURL方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。