| | |
| | | @Autowired |
| | | private ThirdAppDingtalkServiceImpl thirdAppDingtalkService; |
| | | |
| | | /**token有效时间,目前现场要求企业微信有效时间*/ |
| | | public static final long EXPIRE_TIME = 30L * 24 * 60 * 60 * 1000; |
| | | |
| | | @RequestMapping("/render/{source}") |
| | | public void render(@PathVariable("source") String source, HttpServletResponse response) throws IOException { |
| | | log.info("第三方登录进入render:" + source); |
| | |
| | | String token = JwtUtil.sign(user.getUsername(), user.getPassword()); |
| | | redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); |
| | | // 设置超时时间 |
| | | redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME * 2 / 1000); |
| | | redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, EXPIRE_TIME / 1000); |
| | | return token; |
| | | } |
| | | |