forked from ebhomengo/niki
16 lines
234 B
Go
16 lines
234 B
Go
|
package auth
|
||
|
|
||
|
import (
|
||
|
"github.com/golang-jwt/jwt/v4"
|
||
|
)
|
||
|
|
||
|
type Claims struct {
|
||
|
jwt.RegisteredClaims
|
||
|
UserID uint `json:"user_id"`
|
||
|
Role string `json:"role"`
|
||
|
}
|
||
|
|
||
|
func (c Claims) Valid() error {
|
||
|
return c.RegisteredClaims.Valid()
|
||
|
}
|