mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fix static
This commit is contained in:
parent
d4f16133de
commit
682429bc76
@ -9,6 +9,7 @@
|
||||
* 【core 】 增加LookupFactory和MethodHandleUtil(issue#I42TVY@Gitee)
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【jwt 】 修复JWTUtil中几个方法非static的问题(pr#386@Gitee)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -69,7 +69,7 @@ public class JWTUtil {
|
||||
* @param token token
|
||||
* @return {@link JWT}
|
||||
*/
|
||||
public JWT parseToken(String token) {
|
||||
public static JWT parseToken(String token) {
|
||||
return JWT.of(token);
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ public class JWTUtil {
|
||||
* @param key HS256(HmacSHA256)密钥
|
||||
* @return 是否有效
|
||||
*/
|
||||
public boolean verify(String token, byte[] key) {
|
||||
public static boolean verify(String token, byte[] key) {
|
||||
return JWT.of(token).setKey(key).verify();
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ public class JWTUtil {
|
||||
* @param signer 签名器
|
||||
* @return 是否有效
|
||||
*/
|
||||
public boolean verify(String token, JWTSigner signer) {
|
||||
public static boolean verify(String token, JWTSigner signer) {
|
||||
return JWT.of(token).verify(signer);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user