Documentation
¶
Index ¶
- func GetCSRFToken(c *fiber.Ctx) string
- func GetUserID(c *fiber.Ctx) int
- func GetUserIsAdmin(c *fiber.Ctx) bool
- func GetUserName(c *fiber.Ctx) string
- func IsLoggedIn(userID int) bool
- func SetUserID(c *fiber.Ctx, userID int)
- func SetUserIsAdmin(c *fiber.Ctx, isAdmin bool)
- func SetUserName(c *fiber.Ctx, userName string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCSRFToken ¶
GetCSRFToken extracts the CSRF token from context (set by CSRF middleware) The middleware should set this for all requests, but if it's empty, the middleware may not be running or token generation failed
func GetUserIsAdmin ¶
func GetUserName ¶
func IsLoggedIn ¶
IsLoggedIn reports whether userID identifies an authenticated user.
func SetUserIsAdmin ¶
func SetUserName ¶
Types ¶
This section is empty.