Expand description
Web channel lean-ctx cloud consent --web <id> (SPEC-ENGINE §3.8.2
“Web channel flow”, RESOLUTIONS R49, R61, R82).
- A pairing code (40 random bits, Crockford base32,
XXXX-XXXX) lives only in this process and on the terminal. - E35
POST /v1/consentscarries the stored subject (canonical, so a repeat is byte-identical) andcode_hash = hex(sha256(consent_id ‖ code)); a repeat replaces the code. - One line on stdout names the URL, the code and the request fingerprint the consent page shows too.
- The engine waits up to 10 min: a
consent.answeredframe seen by the relay (a marker file) or E35GETevery 2 s. - Only a Cloud-signed
leanctx.cloud.consent.v1statement for this request and the owner account is stored (proof = {statement}).
Structs§
- WebRun
- What
--webneeds from its surroundings; tests replace the clock and the sleep.
Enums§
- Polled
- An E35
GETanswer.
Constants§
- BROWSER_
TTL_ MS - The longest a browser-bound request waits (Cloud caps it at 15 min).
- CODE_
TTL_ MS - How long a pairing code and the wait last.
- POLL_
EVERY
Functions§
- answered_
marker - The marker the relay writes for a
consent.answeredframe. - browser_
body - The E35 create body of a request the person answers on a Cloud page
opened by an app (
consent_create.browser_binding.request.json): no pairing code; the page asks for the account’s second factor, or its password or a mailed link without one. - browser_
interval - The poll interval Cloud names (
interval_s), kept within 1–30 s. - code_
hash hex(sha256(consent_id ‖ code)),codeuppercase without the dash.- create_
body - The E35 create body. The subject is the stored one, so its canonical form is the same on every repeat (R82).
- device_
body - The E35 create body of a request bound to the device approval page
(C0 2.1
consent_create.device_binding.request.json): no pairing code. - display
XXXX-XXXX.- link
- The consent page with the pairing code in its fragment: the browser fills the code in, and a fragment never reaches a server or its logs.
- new_
code - 8 Crockford characters (40 random bits), uppercase, no dash.
- note_
answered - Record a
consent.answeredframe for a waiting--web(relay side). - output_
line - The stdout lines of step 3: the link to open (with the code in it) and
the code itself, for a browser on another device. The request
fingerprint stays on the page under “Details” and in
consent list. - parse_
state - withdraw_
relayed - Withdraw a relayed request that no longer needs an answer (C0 2.1
DELETE /v1/consents/{id}), so no page lists it as waiting. Best effort: a Cloud without the route or without the request ignores it.