|
@@ -130,7 +130,6 @@ public class JwtUtils {
|
|
* @return 返回是否校验通过
|
|
* @return 返回是否校验通过
|
|
* @throws UserNotLoginException
|
|
* @throws UserNotLoginException
|
|
*/
|
|
*/
|
|
- @Transactional
|
|
|
|
public boolean verifyToken() throws UserNotLoginException, UserDisableException {
|
|
public boolean verifyToken() throws UserNotLoginException, UserDisableException {
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
|
|
String token = request.getHeader("token");
|
|
String token = request.getHeader("token");
|
|
@@ -161,7 +160,7 @@ public class JwtUtils {
|
|
JWTVerifier verifier = JWT.require(algorithm)
|
|
JWTVerifier verifier = JWT.require(algorithm)
|
|
.withClaim(SESSION_ID_NAME, jwtId)
|
|
.withClaim(SESSION_ID_NAME, jwtId)
|
|
.withClaim(LOGIN_ID, user.getId())
|
|
.withClaim(LOGIN_ID, user.getId())
|
|
- .withClaim(USER_INFO, JSONUtil.toJsonStr(vo))
|
|
|
|
|
|
+// .withClaim(USER_INFO, JSONUtil.toJsonStr(vo))
|
|
.withClaim(UNIT_ID, user.getUnitId())
|
|
.withClaim(UNIT_ID, user.getUnitId())
|
|
.acceptExpiresAt(System.currentTimeMillis() + EXPIRE_TIME * 1000) //JWT 正确的配置续期姿势
|
|
.acceptExpiresAt(System.currentTimeMillis() + EXPIRE_TIME * 1000) //JWT 正确的配置续期姿势
|
|
.build();
|
|
.build();
|