Documentation
¶
Overview ¶
Package identity provides type that allows to authorize request
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NullIdentity = Identity{}
NullIdentity represents empty Identity
Functions ¶
Types ¶
type Identity ¶
type Identity struct { ID uuid.UUID `json:"id"` Token string `json:"token"` Email string `json:"email"` Roles Role `json:"roles"` }
Identity data to be encode in auth token
func FromContext ¶
FromContext returns the Identity value stored in ctx, if any.
func (Identity) RemoveRole ¶
RemoveRole removes role from identity
Click to show internal directories.
Click to hide internal directories.