Skip to content

v1.1.0 - new jwt dependency

Compare
Choose a tag to compare
@pkieltyka pkieltyka released this 12 Dec 14:45
· 23 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.