Skip to main content

Authentication & Authorization

Methods to put sign-in credentials​

Cookies​

Usually used when using a web browser to browse server pages.

KeyValueDescription
authTokena JWT tokenA valid JWT token issued by the server.

Headers​

Usually used when accessing an API.

KeyValueDescription
AuthorizationBearer <jwtToken>A valid JWT token issued by the server.

Sign-in to a Minecraft server with hNetwork installed​

Client join-in​

Client ID validation​

GET /api/auth/status​

Get sign-in status.

Authorization: Required

Content type: application/json

200​

The sign-in credentials are valid so far.

Body:

KeyTypeDescription
tokenstringThe JWT token mentioned above

POST /api/auth/request​

Request for a client ID token for a game to sign in to a Minecraft server with hNetwork loaded.

Authorization: Required

Content type: application/json

Request body schema​

KeyTypeDescription
playerNamestringThe username used by the account in Minecraft
rememberbooleanWhether the token should be stored in the database or not

Response​

Content type: application/json

201​

Body:

KeyTypeDescription
tokenstringThe client ID token generated (UUID usually)