Registry / web-framework / gofiber-jwt-v2

gofiber-jwt-v2

JSON →
library2.2.7gogounverified

JWT middleware for the Fiber web framework, providing authentication and authorization.

go get github.com/gofiber/jwt/v2
INSTALL
IMPORT
SIG · GOFIBER-JWT-V2
G
gofiber-jwt-v2
web-frameworkgov2.2.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

jwt
github.com/gofiber/jwt/v2

Protect routes with JWT middleware

package main import ( "github.com/gofiber/fiber/v2" jwtware "github.com/gofiber/jwt/v2" ) func main() { app := fiber.New() app.Use(jwtware.New(jwtware.Config{ SigningKey: []byte("secret"), })) app.Get("/protected", func(c *fiber.Ctx) error { return c.SendString("Protected") }) app.Listen(":3000") }
Debug
Known issues
breakingBreaking changes between v1 and v2: import path changed from /jwt to /jwt/v2
fix
Update import path to github.com/gofiber/jwt/v2
affects: >=2.0.0
Upgrade
Version history
2.2.7latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
gofiber-jwt-v2 — go get gofiber-jwt-v2 · libregistry