forked from ebhomengo/niki
1
0
Fork 0
niki/service/auth/benefactor/claims.go

17 lines
309 B
Go
Raw Normal View History

package benefactorauthservice
import (
"git.gocasts.ir/ebhomengo/niki/entity"
"github.com/golang-jwt/jwt/v4"
)
type Claims struct {
jwt.RegisteredClaims
UserID uint `json:"user_id"`
Role entity.UserRole `json:"role"`
}
func (c Claims) Valid() error {
return c.RegisteredClaims.Valid()
}