 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var ( // DefaultConfig is the default middleware config. DefaultConfig = MiddlewareConfig{ TokenKey: "token", Skipper: func(*fiber.Ctx) bool { return false }, } )
Functions ¶
func BearerAuth ¶
func InitServer ¶
InitServer Initialize the service
func RegisterRoute ¶
func RegisterRoute(app *fiber.App)
RegisterRoute register th OAuth routes to router
func TokenHandler ¶
func TokenHandler() fiber.Handler
TokenHandler gets the token from request using default config
func TokenHandlerWithConfig ¶
func TokenHandlerWithConfig(cfg *MiddlewareConfig) fiber.Handler
TokenHandlerWithConfig gets the token from request with given config
Types ¶
type MiddlewareConfig ¶
type MiddlewareConfig struct {
	// keys stored in the context
	TokenKey string
	// defines a function to skip middleware.Returning true skips processing
	// the middleware.
	Skipper func(*fiber.Ctx) bool
}
    Config for middleware
 Click to show internal directories. 
   Click to hide internal directories.