go-chi / jwtauth

JWT authentication middleware for Go HTTP services
MIT License
541 stars 91 forks source link

Allow users to retrieve JWT from a query and cookie with a specified name #88

Open JunNishimura opened 5 months ago

JunNishimura commented 5 months ago

Describe the feature or problem you’d like to solve

Currently, if the name of the query param or cookie is other than jwt, it is necessary to implement logic to obtain jwt from the query or cookie on the user side(that's a bit cumbersome).

TokenFromCookie function TokenFromQuery function

Proposed solution

Solve the above problem by providing a function that can retrieve jwt from a query or cookie with the name passed as an argument.

JunNishimura commented 5 months ago

@pkieltyka Hi, I submitted a PR(#89)! I would appreciate it if you could check it out.