fix: expired token error
This commit is contained in:
1 parent
fc209f64de
commit
c3bd1188aa
3 files changed
+15
-7
No files matched your search
+1
-1
@@ -71,7 +71,7 @@ func withUser(fn handleFunc) handleFunc {
|
||||
token, err := request.ParseFromRequest(r, &extractor{}, keyFunc, request.WithClaims(&tk))
|
||||
|
||||
if err != nil || !token.Valid {
|
||||
return http.StatusForbidden, nil
|
||||
return http.StatusUnauthorized, nil
|
||||
}
|
||||
|
||||
expired := !tk.VerifyExpiresAt(time.Now().Add(time.Hour).Unix(), true)
|
||||
|
||||
Reference in new issue
Block a user