Commit 40d953a3 authored by Quxl's avatar Quxl

x

parent 3467e4c3
...@@ -25,11 +25,13 @@ public class MemberLoginInterceptor extends HandlerInterceptorAdapter { ...@@ -25,11 +25,13 @@ public class MemberLoginInterceptor extends HandlerInterceptorAdapter {
} else { } else {
String sessionid = null; String sessionid = null;
Cookie[] cookies = req.getCookies(); Cookie[] cookies = req.getCookies();
if(cookies != null) {
for(Cookie cookie : cookies) { for(Cookie cookie : cookies) {
if(cookie.getName().equals(MemberTokenService.LOGINID_COOKIE_NAME)) { if(cookie.getName().equals(MemberTokenService.LOGINID_COOKIE_NAME)) {
sessionid = cookie.getValue(); sessionid = cookie.getValue();
} }
} }
}
if(sessionid != null && tokenService.isLoginByToken(sessionid)) { if(sessionid != null && tokenService.isLoginByToken(sessionid)) {
tokenService.doLog(req); tokenService.doLog(req);
return super.preHandle(req, resp, handler); return super.preHandle(req, resp, handler);
......
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