Skip to content

Commit

Permalink
Revert encoding changes and keep decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
ajermaky committed Oct 31, 2021
1 parent 08b2b96 commit 5838617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion token.go
Expand Up @@ -104,7 +104,7 @@ func ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc, options
// Deprecated: In a future release, we will demote this function to a non-exported function, since it
// should only be used internally
func EncodeSegment(seg []byte) string {
return strings.TrimRight(base64.URLEncoding.EncodeToString(seg), "=")
return strings.TrimRight(base64.RawURLEncoding.EncodeToString(seg), "=")
}

// DecodeSegment decodes a JWT specific base64url encoding with padding stripped
Expand Down

0 comments on commit 5838617

Please sign in to comment.