From edf4019278ffa9ce90438a7bbb0b16a3b90ab9f6 Mon Sep 17 00:00:00 2001 From: Ara Jermakyan Date: Sun, 31 Oct 2021 11:49:41 -0700 Subject: [PATCH] Small changes --- parser_test.go | 1 - token.go | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/parser_test.go b/parser_test.go index 4b520f5c..4bdcbc8d 100644 --- a/parser_test.go +++ b/parser_test.go @@ -494,7 +494,6 @@ func TestSetPadding(t *testing.T) { data.tokenString = signToken(data.claims, data.signingMethod) } - fmt.Println(data.tokenString) // Parse the token var token *jwt.Token diff --git a/token.go b/token.go index fd343478..fbbcd059 100644 --- a/token.go +++ b/token.go @@ -17,17 +17,13 @@ const ( var decodePaddingAllowed uint64 // SetDecodePadding will switch the codec used for encoding/decoding JWTs respectively. Note that the JWS RFC7515 -// states that the tokens will utilize a Base64url encoding with no padding. Unfortuneately, some implementations +// states that the tokens will utilize a Base64url encoding with no padding. Unfortunately, some implementations // of JWT are producing non-standard tokens, and thus require support for decoding. Note that this is a global // variable, and updating it will change the behavior on a package level. func SetDecodePadding(setPadding uint64) { atomic.SwapUint64(&decodePaddingAllowed, setPadding) } -func init() { - SetDecodePadding(DisablePadding) -} - // TimeFunc provides the current time when parsing token to validate "exp" claim (expiration time). // You can override it to use another time value. This is useful for testing or if your // server uses a different time zone than your tokens.