Skip to content

Tokens in Context #15

@areYouLazy

Description

@areYouLazy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions