Skip to main content

Module rest

Module rest 

Source
Expand description

reqwest wrapper: identity headers, the MAC signing hook, encrypted GET/POST, and error parsing.

Structsยง

RestClient ๐Ÿ”’
An HTTP client bound to a base URL, carrying the 1Password identity headers and an optional MAC signer. Requests are signed automatically once a signer is attached.

Constantsยง

CLIENT_HEADER ๐Ÿ”’
IV_SIZE ๐Ÿ”’
MAC_HEADER ๐Ÿ”’
OP_USER_AGENT_HEADER ๐Ÿ”’
SESSION_ID_HEADER ๐Ÿ”’
USER_AGENT_HEADER ๐Ÿ”’

Functionsยง

decrypt_response ๐Ÿ”’
Decrypts an opdata envelope and parses its JSON plaintext.
deserialize ๐Ÿ”’
insert_header ๐Ÿ”’
parse_server_error ๐Ÿ”’
Maps a 1Password error body to an OnePasswordError, or None when the body is not an error.