1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00
azalea/azalea-auth/examples/certificates.rs
mat 6188230009 add stuff related to chat signing
and also some stuff related to digging because i forgot to do a different branch lol
2023-05-26 15:18:04 -05:00

24 lines
511 B
Rust
Executable file

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:?}");
}