Swiftpack.co - Package - barisatamer/vapor-firebase-jwt-middleware

FirebaseJWTMiddleware
Vapor Version Swift 5.0 MIT License

Installation 📦

To include it in your package, add the following to your Package.swift file.

let package = Package(
    name: "Project",
    dependencies: [
        ...
        .package(url: "https://github.com/barisatamer/vapor-firebase-jwt-middleware.git", from: "0.1.0"),
        ],
        targets: [
            .target(name: "App", dependencies: ["FirebaseJWTMiddleware", ... ])
        ]
    )

Usage 🚀

  1. Configure Project ID
FirebaseJWTMiddlewareConfig.configure(
    issuer: "https://securetoken.google.com/{PROJECT_ID}"
)
  1. Import header files
    import FirebaseJWTMiddleware
  1. Adding Middleware to a Routing Group
let group = router.grouped(FirebaseJWTMiddleware())
    group.get("welcome") { req in
    return "hello,world !"
}

References

Github

link
Stars: 0
Help us keep the lights on

Dependencies

Used By

Total: 0