| | |
| | | import com.xcong.excoin.common.system.bean.LoginUserBean; |
| | | import com.xcong.excoin.configurations.properties.ApplicationProperties; |
| | | import com.xcong.excoin.configurations.properties.SecurityProperties; |
| | | import com.xcong.excoin.modules.member.entity.MemberEntity; |
| | | import com.xcong.excoin.utils.RedisUtils; |
| | | import com.xcong.excoin.utils.SpringContextHolder; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | String loginStr = (String) redisUtils.get(redisKey); |
| | | if (StrUtil.isNotBlank(loginStr)) { |
| | | LoginUserBean loginUser = JSONObject.parseObject(loginStr, LoginUserBean.class); |
| | | Authentication authentication = new UsernamePasswordAuthenticationToken(loginUser.getMemberEntity(), token, new ArrayList<>()); |
| | | MemberEntity loginUser = JSONObject.parseObject(loginStr, MemberEntity.class); |
| | | Authentication authentication = new UsernamePasswordAuthenticationToken(loginUser, token, new ArrayList<>()); |
| | | SecurityContextHolder.getContext().setAuthentication(authentication); |
| | | redisUtils.expire(redisKey, 300000); |
| | | } else { |