Skip to main content

Module secrets

Module secrets 

Source
Expand description

Storage for CLI secret material (OIDC client secrets, cached OAuth tokens).

Kept in its own file, separate from crate::cli::config, so that secrets never show up when a user inspects their config (e.g. haste-health config show-profile) and so the two files can be handled differently (e.g. excluded from dotfile backups/sync).

StructsΒ§

CliSecrets πŸ”’
All CLI secrets, keyed by profile name. Persisted separately from CliConfiguration.
ProfileSecrets πŸ”’
Secret material for a single profile.
StoredTokens πŸ”’
Cached OAuth tokens for a profile using the authorization_code flow, populated by haste-health login.

FunctionsΒ§

load_secrets πŸ”’
Loads the secrets file, creating an empty one on disk if it doesn’t exist yet.
read_existing_secrets πŸ”’
write_secrets πŸ”’