Documentation
¶
Overview ¶
Package credential stores Overgent's secrets in the operating system's own credential store: the hosted device credential, and the local backend's instance secret and deployment secrets key (docs/security-privacy.md, "Local"). Every platform is reached through the same unexported put/get/remove trio, so callers never branch on GOOS.
There is deliberately no file-based or passphrase-encrypted fallback. When no OS store is reachable the platform implementation returns an *UnavailableError naming what is missing and what the member should do; it never degrades to writing a secret under the profile root.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("no credential is stored for this account")
ErrNotFound reports that the OS credential store was reachable but holds no item for the account. Callers that treat "no credential yet" as an ordinary state (first run, after a revoke) can test for it with errors.Is rather than matching error text.
The macOS implementation shells out to the Security CLI and cannot classify its exit status reliably, so it returns an unclassified error instead. Treat any error from Get as "no usable credential"; treat ErrNotFound as the stronger, positively identified case.
Functions ¶
Types ¶
type UnavailableError ¶ added in v0.1.1
UnavailableError reports that this machine exposes no usable OS credential store. It is deliberately distinct from an ordinary read or write failure: the remedy is to install or start a credential store, not to retry.
Reason and Remedy are written for a member reading a CLI error, and neither ever carries a secret value.
func (*UnavailableError) Error ¶ added in v0.1.1
func (e *UnavailableError) Error() string
func (*UnavailableError) Unwrap ¶ added in v0.1.1
func (e *UnavailableError) Unwrap() error