[][src]Crate mojang_api

This crate implements a simple API for interfacing with the Mojang API.

Currently, only server-side authentication has been implemented, but more functions will be added in the near future.

Structs

ServerAuthProperty

A property, as returned by the session server during authentication. Typically, a "textures" property is received in the authentication response which contains base64-encoded JSON data. See wiki.vg for more information.

ServerAuthResponse

The session server's response to an authentication request.

Enums

AuthError

An error during authentication.

Functions

server_auth

Performs a server-side authentication request as documented at wiki.vg/Authentication. server_hash can be obtained by calling server_hash().

server_hash

Computes the "server hash" required for authentication based on the server ID, the shared secret, and the server's public RSA key. On modern Minecraft versions, the server ID is always an empty string.