mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-12-26 22:25:39 +08:00
Merge pull request #237 from BATTLEHAWK00/patch-1
增加parstToken未配置jwt密钥时的异常提示
This commit is contained in:
@@ -112,7 +112,9 @@ public class SaJwtUtil {
|
||||
* @return 解析后的jwt 对象
|
||||
*/
|
||||
public static JWT parseToken(String token, String keyt) {
|
||||
|
||||
// 秘钥不可以为空
|
||||
SaTokenException.throwByNull(keyt, "请配置jwt秘钥");
|
||||
|
||||
// 如果token为null
|
||||
if(token == null) {
|
||||
throw NotLoginException.newInstance(null, NotLoginException.NOT_TOKEN);
|
||||
|
||||
Reference in New Issue
Block a user