Skip to content

v1.1.0 - new jwt dependency

Compare
Choose a tag to compare
@pkieltyka pkieltyka released this 12 Dec 14:45
· 22 commits to master since this release
b8af768

This release has a few breaking changes to the API as we're switching from the underlying jwt library github.com/dgrijalva/jwt-go to github.com/lestrrat-go/jwx. See #50 for further details + discussion.

Migration guide is pretty straight forward:

  1. Use jwt.Token instead of *jwt.Token
  2. Use tokenString from (*JWTAuth).Encode() instead of jwt.Raw
  3. Use map[string]interface{} instead of jwt.MapClaims{}
  4. Use jwtauth.New() instead of jwtauth.NewWithParser()

Please see _example and jwtauth_test.go for more details. As well to view more docs on the new jwt lib see https://github.com/lestrrat-go/jwx and https://github.com/lestrrat-go/jwx/blob/master/jwt/README.md


NOTE: https://github.com/golang-cz/jwtauth is a fork of this repository without the above breaking changes. It uses github.com/golang-jwt/jwt, a successor to github.com/dgrijalva/jwt-go pkg, instead of the new github.com/lestrrat-go/jwx dependency.