Skip to content

Commit edf4019

Browse files
committed
Small changes
1 parent 25379bc commit edf4019

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

parser_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ func TestSetPadding(t *testing.T) {
494494
data.tokenString = signToken(data.claims, data.signingMethod)
495495

496496
}
497-
fmt.Println(data.tokenString)
498497

499498
// Parse the token
500499
var token *jwt.Token

token.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,13 @@ const (
1717
var decodePaddingAllowed uint64
1818

1919
// SetDecodePadding will switch the codec used for encoding/decoding JWTs respectively. Note that the JWS RFC7515
20-
// states that the tokens will utilize a Base64url encoding with no padding. Unfortuneately, some implementations
20+
// states that the tokens will utilize a Base64url encoding with no padding. Unfortunately, some implementations
2121
// of JWT are producing non-standard tokens, and thus require support for decoding. Note that this is a global
2222
// variable, and updating it will change the behavior on a package level.
2323
func SetDecodePadding(setPadding uint64) {
2424
atomic.SwapUint64(&decodePaddingAllowed, setPadding)
2525
}
2626

27-
func init() {
28-
SetDecodePadding(DisablePadding)
29-
}
30-
3127
// TimeFunc provides the current time when parsing token to validate "exp" claim (expiration time).
3228
// You can override it to use another time value. This is useful for testing or if your
3329
// server uses a different time zone than your tokens.

0 commit comments

Comments
 (0)