update go-chi/jwtauth to v4

This commit is contained in:
dhax 2020-03-03 21:35:02 +01:00
parent 81ddc99f80
commit b20e15625b
7 changed files with 66 additions and 41 deletions

View file

@ -3,7 +3,6 @@ package jwt
import (
"time"
"github.com/go-chi/jwtauth"
"github.com/go-pg/pg/orm"
)
@ -37,9 +36,9 @@ 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{
"id": t.ID,
"token": t.Token,
func (t *Token) Claims() RefreshClaims {
return RefreshClaims{
ID: t.ID,
Token: t.Token,
}
}