fix jwt auth
This commit is contained in:
parent
9b27282ee3
commit
1b261b983c
5 changed files with 23 additions and 22 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue