Skip to content

Commit

Permalink
fix: verify issued-at in given token if present
Browse files Browse the repository at this point in the history
Pulls the validation in-line with the old library

Signed-off-by: evanebb <git@evanus.nl>
  • Loading branch information
evanebb committed Mar 5, 2025
1 parent acb07af commit 199148c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/api/bearer.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (a *BearerAuthorizer) Authorize(header string, requested *ResourceAction) e

token, err := jwt.ParseWithClaims(signedString, &ClaimsWithAccess{}, func(token *jwt.Token) (interface{}, error) {
return a.key, nil
}, jwt.WithValidMethods(a.allowedSigningAlgorithms()))
}, jwt.WithValidMethods(a.allowedSigningAlgorithms()), jwt.WithIssuedAt())
if err != nil {
return fmt.Errorf("%w: %w", zerr.ErrInvalidBearerToken, err)
}
Expand Down

0 comments on commit 199148c

Please sign in to comment.