Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶ added in v1.9.10
type Claims struct {
Username string `json:"username"`
Roles []string `json:"roles,omitempty"`
jwt.RegisteredClaims
// contains filtered or unexported fields
}
Claims represents the claims in a JWT token
type ClaimsWithRoles ¶
ClaimsWithRoles is an interface for any type that can check if it has a specific role
type RoleSet ¶ added in v1.9.10
type RoleSet map[string]struct{}
RoleSet represents a set of roles with O(1) membership checks
func NewRoleSet ¶ added in v1.9.10
NewRoleSet builds a RoleSet from a slice of roles, skipping empty strings
Click to show internal directories.
Click to hide internal directories.