|
|
@ -59,6 +59,8 @@ public class TokenService
|
|
|
|
// 获取请求携带的令牌
|
|
|
|
// 获取请求携带的令牌
|
|
|
|
String token = getToken(request);
|
|
|
|
String token = getToken(request);
|
|
|
|
if (StringUtils.isNotEmpty(token))
|
|
|
|
if (StringUtils.isNotEmpty(token))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Claims claims = parseToken(token);
|
|
|
|
Claims claims = parseToken(token);
|
|
|
|
// 解析对应的权限以及用户信息
|
|
|
|
// 解析对应的权限以及用户信息
|
|
|
@ -67,6 +69,10 @@ public class TokenService
|
|
|
|
LoginUser user = redisCache.getCacheObject(userKey);
|
|
|
|
LoginUser user = redisCache.getCacheObject(userKey);
|
|
|
|
return user;
|
|
|
|
return user;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|