Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettladley committed Feb 25, 2024
1 parent 7b02bb2 commit 8207f28
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions backend/src/middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/limiter"
"github.com/gofiber/fiber/v2/middleware/skip"
)

var paths = []string{
Expand All @@ -21,21 +20,6 @@ var paths = []string{
"/api/v1/auth/logout",
}

// Deprecated
func (m *AuthMiddlewareService) Skip(h fiber.Handler) fiber.Handler {
return skip.New(h, func(c *fiber.Ctx) bool {
claims, err := auth.From(c)
if err != nil {
_ = err.FiberError(c)
return false
}
if claims == nil {
return false
}
return claims.Role == string(models.Super)
})
}

func (m *AuthMiddlewareService) DisableAuth(h fiber.Handler) fiber.Handler {
return func(c *fiber.Ctx) error {
return h(c)
Expand Down

0 comments on commit 8207f28

Please sign in to comment.