Documentation ¶
Index ¶
Constants ¶
View Source
const ( RoleAdmin = "ADMIN" RoleUser = "USER" )
These are the expected values for Claims.Roles.
Variables ¶
This section is empty.
Functions ¶
func IsAdmin ¶
IsAdmin checks if the session contained in the context, if any, belongs to an administrator. Returns false if no session is found or if the user is not an administrator.
Types ¶
Click to show internal directories.
Click to hide internal directories.