Documentation ¶
Overview ¶
Package identity provides type that allows to authorize request
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Identity ¶
type Identity struct { Token string `json:"token"` Permission Permission `json:"permission"` UserID uuid.UUID `json:"user_id"` ClientID uuid.UUID `json:"client_id,omitempty"` ClientDomain string `json:"client_domain,omitempty"` }
Identity data to be encode in auth token
type Permission ¶
type Permission uint8
Flag type
const ( PermissionUserRead Permission = 1 << iota PermissionUserWrite PermissionClientWrite PermissionClientRead PermissionTokenRead )
Execution context flags
Click to show internal directories.
Click to hide internal directories.