mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
* a * try to do more work on auth signing (untested) * well auth works when i remove the d= so * auth stuff * sessionserver stuff * add auth in azalea-protocol/client * caching* refreshing microsoft auth tokens isn't implemented yet, also i haven't tested it * how did i not notice that i had the code duplicated * fix cache * add refreshing msa token * replace some printlns with log::trace * auth works! * Update main.rs * fix clippy warnings
19 lines
401 B
Rust
19 lines
401 B
Rust
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();
|
|
println!("{:?}", auth_result);
|
|
}
|