Module pairing
Structs§
- Held
Paired Tokens - The paired-token set held by
PairingGuard::hold_paired_tokens. - Pairing
Code Policy - The one pairing-code generation policy.
- Pairing
Guard - Pairing
Reservation - A successfully matched pairing code whose final token is not yet committed.
Enums§
- Generate
Pairing Code Error - Why a
generate_pairing_code_if_vacantcall failed. - Pairing
Code Charset - Character family a pairing code is drawn from.
- Pairing
Code Policy Error - Why a
PairingCodePolicyis not usable.
Constants§
- GATEWAY_
ADMIN_ TOKEN_ HEADER - Request header that carries the gateway admin secret on the pairing-code
admin routes (
/admin/paircode,/admin/paircode/new). - PAIRING_
CODE_ DEFAULT_ LENGTH - Default pairing-code length. See
PairingCodePolicyfor the rationale. - PAIRING_
CODE_ MAX_ LENGTH - Largest pairing-code length any configuration may select. Bounds the
terminal banner, the
X-Pairing-Codeheader, and dashboard input. - PAIRING_
CODE_ MIN_ LENGTH - Smallest pairing-code length any configuration may select.
- PAIRING_
CODE_ TTL - How long a freshly minted pairing code stays redeemable.
Functions§
- constant_
time_ eq - gateway_
admin_ token_ path - Where a gateway whose data directory is
data_dirkeeps its admin secret. - is_
public_ bind - Check if a host string represents a non-localhost bind address.
- read_
gateway_ admin_ token - Read the current admin secret, or
Nonewhen no gateway has written one or the caller cannot read it.