Commit 3395b477 by manxiaoqiang

合同

parent a2922dc7
...@@ -48,7 +48,7 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter { ...@@ -48,7 +48,7 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
} }
//从header中得到token //从header中得到token
String token = request.getHeader(httpHeaderName); String token = request.getHeader(httpHeaderName);
token = StringUtil.isEmpty(token) ? getCookieToken(request.getCookies(), "TOKEN") : token; //token = StringUtil.isEmpty(token) ? getCookieToken(request.getCookies(), "TOKEN") : token;
token = token.substring(httpHeaderPrefix.length()); token = token.substring(httpHeaderPrefix.length());
//验证token //验证token
String key = manager.getKeyFromToken(token); String key = manager.getKeyFromToken(token);
...@@ -56,7 +56,6 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter { ...@@ -56,7 +56,6 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
boolean loginStatus = redisLoginStatusManager.getLoginStatusByKey(token); boolean loginStatus = redisLoginStatusManager.getLoginStatusByKey(token);
if (!StringUtil.isEmpty(key)) { if (!StringUtil.isEmpty(key)) {
String id = getCookieToken(request.getCookies(), "TOKEN");
User one = userRepository.findOne(Long.parseLong(key)); User one = userRepository.findOne(Long.parseLong(key));
User sessionAct = (User) request.getSession().getAttribute(Constant.CURRENT_ACCOUNT); User sessionAct = (User) request.getSession().getAttribute(Constant.CURRENT_ACCOUNT);
......
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