[−][src]Function mojang_api::client_auth
pub async fn client_auth<'_, '_>(
access_token: &'_ str,
uuid: Uuid,
server_hash: &'_ str
) -> Result<()>
Performs client-side authentication with the given access token and server hash.
The access token can be obtained using client_login
;
the server hash can be computed with server_hash
.
This API endpoint returns no response. If all goes well, then no error will be returned, and the client can proceed with the login process.
Examples
let login = mojang_api::client_login("username", "password").await?; let server_hash = mojang_api::server_hash("", [0u8; 16], &[1]); mojang_api::client_auth(&login.access_token, login.profile.uuid, &server_hash);