Closed KendallWeihe closed 6 months ago
good idea @KendallWeihe ! i think we can have jwt.Parse
return a ParsedJWT
which is a struct that:
Header
Claims
and Signature
fieldsVerify()
receiver methodwe can also keep jwt.Verify as a conveniece which just calls internally Parse
and then parsedJWT.Verify()
.
q4u: does Parse
simply decode? or does it also check for things whether exp
has passed? i vote for decode in which case might make the most sense to call it jwt.Decode
@mistermoe yeah I agree with all of that. Started fleshing it out here earlier, but there are implications with the jws
package which relies on the string JWT... so I'm still thinking through how it'll fit together.
Originally from this PR
JWT
which includes both thejws.Header
andjwt.Claims
jwt.Verify()
Motivation
Rather than having the developer first do this...
...we may want to embed that in a function, as well as also executing a call to
jwt.Verify()
. I originally had the idea that we could create a function like this...