Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
member-api
Commits
473e3bc3
Commit
473e3bc3
authored
Dec 19, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
795e6ac5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
2 deletions
+4
-2
AdminTokenServiceImpl.java
...om/egolm/film/api/service/impl/AdminTokenServiceImpl.java
+1
-1
MemberTokenServiceImpl.java
...m/egolm/film/api/service/impl/MemberTokenServiceImpl.java
+1
-0
UserTokenServiceImpl.java
...com/egolm/film/api/service/impl/UserTokenServiceImpl.java
+1
-0
WebMvcConfig.java
src/main/java/com/egolm/film/config/WebMvcConfig.java
+1
-1
No files found.
src/main/java/com/egolm/film/api/service/impl/AdminTokenServiceImpl.java
View file @
473e3bc3
...
@@ -88,7 +88,7 @@ public class AdminTokenServiceImpl implements AdminTokenService {
...
@@ -88,7 +88,7 @@ public class AdminTokenServiceImpl implements AdminTokenService {
HttpSession
session
=
WebMvcConfig
.
getSession
();
HttpSession
session
=
WebMvcConfig
.
getSession
();
session
.
removeAttribute
(
TOKEN_NAME
);
session
.
removeAttribute
(
TOKEN_NAME
);
session
.
invalidate
();
session
.
invalidate
();
WebMvcConfig
.
getOrCreateUUIDCookie
(
LOGINID_COOKIE_NAME
,
"/"
,
60
*
60
*
24
*
5
,
true
);
WebMvcConfig
.
removeCookie
(
LOGINID_COOKIE_NAME
);
}
}
@Override
@Override
...
...
src/main/java/com/egolm/film/api/service/impl/MemberTokenServiceImpl.java
View file @
473e3bc3
...
@@ -87,6 +87,7 @@ public class MemberTokenServiceImpl implements MemberTokenService {
...
@@ -87,6 +87,7 @@ public class MemberTokenServiceImpl implements MemberTokenService {
HttpSession
session
=
WebMvcConfig
.
getSession
();
HttpSession
session
=
WebMvcConfig
.
getSession
();
session
.
removeAttribute
(
TOKEN_NAME
);
session
.
removeAttribute
(
TOKEN_NAME
);
session
.
invalidate
();
session
.
invalidate
();
WebMvcConfig
.
removeCookie
(
LOGINID_COOKIE_NAME
);
}
}
@Override
@Override
...
...
src/main/java/com/egolm/film/api/service/impl/UserTokenServiceImpl.java
View file @
473e3bc3
...
@@ -84,6 +84,7 @@ public class UserTokenServiceImpl implements UserTokenService {
...
@@ -84,6 +84,7 @@ public class UserTokenServiceImpl implements UserTokenService {
HttpSession
session
=
WebMvcConfig
.
getSession
();
HttpSession
session
=
WebMvcConfig
.
getSession
();
session
.
removeAttribute
(
TOKEN_NAME
);
session
.
removeAttribute
(
TOKEN_NAME
);
session
.
invalidate
();
session
.
invalidate
();
WebMvcConfig
.
removeCookie
(
LOGINID_COOKIE_NAME
);
}
}
@Override
@Override
...
...
src/main/java/com/egolm/film/config/WebMvcConfig.java
View file @
473e3bc3
...
@@ -119,7 +119,7 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
...
@@ -119,7 +119,7 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
return
cookie
;
return
cookie
;
}
}
public
static
void
removeCookie
(
String
name
,
String
path
)
{
public
static
void
removeCookie
(
String
name
)
{
HttpServletRequest
request
=
WebMvcConfig
.
getRequest
();
HttpServletRequest
request
=
WebMvcConfig
.
getRequest
();
HttpServletResponse
response
=
WebMvcConfig
.
getResponse
();
HttpServletResponse
response
=
WebMvcConfig
.
getResponse
();
if
(
request
!=
null
)
{
if
(
request
!=
null
)
{
...
...
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