Expand description
Keychain-backed credential resolver + legacy one-time importer.
The Keychain is the only durable credential authority under the
Foundation host. The KeychainCredentialResolver looks up a
profile’s { service, account } locator and returns either the
resolved value (typed) or a typed error. The Debug / Display
surface never reveals the value.
The legacy importer reads ~/.oxicode/auth.json, asks the user
for explicit acknowledgement, writes the Keychain entry, and
optionally archives the legacy file outside the active credential
path. It is the only code path that reads ~/.oxicode/auth.json
under the Foundation host.
Structs§
- InMemory
Keychain - In-memory Keychain backend for tests. The
Debugimpl masks stored values. - Keychain
Credential Resolver - Resolves profile credentials. The resolver is the only thing the rest of the code talks to.
- Legacy
Import Outcome - Result of a successful legacy import.
- Legacy
Importer - One-time legacy importer. Reads
~/.oxicode/auth.json, asks the user for acknowledgement, writes the Keychain entry, then (optionally) archives the legacy file outside the active credential path. - Mutex
Keychain - Mutable variant of the in-memory Keychain. Used for tests that
exercise the legacy importer. Clones share the same underlying
store via
Arc. - System
Keychain - Production implementation. Uses the
keyringcrate (v3) with per-platform native backends configured inCargo.toml.
Enums§
- Credential
- Result of resolving a credential locator. The
Debugimpl masks the secret value so the type can appear intracingandanyhow::Errorchains without leaking the resolved key material. - Credential
Error - Typed keychain error.
Displaycarries the locator (account name is public), not the value.
Traits§
- Keychain
Backend keyringcrate abstraction. Real production code uses thekeyringcrate; the trait is what the rest of the code depends on so tests can swap in a fake without touching the OS keychain.