Skip to main content

Module credentials

Module credentials 

Source
Expand description

Global credential store for Heddle authentication.

Manages ~/.heddle/credentials.toml for persistent server credentials.

Structs§

CredentialDefaults
Default settings for credential resolution.
CredentialStore
Top-level credential store.
ServerCredential
Credential for a single Heddle server.

Functions§

credentials_path
Path to the global credentials file: <heddle_home>/credentials.toml.
default_server
Resolve the default server from the credential store.
get_server_credential
Look up a credential by server hostname.
load_credentials
Load the credential store from disk. Returns an empty store if the file does not exist.
lock_test_env
remove_server_credential
Remove the credential for a server.
resolve_credential_for_server
Resolve a credential for a server key, trying common key variations.
save_credentials
Write the credential store to disk, creating the parent directory if needed.
store_server_credential
Insert or update a credential for the given server. Also sets the default server if none is configured.
token_needs_rotation
Returns true if the credential’s stored expiry is within the next [ROTATION_WINDOW_SECS] seconds.