2023-10-21 08:26:15 +00:00
|
|
|
package auth
|
|
|
|
|
|
|
|
import "github.com/golang-jwt/jwt/v5"
|
|
|
|
|
|
|
|
const (
|
2023-10-22 19:35:00 +00:00
|
|
|
RoleUnauthorized = ""
|
|
|
|
RoleUser = "user"
|
|
|
|
RoleAdmin = "admin"
|
2023-10-21 08:26:15 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type MicrofilmClaims struct {
|
|
|
|
Role string `json:"role"`
|
|
|
|
jwt.RegisteredClaims
|
|
|
|
}
|