func New(config ...Config) *CasbinMiddleware {
	var cfg Config
	if len(config) > 0 {
		cfg = config[0]
	}
	if cfg.Enforcer == nil {
		if cfg.ModelFilePath == "" {
			cfg.ModelFilePath = "./model.conf"
		}
		if cfg.PolicyAdapter == nil {
			cfg.PolicyAdapter = fileadapter.NewAdapter("./policy.csv")
		}
		enforcer, err := casbin.NewEnforcer(cfg.ModelFilePath, cfg.PolicyAdapter)
		if err != nil {
			log.Fatalf("Fiber: Casbin middleware error -> %v", err)
		}
		cfg.Enforcer = enforcer
	}
	if cfg.Lookup == nil {
		cfg.Lookup = func(c *fiber.Ctx) string { return "" }
	}
	if cfg.Unauthorized == nil {
		cfg.Unauthorized = func(c *fiber.Ctx) error {
			return c.SendStatus(fiber.StatusUnauthorized)
		}
	}
	if cfg.Forbidden == nil {
		cfg.Forbidden = func(c *fiber.Ctx) error {
			return c.SendStatus(fiber.StatusForbidden)
		}
	}
	return &CasbinMiddleware{
		config: cfg,
	}
}
New creates an authorization middleware for use in Fiber
package fibercasbin
import (
	"log"
	"strings"
	"github.com/casbin/casbin/v2"
	"github.com/casbin/casbin/v2/persist"
	fileadapter "github.com/casbin/casbin/v2/persist/file-adapter"
	"github.com/gofiber/fiber/v2"
)
type Config struct {
	ModelFilePath string
	PolicyAdapter persist.Adapter
	Enforcer *casbin.Enforcer
	Lookup func(*fiber.Ctx) string
	Unauthorized fiber.Handler
	Forbidden fiber.Handler
}
type CasbinMiddleware struct {
	config Config
}