I'm trying to generate a token with SigningMethodHS256 and pass it through the header to the client.
Then I verify the signature and token validity in a successive call to an endpoint, but I get signature is invalid error text, even if the error is not of the typejwt.ErrSignatureInvalid.
Here's the code, maybe there's some macroscopic error I cannot see.
Hi there,
I'm using your software with go1.13.7.
I'm trying to generate a token with
SigningMethodHS256
and pass it through the header to the client. Then I verify the signature and token validity in a successive call to an endpoint, but I getsignature is invalid
error text, even if the error is not of the typejwt.ErrSignatureInvalid
.Here's the code, maybe there's some macroscopic error I cannot see.
The
SetJWT
function is called after a traditional login with username and password.When I call the
Welcome
endpoint via Postman with an Authorization Bearer Token set to the token I get from theSetJWT
, I get the error:Many thanks in advance.