Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitJWT ¶
func InitJWT() *jwt.GinJWTMiddleware
func InstanceJWT ¶
func InstanceJWT() *jwt.GinJWTMiddleware
func SudoCheckToken ¶
SudoCheckToken checks if the `sudo` claim is present and less than 5 minutes ago
func SudoModeMiddleware ¶
func SudoModeMiddleware() gin.HandlerFunc
SudoModeMiddleware is used by general API endpoints to check for superuser token
func SudoUbusCallsMiddleware ¶
func SudoUbusCallsMiddleware() gin.HandlerFunc
SudoUbusCallsMiddleware is a middleware that checks if the ubus call requires sudo privileges This needs to parse the request body to check the path and method of the ubus call, then check if it's in the protectedPaths map
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.