niki/service/auth/admin/claims.go

17 lines
306 B
Go

package adminauthservice
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.AdminRole `json:"role"`
}
func (c Claims) Valid() error {
return c.RegisteredClaims.Valid()
}