Skip to content

Commit

Permalink
feature: updated JWT verification to use it's own context (re-using t…
Browse files Browse the repository at this point in the history
…he context causes issues when using multiple security schemes)
  • Loading branch information
akeemphilbert committed Aug 29, 2024
1 parent 96f4594 commit 0ea0efb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (o *OpenIDConnect) Validate(ctxt echo.Context) (result *ValidationResult, e
})
authorizationHeader := ctxt.Request().Header.Get("Authorization")
tokenString := strings.Replace(authorizationHeader, "Bearer ", "", -1)
token, err := tokenVerifier.Verify(ctxt.Request().Context(), tokenString)
token, err := tokenVerifier.Verify(context.Background(), tokenString)
err = fmt.Errorf("invalid token '%s': %s. Headers '%s'", tokenString, err, ctxt.Request().Header)

var userID string
Expand Down

0 comments on commit 0ea0efb

Please sign in to comment.