mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-19 22:52:32 +00:00
c8aad8bdfe
azalea@0.8.0 azalea-auth@0.8.0 azalea-block@0.8.0 azalea-block-macros@0.8.0 azalea-brigadier@0.8.0 azalea-buf@0.8.0 azalea-buf-macros@0.8.0 azalea-chat@0.8.0 azalea-client@0.8.0 azalea-core@0.8.0 azalea-crypto@0.8.0 azalea-entity@0.8.0 azalea-inventory@0.8.0 azalea-inventory-macros@0.8.0 azalea-language@0.8.0 azalea-nbt@0.8.0 azalea-physics@0.8.0 azalea-protocol@0.8.0 azalea-protocol-macros@0.8.0 azalea-registry@0.8.0 azalea-registry-macros@0.8.0 azalea-world@0.8.0 Generated by cargo-workspaces |
||
---|---|---|
.. | ||
examples | ||
src | ||
Cargo.toml | ||
README.md |
Azalea Auth
A port of Mojang's Authlib and launcher authentication.
Examples
use std::path::PathBuf;
#[tokio::main]
async fn main() {
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:?}");
}
Thanks to wiki.vg contributors, Overhash, and prismarine-auth contributors.