Expand description
Local status-api bearer token save path and prompts.
Constants§
- MIN_
API_ TOKEN_ HEX_ LEN - Minimum tip bearer length. Box install writes 64 hex chars; shorter leftovers (including unit-test junk) must never be treated as a real Status API token.
Functions§
- api_
token_ config_ path - finish_
save_ api_ token - Finish a save-token prompt given the raw answer (test seam).
- offer_
save_ api_ token - Propose saving the status-api bearer to
~/.config/horto-os-ui/api_token. - offer_
save_ api_ token_ with - Testable core of
offer_save_api_token(canned_answerskips stdin whenSome). - parse_
api_ token_ drop - Parse drop-file contents:
HORTO_API_TOKEN=<hex>or bare hex. - pull_
remote_ api_ token - Pull the box Status API bearer over SSH (sudo) and save the tip file.
- usable_
api_ token_ hex - Return trimmed hex when it is usable as a tip Status API bearer.
- write_
api_ token_ file - Write hex bearer to the local config path with mode
0o600.