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