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
//! An open-source Firebase Admin SDK for Rust.
//!
//! `firebase-admin` currently implements Firebase **Authentication**
//! (verifying ID tokens, creating custom tokens, managing users, and
//! session cookies) and **Cloud Messaging** (sending FCM messages and
//! managing topic subscriptions). Support for additional Firebase services
//! (Firestore, Cloud Storage, ...) is planned; see `ARCHITECTURE.md` in the
//! repository root for the project's module and versioning conventions.
//!
//! # Example
//!
//! ```no_run
//! # async fn example() -> Result<(), firebase_admin::Error> {
//! use firebase_admin::auth::AuthClient;
//!
//! let auth = AuthClient::builder("my-project-id")
//! .service_account_key(firebase_admin::core::ServiceAccountKey::from_file(
//! "service-account.json",
//! )?)
//! .build()?;
//!
//! let claims = auth.verify_id_token("<id-token-from-client>").await?;
//! println!("verified uid: {}", claims.sub);
//! # Ok(())
//! # }
//! ```
pub use Error;
/// A `Result` alias using [`Error`] as its error type.
pub type Result<T> = Result;