If you make sure you have those two handlers in that order, then the
answer is yes.
Another approach is to validate the JWT in the first handler, and put
the claims into the request context for the next handler, so the next
handler doesn't even deal with the JWT, and gets the claims from the
context. This assumes the second handler won't be called if JWT
doesn't validate.
>
> Best,
> Martin
>
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
golang-nuts...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/69d031e5-2a11-4904-84d6-1e67c0bc85a9%40googlegroups.com.