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

FirebaseJWTMiddleware
Vapor Version Swift 5.2 MIT License

Installation 📦

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

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

Usage 🚀

  1. Configure Project ID
app.firebaseJwt.applicationIdentifier = <YOUR_FIREBASE_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: 3

Dependencies

Used By

Total: 0

Releases

Vapor 4 - 2020-04-10 15:20:25

Fix for jwt-kit url - 2019-12-09 23:34:12

Optional email to support anonymous auth - 2019-11-09 23:27:26