Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg committed Nov 27, 2024
1 parent 187c5f1 commit 7c3804a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/authtoken/authtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func ExtractSignedPermissions(verifier jwt.Verifier, token string) ([]auth.Permi
if err := json.Unmarshal(tk.Claims(), p); err != nil {
return nil, err
}
if p.ExpiresAt.Before(time.Now().UTC()) {
if !p.ExpiresAt.IsZero() && p.ExpiresAt.Before(time.Now().UTC()) {
return nil, fmt.Errorf("token expired %s ago", time.Since(p.ExpiresAt))
}
return p.Allow, nil
Expand Down

0 comments on commit 7c3804a

Please sign in to comment.