本文整理汇总了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();
}
}
}
示例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;
}
示例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);
}
示例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']);