Expand description
Phase 39: Credential Management
Stores and retrieves API tokens for the package registry.
Credentials are stored in a TOML file at ~/.config/logos/credentials.toml
with restrictive permissions (0600 on Unix) to protect sensitive tokens.
§Token Resolution Order
When retrieving a token via get_token, the following order is used:
LOGOS_TOKENenvironment variable (highest priority)- Credentials file entry for the registry URL
§Security
- Tokens are stored in plaintext (like cargo, npm, etc.)
- File permissions are set to owner-only on Unix systems
- The
LOGOS_CREDENTIALS_PATHenv var can override the default location
Structs§
- Credentials
- Persistent storage for registry authentication tokens.
Enums§
- Credentials
Error - Errors that can occur when loading or saving credentials.
Functions§
- credentials_
path - Get the path to the credentials file
- get_
token - Get the token for a registry, checking env var first then credentials file