Expand description
Small secrets of a Mac app (the session token first of all: the bearer the product’s API gave at sign in, the same kind
the mobile apps hold), in the macOS Keychain — never a file, never the page’s storage. The page sees it as the
KeyValueStorage port of @krizaka/app-client, so the Mac apps use the same session store and API client as the
mobile ones. This module holds the rules every store follows, and an in-memory store for tests.
Structs§
- Checked
- The checked way to every store: what reaches the Keychain has passed
check_keyandcheck_value. - Memory
Secrets - A store in memory, for tests and previews.
Enums§
- Secret
Error - Why a secret could not be read, written or removed. A refused key or value is never repeated: the page may have put a secret in the wrong argument.
Constants§
- MAX_KEY
- The longest key.
- MAX_
VALUE - The largest value stored; a bearer or a piece of the discovery manifest is far shorter.
Traits§
- Secret
Store - Where the secrets are kept. One Keychain service per app (its bundle id), one account per key.
Functions§
- check_
key - A key is lowercase letters, digits,
.,-,_, at mostMAX_KEYcharacters (verikora.session). A refused key is not repeated in the error: the page may have put a secret in the wrong argument. - check_
value - A value is text of at most
MAX_VALUEbytes, without a NUL.