Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiLimiter = limiter.New(limiter.Config{ Max: 750, Expiration: 30 * time.Second, KeyGenerator: func(c *fiber.Ctx) string { return c.Get(fiber.HeaderXForwardedFor) }, LimitReached: func(c *fiber.Ctx) error { return utils.NewError(http.StatusTooManyRequests, utils.WhereAmI(), http.StatusText(http.StatusTooManyRequests)) }, })
Functions ¶
func ExtractBearerToken ¶
func ExtractLevel ¶
func ExtractSocketToken ¶
Types ¶
type RouterResources ¶
type RouterResources struct {
JwtKeyfunc jwt.Keyfunc
}
RouterResources DB handler
func NewRouterResources ¶
func NewRouterResources(jwtKeyfunc jwt.Keyfunc) *RouterResources
NewRouterResources returns a new DBHandler
func (*RouterResources) ReqAuthHandler ¶
func (r *RouterResources) ReqAuthHandler(reqLevels ...int) fiber.Handler
ReqLineAuthHandler check session
Click to show internal directories.
Click to hide internal directories.