A middleware that will check that a JWT is sent on the request header (the header key is customizable) and will then set the content of the JWT into the context.
This module lets you authenticate HTTP requests using JWT tokens in your Go Programming Language applications.
- Ability to check the request header for a JWT.
- Decode the JWT and set the content of it to the request context.
- Generate the token string for login handler.
go get github.com/ntk148v/jwt-middleware
You can check out working examples in the examples folder for the basic usage.
This module is strong inspired by: