mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
第三方token校验
This commit is contained in:
@@ -120,6 +120,15 @@ public class JWTUtils {
|
||||
return claims.getId();
|
||||
}
|
||||
|
||||
public static boolean checkThirdPartyToken(String token) {
|
||||
token = getToken(token);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_TOKEN_ERROR);
|
||||
}
|
||||
Claims claims = parseToken(token);
|
||||
return StringUtils.isNotBlank(claims.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换Bearer
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user