pub async fn fetch_certificates(
minecraft_access_token: &str,
) -> Result<Certificates, FetchCertificatesError>Expand description
Fetch the Mojang-provided key-pair for your player, which is used for cryptographically signing chat messages.
Examples found in repository?
azalea-auth/examples/certificates.rs (line 19)
4async fn main() {
5 env_logger::init();
6
7 let cache_file = PathBuf::from("example_cache.json");
8
9 let auth_result = azalea_auth::auth(
10 "[email protected]",
11 azalea_auth::AuthOpts {
12 cache_file: Some(cache_file),
13 ..Default::default()
14 },
15 )
16 .await
17 .unwrap();
18
19 let certs = azalea_auth::certs::fetch_certificates(&auth_result.access_token)
20 .await
21 .unwrap();
22
23 println!("{certs:?}");
24}