Skip to main content

Module pairing

Module pairing 

Structs§

HeldPairedTokens
The paired-token set held by PairingGuard::hold_paired_tokens.
PairingCodePolicy
The one pairing-code generation policy.
PairingGuard
PairingReservation
A successfully matched pairing code whose final token is not yet committed.

Enums§

GeneratePairingCodeError
Why a generate_pairing_code_if_vacant call failed.
PairingCodeCharset
Character family a pairing code is drawn from.
PairingCodePolicyError
Why a PairingCodePolicy is 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 PairingCodePolicy for the rationale.
PAIRING_CODE_MAX_LENGTH
Largest pairing-code length any configuration may select. Bounds the terminal banner, the X-Pairing-Code header, 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_dir keeps 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 None when no gateway has written one or the caller cannot read it.