From 3de13b2acb65b3c315a92ca06cd9312981399f8f Mon Sep 17 00:00:00 2001 From: Matt Williams <77163963+slickwilli@users.noreply.github.com> Date: Fri, 18 Oct 2024 07:36:20 -1000 Subject: [PATCH] set token.Signature in ParseUnverified --- parser.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/parser.go b/parser.go index ecf99af..81352e9 100644 --- a/parser.go +++ b/parser.go @@ -193,6 +193,12 @@ func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Toke return token, parts, newError("signing method (alg) is unspecified", ErrTokenUnverifiable) } + // Set token signature + token.Signature, err = p.DecodeSegment(parts[2]) + if err != nil { + return token, newError("could not base64 decode signature", ErrTokenMalformed, err) + } + return token, parts, nil }