1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! # actix-firebase-auth
//!
//! This crate provides Firebase JWT verification for the `actix-web` framework,
//! using Google's public JWKs to validate ID tokens issued by Firebase Authentication.
//!
//! ## Example
//!
//! ```no_run
//! use actix_web::{web, App, HttpServer, HttpResponse, Responder};
//! use actix_firebase_auth::{FirebaseAuth, FirebaseUser, Result};
//!
//! #[actix_web::main]
//! async fn main() -> std::io::Result<()> {
//! let auth = FirebaseAuth::new("your-project-id").await.unwrap(); // Don't forget to handle this error
//!
//! HttpServer::new(move || {
//! App::new()
//! .app_data(web::Data::new(auth.clone()))
//! .route("/profile", web::get().to(get_profile))
//! })
//! .bind(("127.0.0.1", 8080))?
//! .run()
//! .await
//! }
//!
//! async fn get_profile(
//! auth: web::Data<FirebaseAuth>,
//! user: FirebaseUser,
//! ) -> HttpResponse {
//! HttpResponse::Ok().json(user)
//! }
//! ```
pub use *;
pub use *;
pub use *;