use minecraft_launcher_api::auth::*; use std::io::prelude::*; #[tokio::main] async fn main() -> Result<(), Box> { let mut email = String::new(); let mut password = String::new(); let stdin = std::io::stdin(); let mut stdout = std::io::stdout(); print!("Email> "); stdout.flush()?; stdin.read_line(&mut email)?; print!("Password> "); stdout.flush()?; stdin.read_line(&mut password)?; let options = AuthenticationOptions { username: email.trim(), password: password.trim(), client_token: None, request_user: true, }; let login = dbg!(login(&options).await.unwrap()); let _validate = dbg!(validate(&ValidateOptions::from_authentication(&login)) .await .unwrap()); let _refresh = dbg!(refresh(&RefreshOptions::from_authentication(&login)) .await .unwrap()); Ok(()) }