mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-17 16:36:49 +00:00
fix: expired token error
This commit is contained in:
parent
fc209f64de
commit
c3bd1188aa
3 changed files with 15 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue