Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
s_ibanshou
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋林
s_ibanshou
Commits
cd5109e0
Commit
cd5109e0
authored
Jul 20, 2017
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释
parent
b497a76f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
cas.php
e/member/cas.php
+7
-1
No files found.
e/member/cas.php
View file @
cd5109e0
...
@@ -14,6 +14,9 @@ if (!in_array($mod, ['login', 'logout', 'synclogout', 'register', 'check'])) {
...
@@ -14,6 +14,9 @@ if (!in_array($mod, ['login', 'logout', 'synclogout', 'register', 'check'])) {
$ref_url
=
isset
(
$_GET
[
'ref_url'
])
?
$_GET
[
'ref_url'
]
:
$ecms_config
[
'site_url'
];
$ref_url
=
isset
(
$_GET
[
'ref_url'
])
?
$_GET
[
'ref_url'
]
:
$ecms_config
[
'site_url'
];
$cas
=
new
ClientCas
();
$cas
=
new
ClientCas
();
/**
* CAS 登录流程
*/
if
(
$mod
==
'login'
)
{
if
(
$mod
==
'login'
)
{
$phpcas
=
$cas
->
login
(
$ref_url
);
$phpcas
=
$cas
->
login
(
$ref_url
);
$ssoapi
=
new
ClientUser
();
$ssoapi
=
new
ClientUser
();
...
@@ -55,23 +58,26 @@ if ($mod == 'login') {
...
@@ -55,23 +58,26 @@ if ($mod == 'login') {
}
}
}
}
//CAS 系统退出, 目前已经没用, 都是用户中心退出
if
(
$mod
==
'logout'
)
{
if
(
$mod
==
'logout'
)
{
EmptyEcmsCookie
();
EmptyEcmsCookie
();
esetcookie
(
"mlcascheck"
,
""
,
0
);
esetcookie
(
"mlcascheck"
,
""
,
0
);
$cas
->
logout
(
$ref_url
);
$cas
->
logout
(
$ref_url
);
}
}
//CAS 注册地址
if
(
$mod
==
'register'
)
{
if
(
$mod
==
'register'
)
{
$url
=
$cas
->
register
(
$ref_url
);
$url
=
$cas
->
register
(
$ref_url
);
header
(
"Location:
$url
"
);
header
(
"Location:
$url
"
);
}
}
//CAS 同步退出地址
if
(
$mod
==
'synclogout'
)
{
if
(
$mod
==
'synclogout'
)
{
$cas
->
syncLogout
();
$cas
->
syncLogout
();
}
}
/**
/**
*
检查登录
*
CAS检查状态
*
*
* 页面加载调用(周期30秒), 周期过后再次调用
* 页面加载调用(周期30秒), 周期过后再次调用
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment