Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
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
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
553226d3
Commit
553226d3
authored
Jul 03, 2018
by
CHEN
Committed by
stylefeng
Jul 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
!42 你好,退出登录应该清空cookie
Merge pull request !42 from CHEN/guns-branch-for-pullrequest
parents
5af6e7b7
bfa38981
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/LoginController.java
+1
-0
guns-core/src/main/java/com/stylefeng/guns/core/base/controller/BaseController.java
+12
-0
No files found.
guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/LoginController.java
View file @
553226d3
...
...
@@ -128,6 +128,7 @@ public class LoginController extends BaseController {
public
String
logOut
()
{
LogManager
.
me
().
executeLog
(
LogTaskFactory
.
exitLog
(
ShiroKit
.
getUser
().
getId
(),
getIp
()));
ShiroKit
.
getSubject
().
logout
();
deleteAllCookie
();
return
REDIRECT
+
"/login"
;
}
}
guns-core/src/main/java/com/stylefeng/guns/core/base/controller/BaseController.java
View file @
553226d3
...
...
@@ -84,6 +84,18 @@ public class BaseController {
}
/**
* 删除所有cookie
*/
protected
void
deleteAllCookie
()
{
Cookie
[]
cookies
=
this
.
getHttpServletRequest
().
getCookies
();
for
(
Cookie
cookie
:
cookies
)
{
Cookie
temp
=
new
Cookie
(
cookie
.
getName
(),
""
);
temp
.
setMaxAge
(
0
);
this
.
getHttpServletResponse
().
addCookie
(
temp
);
}
}
/**
* 返回前台文件流
*
* @author fengshuonan
...
...
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