auth/token.go

15 lines
223 B
Go

package auth
import "github.com/golang-jwt/jwt/v5"
const (
RoleUnauthorized = ""
RoleUser = "user"
RoleAdmin = "admin"
)
type MicrofilmClaims struct {
Role string `json:"role"`
jwt.RegisteredClaims
}