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

@ -3,7 +3,7 @@ package jwt
import (
"time"
"github.com/go-chi/jwtauth"
"github.com/dgrijalva/jwt-go"
"github.com/go-pg/pg/orm"
)
@ -37,8 +37,8 @@ func (t *Token) BeforeUpdate(db orm.DB) error {
}
// Claims returns the token claims to be signed
func (t *Token) Claims() jwtauth.Claims {
return jwtauth.Claims{
func (t *Token) Claims() jwt.MapClaims {
return jwt.MapClaims{
"id": t.ID,
"token": t.Token,
}