golang-jwt / jwt

Go implementation of JSON Web Tokens (JWT).
https://golang-jwt.github.io/jwt/
MIT License
6.98k stars 335 forks source link

Is it possible to parse JWT without verifying signature? #353

Closed theliuk closed 11 months ago

theliuk commented 11 months ago

I'd like to parse a JWT without verifying its signature. I tried

parser := jwt.NewParser(jwt.WithLeeway(leeway))
_, err := parser.ParseWithClaims(j, claims, nil)

but I get error with message token is unverifiable: no keyfunc was provided".

Is there a way to parse it without checking the signature?