Commit 85474d5a authored by 蒋林's avatar 蒋林

cas 退出

parent 89a1b130
...@@ -17,8 +17,8 @@ $config = [ ...@@ -17,8 +17,8 @@ $config = [
'server_ca_cert_path' => '', 'server_ca_cert_path' => '',
'debug' => false, 'debug' => false,
'server_ip' => ['54.222.158.174'], 'server_ip' => ['54.222.158.174'],
'logs' => './data/log/phpcas.log', 'logs' => 'e/data/phpcas.log',
'uc_base_url' => 'http://pre.u.ibanshou.cn/', 'uc_base_url' => 'http://u.yunya.com/',
], ],
//产品 //产品
......
...@@ -17,7 +17,7 @@ $config = [ ...@@ -17,7 +17,7 @@ $config = [
'server_ca_cert_path' => '', 'server_ca_cert_path' => '',
'debug' => false, 'debug' => false,
'server_ip' => ['54.222.158.174'], 'server_ip' => ['54.222.158.174'],
'logs' => './data/log/phpcas.log', 'logs' => 'e/data/phpcas.log',
'uc_base_url' => 'http://u.test.yunyamooc.com/', 'uc_base_url' => 'http://u.test.yunyamooc.com/',
], ],
......
...@@ -15,10 +15,10 @@ $config = [ ...@@ -15,10 +15,10 @@ $config = [
'context' => '/cas', 'context' => '/cas',
'port' => 443, 'port' => 443,
'server_ca_cert_path' => '', 'server_ca_cert_path' => '',
'debug' => false, 'debug' => true,
'server_ip' => ['54.222.158.174'], 'server_ip' => ['54.222.158.174'],
'logs' => './data/log/phpcas.log', 'logs' => 'e/data/phpcas.log',
'uc_base_url' => 'http://pre.u.ibanshou.cn/', 'uc_base_url' => 'http://u.yunya.com/',
], ],
//产品 //产品
......
...@@ -145,7 +145,7 @@ class ClientCas ...@@ -145,7 +145,7 @@ class ClientCas
$selfurl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $selfurl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$url = $this->casLoginUrl($selfurl); $url = $this->casLoginUrl($selfurl);
header("Location: $url"); header("Location: $url");
} elseif ($iscas && $islogin === false) { } elseif ($iscas && $islogin == false) {
EmptyEcmsCookie(); EmptyEcmsCookie();
$selfurl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $selfurl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header("Location: $selfurl"); header("Location: $selfurl");
......
...@@ -80,7 +80,8 @@ if ($mod == 'check') { ...@@ -80,7 +80,8 @@ if ($mod == 'check') {
$url = $ecms_config['site_url'] . '/e/member/cas.php?mod=login&ref_url='.urlencode($ref_url); $url = $ecms_config['site_url'] . '/e/member/cas.php?mod=login&ref_url='.urlencode($ref_url);
header("Location: $url"); header("Location: $url");
} else { } else {
esetcookie("mlcascheck", 1, time() + 30); EmptyEcmsCookie();
esetcookie("mlcascheck", 1, time() + 20);
header("Location: $ref_url"); header("Location: $ref_url");
} }
} }
......
<?php
require("../../class/connect.php");
require("../class/user.php");
$cas = new ClientCas();
$islogin = $cas->checkAuth();
$iscas = getcvar('mlcas');
$ischeck = getcvar('mlcascheck');
$isjump = false;
if (!$ischeck) {
if (!$iscas && $islogin) {
$isjump = true;
} elseif ($iscas && $islogin == false) {
EmptyEcmsCookie();
esetcookie("mlcascheck", "", 0);
$isjump = true;
}
}
//var_dump($isjump);die();
?>
<?php if ($isjump) { ?>
location.href = "/e/member/cas.php?mod=check&ref_url=" + encodeURIComponent(window.location.href);
<?php } ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment