| | |
| | | MemberEntity loginUser = JSONObject.parseObject(loginStr, MemberEntity.class); |
| | | Authentication authentication = new UsernamePasswordAuthenticationToken(loginUser, token, new ArrayList<>()); |
| | | SecurityContextHolder.getContext().setAuthentication(authentication); |
| | | redisUtils.expire(redisKey, 3600); |
| | | redisUtils.expire(redisKey, 36000); |
| | | } else { |
| | | log.info("token无法查询:{}", token); |
| | | SecurityContextHolder.clearContext(); |
| | |
| | | boolean isDebug = applicationProperties.isDebug(); |
| | | if (!isDebug) { |
| | | long currentTime = System.currentTimeMillis(); |
| | | return currentTime - time <= 10000; |
| | | return currentTime - time <= 30000; |
| | | } |
| | | return true; |
| | | } |