Skip to main content

Module protocol

Module protocol 

Source
Expand description

Requests and responses of the auth service, and what tokens say.

Structs§

AuthExport
The auth service’s part of a campaign, as exported and imported by the admin API: the campaign and its devices, with their certificates.
Campaign
A campaign: its id, name and edition.
CampaignSettings
What a campaign may keep and do, set by whoever runs the services through the admin API (a hosting’s plans, say), and carried in its tokens so every service applies them. By default, the services’ own.
Challenge
POST /login/challenge: what to sign to log in, valid for a minute.
ChallengeRequest
POST /login/challenge
Claims
What a token grants: who is calling, in which campaign, as what.
CreatedCampaign
POST /admin/campaigns: the campaign, and the one-time code its DM sets up their first device with.
Device
A device of a campaign: its certificate, and when it was added and revoked.
LoginProof
What a device signs to answer a challenge. Covers everything that identifies this login, so the signature is useless anywhere else.
LoginRequest
POST /login
NewCampaign
POST /admin/campaigns (the admin API): a campaign to create.
PairingMessage
A message relayed between the two sides of a pairing: PUT/GET /pairings/{slot}/{host|joiner}/{n}. Opaque to the server.
PairingSlot
POST /pairings (DM only): a slot for pairing a new device.
Quotas
How much a campaign may keep: each one set replaces the services’ limit of that name (see the hosting docs’ limits).
ServerKey
GET /public-key: the key tokens are signed with.
Session
POST /login: a token, and what it says.
SetupCode
POST /setup/lookup, and the admin API’s POST /admin/campaigns/{id}/setup-code
SetupRequest
POST /setup: the first DM device of a campaign, with the one-time code printed when the campaign was created.

Enums§

Principal
Who a token is for: a DM device, a player’s, or a service.