Documentation ¶
Index ¶
Constants ¶
View Source
const (
ROLE_ADMIN = "admin"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UserClaims ¶
type UserClaims struct { ID string `json:"id,omitempty"` Roles []string `json:"roles,omitempty"` jwt.StandardClaims }
UserClaims - Information a token enocodes
func ValidateToken ¶
func ValidateToken(tokenString string) (claims *UserClaims, valid bool, err error)
ValidateToken parses and validates the token string
Click to show internal directories.
Click to hide internal directories.