Expand description
HMAC-SHA256 bearer-token issuer.
agent pair start builds a JSON TokenClaims blob, signs it with
the secret in ~/.nexo/secret/pairing.key, and ships
b64u(claims) + "." + b64u(sig) to the companion. The companion
presents this as a Bearer token to the daemon’s gateway, which
verifies HMAC + expiry.
Structs§
Functions§
- decode_
setup_ code - Inverse of
encode_setup_codefor the companion side. - encode_
setup_ code - Encoded form:
b64url(JSON({url, bootstrap_token, expires_at})). QR-friendly: short, URL-safe, no padding. - token_
device_ label - Convenience: reads the
device_labelfrom an unverified token payload. Used by the companion to label the persisted session file without needing the HMAC secret (the daemon verifies the signature on its side). - token_
expires_ at - Convenience: returns the
expires_atas a UTC timestamp.