diff --git a/src/internal/app/middleware/jwt.go b/src/internal/app/middleware/jwt.go index 1c62921..b161942 100644 --- a/src/internal/app/middleware/jwt.go +++ b/src/internal/app/middleware/jwt.go @@ -4,20 +4,20 @@ import ( "os" "github.com/gofiber/fiber/v2" - jwtMiddleware "github.com/gofiber/jwt/v2" + jwt "github.com/gofiber/jwt/v2" ) // JWTProtected func for specify routes group with JWT authentication. // See: https://github.com/gofiber/jwt func JWTProtected() func(*fiber.Ctx) error { // Create config for JWT authentication middleware. - config := jwtMiddleware.Config{ + config := jwt.Config{ SigningKey: []byte(os.Getenv("JWT_SECRET_KEY")), ContextKey: "jwt", // used in private routes ErrorHandler: jwtError, } - return jwtMiddleware.New(config) + return jwt.New(config) } func jwtError(c *fiber.Ctx, err error) error {