certificates/certificates.rs
1use std::path::PathBuf;
2
3#[tokio::main]
4async fn main() {
5 env_logger::init();
6
7 let cache_file = PathBuf::from("example_cache.json");
8
9 let auth_result = azalea_auth::auth(
10 "[email protected]",
11 azalea_auth::AuthOpts {
12 cache_file: Some(cache_file),
13 ..Default::default()
14 },
15 )
16 .await
17 .unwrap();
18
19 let certs = azalea_auth::certs::fetch_certificates(&auth_result.access_token)
20 .await
21 .unwrap();
22
23 println!("{certs:?}");
24}