1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00
azalea/azalea-auth
mat ad30950f85 Release independent packages
Generated by cargo-workspaces
2024-12-20 19:22:29 -06:00
..
examples Auth Customization Options (#159) 2024-08-11 16:54:45 -05:00
src Refactor azalea-protocol (#190) 2024-11-27 19:31:40 -06:00
Cargo.toml Release independent packages 2024-12-20 19:22:29 -06:00
README.md Use an ECS (#52) 2023-02-04 19:32:27 -06:00

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.