Switch to github.com/lestrrat-go/jwx underlying jwt library (#52)

This commit is contained in:
Peter Kieltyka 2020-12-12 09:40:27 -05:00 committed by GitHub
parent 02fa0c511c
commit b8af768272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 200 additions and 148 deletions

View file

@ -62,7 +62,6 @@ import (
"fmt"
"net/http"
jwt "github.com/dgrijalva/jwt-go"
"github.com/go-chi/chi"
"github.com/go-chi/jwtauth"
)
@ -74,7 +73,7 @@ func init() {
// For debugging/example purposes, we generate and print
// a sample jwt token with claims `user_id:123` here:
_, tokenString, _ := tokenAuth.Encode(jwt.MapClaims{"user_id": 123})
_, tokenString, _ := tokenAuth.Encode(map[string]interface{}{"user_id": 123})
fmt.Printf("DEBUG: a sample jwt is %s\n\n", tokenString)
}