This commit is contained in:
laodaming
2023-06-02 19:24:58 +08:00
parent 6c717ce30e
commit 92b29d8006
12 changed files with 609 additions and 17 deletions

View File

@@ -58,13 +58,13 @@ func CheckAuth(r *http.Request) UserInfo {
token = r.Header.Get("Auth-Key")
}
if token == "" {
logx.Debug("token is empty")
logx.Error("token is empty")
return UserInfo{}
}
//解析token
userInfo, err := ParseJwtToken(token)
if err != nil {
logx.Debug(err)
logx.Error(err)
return UserInfo{}
}
return userInfo