Skip to main content

Module lease_token

Module lease_token 

Source
Expand description

The lease token a streamed-browser host accepts: who may open this browser, signed by a key the host only holds the public half of.

lease1.....

.<expires, unix seconds>..

The signature is Ed25519 over everything before it (base64url, 86 characters). The address is the browser’s own, with dashes for dots. The host checks the signature against its public keys, the lease and workspace it was started for, the expiry, and that the token id was not used before: a token opens one connection.

Structs§

LeaseGate
What a host checks a token against.

Enums§

Refusal
Why a token was refused, in a word the host logs (never the token).

Constants§

MAX_LEN 🔒
PREFIX 🔒
SPKI_PREFIX 🔒
DER prefix of an Ed25519 public key in SubjectPublicKeyInfo form; the 32 key bytes follow.

Functions§

id_ok 🔒
parse_public_keys
The keys a host is given, {"<key id>": "<base64 of the SPKI DER>"}.