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.2"),
        ],
        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: 1
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

0.1.2 - Nov 9, 2019