Update go-chi/jwtauth to v3.3 and remove dgrijalva from direct dependencies

This commit is contained in:
Alex Frank Adhyatma 2019-03-07 11:55:45 +00:00
parent 83b738e298
commit a2d51bbfd8
No known key found for this signature in database
GPG key ID: 3AE15EAFE5BAFD5E
7 changed files with 27 additions and 28 deletions

View file

@ -5,7 +5,7 @@ import (
"time"
"github.com/dhax/go-base/auth/jwt"
jwtgo "github.com/dgrijalva/jwt-go"
"github.com/go-chi/jwtauth"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/go-ozzo/ozzo-validation/is"
"github.com/go-pg/pg/orm"
@ -65,8 +65,8 @@ func (a *Account) CanLogin() bool {
}
// Claims returns the account's claims to be signed
func (a *Account) Claims() jwtgo.MapClaims {
return jwtgo.MapClaims{
func (a *Account) Claims() jwtauth.Claims {
return jwtauth.Claims{
"id": a.ID,
"sub": a.Name,
"roles": a.Roles,