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


PHP phpCAS::logoutWithUrl方法代碼示例

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


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

示例1: logout

 /**
  * Logout the user form the current symfony application and from the
  *  CAS server
  * @param  boolean $onlyLocal   Set it to true, to logout from the application, but stay login in the CAS
  */
 public function logout($url = null, $onlyLocal = false)
 {
     parent::signOut();
     $this->username = null;
     if (!$onlyLocal) {
         sfCAS::initPhpCAS();
         if (!empty($url)) {
             phpCAS::logoutWithUrl($url);
         } else {
             phpCas::logout();
         }
     }
 }
開發者ID:TheoJD,項目名稱:portail,代碼行數:18,代碼來源:sfUTCCASUser.class.php

示例2: logout

 public function logout()
 {
     $logout_redirect_url = getConfig('casldap_logout_redirect_url');
     $_SESSION['adminloggedin'] = "";
     $_SESSION['logindetails'] = "";
     //destroy the session
     session_destroy();
     if (!getConfig('cas_disable_logout')) {
         self::init_cas_client();
         phpCAS::logoutWithUrl($logout_redirect_url);
     }
     header("Location: {$logout_redirect_url}");
     exit;
 }
開發者ID:brenard,項目名稱:phplist-casldap-plugin,代碼行數:14,代碼來源:CASLdapPlugin.php

示例3: deconnexion_CAS

function deconnexion_CAS($url = "")
{
    // import de la librairie CAS
    include LIBRARY_PATH . 'CAS/CAS.php';
    // import des parametres du serveur CAS
    $config_CAS_host = $_SESSION['config']['CAS_host'];
    $config_CAS_portNumber = $_SESSION['config']['CAS_portNumber'];
    $config_CAS_URI = $_SESSION['config']['CAS_URI'];
    global $connexionCAS;
    // initialisation phpCAS
    if ($connexionCAS != "active") {
        $CASCnx = phpCAS::client(CAS_VERSION_2_0, $config_CAS_host, $config_CAS_portNumber, $config_CAS_URI);
        $connexionCAS = "active";
    }
    phpCAS::logoutWithUrl($url);
}
開發者ID:TexGG,項目名稱:Libertempo,代碼行數:16,代碼來源:fonction.php

示例4: get_path

    die;
}
// include path library
include_once get_path('incRepositorySys') . '/lib/thirdparty/cas/CAS.php';
// DB table definition
$tbl_mdb_names = claro_sql_get_main_tbl();
$tbl_user = $tbl_mdb_names['user'];
if (!isset($_SESSION['init_CasCheckinDone']) || $logout || basename($_SERVER['SCRIPT_NAME']) == 'login.php' && isset($_REQUEST['authModeReq']) && $_REQUEST['authModeReq'] == 'CAS' || isset($_REQUEST['fromCasServer'])) {
    phpCAS::client(CAS_VERSION_2_0, get_conf('claro_CasServerHostUrl'), get_conf('claro_CasServerHostPort', 443), get_conf('claro_CasServerRoot', ''), FALSE);
    phpCAS::setNoCasServerValidation();
    if ($logout) {
        $userLoggedOnCas = false;
        $logout_url = (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . get_conf('urlAppend') . '/index.php';
        if (get_conf('claro_CasGlobalLogout')) {
            if (phpCAS::checkAuthentication()) {
                phpCAS::logoutWithUrl($logout_url);
            }
        } else {
            claro_redirect($logout_url);
            die;
        }
    } elseif (basename($_SERVER['SCRIPT_NAME']) == 'login.php') {
        // set the call back url
        if (isset($_REQUEST['sourceUrl'])) {
            $casCallBackUrl = base64_decode($_REQUEST['sourceUrl']);
        } else {
            $casCallBackUrl = (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . get_conf('urlAppend') . '/';
        }
        $casCallBackUrl .= (strstr($casCallBackUrl, '?') ? '&' : '?') . 'fromCasServer=true';
        if ($_SESSION['_cid']) {
            $casCallBackUrl .= (strstr($casCallBackUrl, '?') ? '&' : '?') . 'cidReq=' . urlencode($_SESSION['_cid']);
開發者ID:rhertzog,項目名稱:lcs,代碼行數:31,代碼來源:casProcess.inc.php


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