FirebaseJWTMiddleware

1.0.0

Vapor 4 Middleware for verifying Firebase ID tokens
barisatamer/vapor-firebase-jwt-middleware

What's New

Vapor 4

2020-04-10T15:20:25Z

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", .branch("vapor4")),
        ],
        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

Description

  • Swift Tools 5.2.0
View More Packages from this Author

Dependencies

Last updated: Sat Nov 16 2024 01:02:09 GMT-1000 (Hawaii-Aleutian Standard Time)