Skip to content

Commit 4929ce2

Browse files
committed
Fix flagged typos
1 parent 124ecad commit 4929ce2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

VERSION_HISTORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Backwards compatible API change that was missed in 2.0.0.
9797

9898
There were two major reasons for breaking backwards compatibility with this update. The first was a refactor required to expand the width of the RSA and HMAC-SHA signing implementations. There will likely be no required code changes to support this change.
9999

100-
The second update, while unfortunately requiring a small change in integration, is required to open up this library to other signing methods. Not all keys used for all signing methods have a single standard on-disk representation. Requiring `[]byte` as the type for all keys proved too limiting. Additionally, this implementation allows for pre-parsed tokens to be reused, which might matter in an application that parses a high volume of tokens with a small set of keys. Backwards compatibilty has been maintained for passing `[]byte` to the RSA signing methods, but they will also accept `*rsa.PublicKey` and `*rsa.PrivateKey`.
100+
The second update, while unfortunately requiring a small change in integration, is required to open up this library to other signing methods. Not all keys used for all signing methods have a single standard on-disk representation. Requiring `[]byte` as the type for all keys proved too limiting. Additionally, this implementation allows for pre-parsed tokens to be reused, which might matter in an application that parses a high volume of tokens with a small set of keys. Backwards compatibility has been maintained for passing `[]byte` to the RSA signing methods, but they will also accept `*rsa.PublicKey` and `*rsa.PrivateKey`.
101101

102102
It is likely the only integration change required here will be to change `func(t *jwt.Token) ([]byte, error)` to `func(t *jwt.Token) (interface{}, error)` when calling `Parse`.
103103

parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func splitToken(token string) ([]string, bool) {
216216
parts[1] = claims
217217
// One more cut to ensure the signature is the last part of the token and there are no more
218218
// delimiters. This avoids an issue where malicious input could contain additional delimiters
219-
// causing unecessary overhead parsing tokens.
219+
// causing unnecessary overhead parsing tokens.
220220
signature, _, unexpected := strings.Cut(remain, tokenDelimiter)
221221
if unexpected {
222222
return nil, false

0 commit comments

Comments
 (0)