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 profile show) and so the two files can be handled differently (e.g. excluded from dotfile backups/sync).

Re-exportsΒ§

use haste_fhir_model::r4::generated::terminology::IssueType; πŸ”’
use haste_fhir_operation_error::OperationOutcomeError; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Serialize; πŸ”’
use serde::Serialize; πŸ”’
use std::collections::HashMap; πŸ”’
use std::path::PathBuf; πŸ”’

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 πŸ”’