code: func TokenAuthWithConfig(config TokenAuthConfig) echo.MiddlewareFunc {
  	// Defaults
  	if config.Validator == nil {
  		panic("token-auth middleware requires validator function")
  	}
  
  	return func(next echo.HandlerFunc) echo.HandlerFunc {
  		return func(c echo.Context) error {
  			if config.Skipper(c) {
  				return next(c)
  			}
  
  			t := c.Request().Header.Get("Authorization")
  			if config.Validator(strings.TrimSpace(strings.Replace(t, "token", "", 1))) {
  				return next(c)
  			}
  			// Need to return `401` for browsers to pop-up login box.
  			c.Response().Header().Set(echo.HeaderWWWAuthenticate, t+" realm=Restricted")
  			return echo.ErrUnauthorized
  		}
  	}
  }
docs: // TokenAuthWithConfig returns an TokenAuth middleware with config.
  // See `TokenAuth()`.