Skip to main content

Module client

Module client 

Source
Expand description

The entry point: log in, unlock the accountโ€™s keys, download its vaults.

Structsยง

Client
The 1Password client. Holds the injected HTTP transport so tests can point it at a mock host.
VaultInfo ๐Ÿ”’
A vault the account can open, with its attributes already decrypted.
VaultItemsDownload ๐Ÿ”’

Enumsยง

ItemDownload ๐Ÿ”’
MasterKey ๐Ÿ”’
Where the master key that unlocks the keysets comes from.
VaultDownload ๐Ÿ”’
VaultKey ๐Ÿ”’
VaultUnlock ๐Ÿ”’

Constantsยง

ACCOUNT_INFO_ENDPOINT ๐Ÿ”’
KEYSETS_ENDPOINT ๐Ÿ”’
MAX_OTP_ATTEMPTS ๐Ÿ”’
VAULT_ENDPOINT ๐Ÿ”’

Functionsยง

download_vault ๐Ÿ”’
Downloads one vault. A missing vault becomes a partial result; every other failure aborts.
download_vault_items ๐Ÿ”’
Pages through a vaultโ€™s items until batchComplete, parsing each supported item.
download_vaults ๐Ÿ”’
Unlocks the accountโ€™s keys and downloads every vault the session can open.
find_working_key ๐Ÿ”’
Finds a readable access entry whose vault key the keychain can already decrypt.
is_read_accessible ๐Ÿ”’
Whether an ACL grants read access.
parse_item ๐Ÿ”’
Decrypts both payloads. Missing keys and unsupported encryption are skippable; malformed data is an error.
skip_reason ๐Ÿ”’
Why envelope has to be skipped: its scheme is unsupported or its key is not in the keychain. None does not promise it decrypts.
unlock_account ๐Ÿ”’
Decrypts the account keysets and every accessible vault key.
unlock_vault ๐Ÿ”’
Decrypts a vaultโ€™s key and attributes. Missing keys and unsupported encryption are skippable; malformed data is an error.