mirror of https://github.com/golang-jwt/jwt.git
set token.Signature in ParseUnverified
This commit is contained in:
parent
5ec246c074
commit
3de13b2acb
|
@ -193,6 +193,12 @@ func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Toke
|
||||||
return token, parts, newError("signing method (alg) is unspecified", ErrTokenUnverifiable)
|
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
|
return token, parts, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue