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
43
44
45
46
47
48
49
50
51
//! # OpenFGA Rust SDK
//!
//! Async Rust client for [OpenFGA](https://openfga.dev) — the open-source
//! authorization system inspired by Google Zanzibar.
//!
//! ## Quick start
//!
//! ```no_run
//! use openfga::prelude::*;
//! use openfga::apis::{configuration::Configuration, stores_api};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let config = Configuration::builder()
//! .base_path("https://api.fga.example.com")
//! .bearer_token("my-token")
//! .build();
//!
//! let stores = stores_api::list_stores(&config, None, None, None).await?;
//! println!("{:?}", stores);
//! Ok(())
//! }
//! ```
//!
//! ## Auth methods
//!
//! Use [`configuration::ConfigurationBuilder`] to set exactly one auth method:
//!
//! | Method | Builder call |
//! |--------|-------------|
//! | Bearer token | `.bearer_token("…")` |
//! | OAuth2 token | `.oauth_token("…")` |
//! | Basic auth | `.basic_auth("user", Some("pass"))` |
//! | API key | `.api_key("key", Some("prefix"))` |
/// Re-exports of the most commonly used types.
///
/// `use openfga::prelude::*;` to bring [`Configuration`],
/// [`ConfigurationBuilder`], and [`Error`] into scope.