Skip to content

Releases: go-chi/jwtauth

Update to jwt-go v3.x, improve the API

06 Jul 22:42
Compare
Choose a tag to compare

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)

See the latest godoc or the example.

Version compatible with jwt-go v2.x

06 Jul 21:15
Compare
Choose a tag to compare
v2.0.0

README: Add panic example when using wrong dependency