Expand description
Backend server authentication setup and token resolution. Backend server authentication setup and token resolution.
This module owns the precedence logic for assembling auth credentials
(CLI flags > environment variables > global config file) and the --init
orchestration that generates and persists tokens on first run.
Enums§
- Init
Auth Result - Outcome of
init_backend_auth.
Functions§
- global_
config_ display_ path - Return a display-friendly path to the global config file.
- init_
backend_ auth - Check for existing backend auth in the global config; if absent, generate new tokens and persist them.
- resolve_
admin_ tokens - Resolve admin tokens by merging CLI flags, the
ITO_BACKEND_ADMIN_TOKENenv var, and global config entries — in that precedence order. - resolve_
token_ seed - Resolve the HMAC token seed from CLI flag, the
ITO_BACKEND_TOKEN_SEEDenv var, or global config — returning the first non-empty value found. - write_
auth_ to_ global_ config - Write admin token and token seed into the global config file.