Skip to main content

Module share

Module share 

Source
Expand description

The owner’s two share-link operations over the generated client (#622): register a link the issuing client published (POST /v1/shares), and revoke one (DELETE /v1/shares/{opaque_id}).

Orchestration only. The link and everything it serves are built in capsule-core: ShareLinkIssuer::create_link mints the opaque id, the fragment secret and the scope encapsulation, and Workspace::publish_link seals the share-metadata/v1 record into a SharePublication. This module maps the two onto the generated issue_share request, calls the generated operations through AuthenticatedClient (so the bearer, the pre-flight refresh and the one 401 replay are the SDK’s), and maps the generated typed refusals onto ShareError. Nothing here parses or serializes by hand.

The sealed metadata record travels in the same request, as metadata_blob: the server checks that it hashes to metadata_hash, stores it before it records the link, and keeps it from the collector for as long as the link is live (#653). So a link this module registers is servable as soon as issue returns, provided every covered ciphertext is already held.

The fragment secret never reaches this module’s requests: issue_request reads the opaque id, the publication and the expiry, and the URL is assembled locally by share_url.

Structs§

ShareClient
Registers and revokes the caller’s share links.

Enums§

ShareError
Why a share-link operation did not complete.

Functions§

issue_request
The POST /v1/shares body for link, from what Workspace::publish_link returned for it.
share_url
The URL a recipient opens: {origin}/s/{opaque_id}#{fragment}.