jwt-auth
jwt-auth copied to clipboard
Tokens in Context
It would be useful to have AuthToken, RefreshToken, X-Csrf-Token and expiration in the request.Context(). This is useful if you need to send tokens in request body or do something else with tokens
authTokenString := jwtauth.GetAuthTokenFromContext(r.Context())
refreshTokenString := jwtauth.GetRefreshTokenFromContext(r.Context())
csrfTokenString := jwtauth.GetCSRFTokenFromContext(r.Context())
// do stuffs with tokens
Agreed. I'll look into it.
Thanks