Releases: go-chi/jwtauth
Releases · go-chi/jwtauth
Update to jwt-go v3.x, improve the API
Breaking release:
- Update to github.com/dgrijalva/jwt-go v3.x
- Update example code to use github.com/go-chi/chi v3.x
- API changes
- func (ja *JwtAuth) SetContext(ctx context.Context, t *jwt.Token, err error) context.Context
+ func NewContext(ctx context.Context, t *jwt.Token, err error) context.Context
- func (ja *JwtAuth) IsExpired(t *jwt.Token) bool
+ func IsExpired(t *jwt.Token) bool
- func (ja *JwtAuth) Verifier(next http.Handler) http.Handler
+ func Verifier(ja *JwtAuth) func(http.Handler) http.Handler
+ func FromContext(ctx context.Context) (*jwt.Token, Claims, error)
Version compatible with jwt-go v2.x
v2.0.0 README: Add panic example when using wrong dependency