Skip to main content

Module pair

Module pair 

Source
Expand description

Pairing: signing in a device with no keyboard, such as a television.

The device opens /rest/koanPair, unauthenticated, and is held there with a pairing: an unguessable id for a link and a short code to read off the screen. Someone signed in approves it through /rest/koanPairApprove or the web UI’s /pair, and an API key made on their account goes down the waiting socket. Pairings live in memory only: one outlives neither its socket nor ten minutes, so a restart loses nothing a device cannot ask for again. See koan_core::remote::pair for the device’s side.

Structs§

Opened
A pairing open for a device, removed when this is dropped: when its socket closes, or the upgrade never happens.
PairInfo
What an approver is shown of a pairing before saying yes.
Pairings
Taken
A pairing taken out to be settled.

Enums§

OpenError
SettleError

Constants§

TTL
How long a pairing waits for someone to approve it.

Functions§

pairings
One set per process: the socket route, the Subsonic endpoints and the web UI all reach the same pairings.