|
|
|
@ -60,12 +60,18 @@ public class TokenService
|
|
|
|
|
String token = getToken(request);
|
|
|
|
|
if (StringUtils.isNotEmpty(token))
|
|
|
|
|
{
|
|
|
|
|
Claims claims = parseToken(token);
|
|
|
|
|
// 解析对应的权限以及用户信息
|
|
|
|
|
String uuid = (String) claims.get(Constants.LOGIN_USER_KEY);
|
|
|
|
|
String userKey = getTokenKey(uuid);
|
|
|
|
|
LoginUser user = redisCache.getCacheObject(userKey);
|
|
|
|
|
return user;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Claims claims = parseToken(token);
|
|
|
|
|
// 解析对应的权限以及用户信息
|
|
|
|
|
String uuid = (String) claims.get(Constants.LOGIN_USER_KEY);
|
|
|
|
|
String userKey = getTokenKey(uuid);
|
|
|
|
|
LoginUser user = redisCache.getCacheObject(userKey);
|
|
|
|
|
return user;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|