Documentation
¶
Overview ¶
Package secrets stores credentials in the OS credential store (macOS Keychain, Windows Credential Manager, Secret Service on Linux) and falls back silently to a 0600 JSON file in the config dir when that store is unavailable, as on headless servers and in containers.
Keys in use: "api_token" (set with `audd config set token`), "login_api_token" (fetched by `audd login`), "oauth" (JSON of oauth.Tokens), "oauth_pending" (an unfinished login).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrKeyringDelete = errors.New("could not remove it from the system credential store")
ErrKeyringDelete means a secret is still in the system credential store because deleting it there failed (a locked keychain, a dismissed prompt). The file copy, if any, was deleted.
var ErrNotFound = errors.New("secret not found")
ErrNotFound is returned by Get when no value is stored.
Functions ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File stores secrets in a JSON file readable only by the user (0600).
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is an in-memory Store for tests.