fix jwt auth

This commit is contained in:
Kochan 2018-11-26 21:09:42 +01:00
parent 9b27282ee3
commit 1b261b983c
5 changed files with 23 additions and 22 deletions

View file

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