Authentication & Authorization
Methods to put sign-in credentials
Cookies
Usually used when using a web browser to browse server pages.
| Key | Value | Description |
|---|---|---|
| authToken | a JWT token | A valid JWT token issued by the server. |
Headers
Usually used when accessing an API.
| Key | Value | Description |
|---|---|---|
| Authorization | Bearer <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:
| Key | Type | Description |
|---|---|---|
| token | string | The 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
| Key | Type | Description |
|---|---|---|
| playerName | string | The username used by the account in Minecraft |
| remember | boolean | Whether the token should be stored in the database or not |
Response
Content type: application/json
201
Body:
| Key | Type | Description |
|---|---|---|
| token | string | The client ID token generated (UUID usually) |