-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Micah Parks
committed
Oct 31, 2022
1 parent
a939f14
commit a55209a
Showing
2 changed files
with
31 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ func (j *JWKS) Keyfunc(token *jwt.Token) (interface{}, error) { | |
return nil, fmt.Errorf("%w: could not convert kid in JWT header to string", ErrKID) | ||
} | ||
|
||
return j.getKey(kid) | ||
return j.getKey(kid, token) | ||
This comment has been minimized.
Sorry, something went wrong.
sermojohn
|
||
} | ||
|
||
// base64urlTrailingPadding removes trailing padding before decoding a string from base64url. Some non-RFC compliant | ||
|
The token header is controlled by the unauthenticated client, so this way the algorithm verification can be bypassed.
Enforcing algorithm verification can be controlled by the algorithm JWK attribute. When the JWK has an algorithm specified, the token should match always match the algorithm.