Short-lived OAuth loopback receivers. They carry only a callback, never tokens.
listen! binds a numeric loopback address, validates the exact destination and
state before accepting ONE response, and closes on completion, stop or expiry.
The browser response waits up to oauth-page/outcome-wait-ms for the verdict
that the caller gives to stop!; without one it shows a receipt, not success.
No request values are reflected into HTML or logged. Shared by provider and MCP auth.
Short-lived OAuth loopback receivers. They carry only a callback, never tokens. `listen!` binds a numeric loopback address, validates the exact destination and state before accepting ONE response, and closes on completion, stop or expiry. The browser response waits up to `oauth-page/outcome-wait-ms` for the verdict that the caller gives to `stop!`; without one it shows a receipt, not success. No request values are reflected into HTML or logged. Shared by provider and MCP auth.
(listen! redirect-uri expected-state ttl-ms)Listen for one callback for at most ttl-ms (1..900000). Returns
{:redirect-uri :result :stop!}; result yields the validated URL, :expired or
:cancelled. (stop! verdict) shows the verdict {:ok? true :label} or
{:ok? false :message} to a browser that waits; (stop!) shows a receipt. Port 0 requests an ephemeral port (MCP); fixed provider ports and
paths are preserved. Only http://localhost or http://127.0.0.1 is accepted.
A bind failure propagates; the caller must explicitly offer another transport.
Listen for one callback for at most `ttl-ms` (1..900000). Returns
{:redirect-uri :result :stop!}; result yields the validated URL, :expired or
:cancelled. `(stop! verdict)` shows the verdict `{:ok? true :label}` or
`{:ok? false :message}` to a browser that waits; `(stop!)` shows a receipt. Port 0 requests an ephemeral port (MCP); fixed provider ports and
paths are preserved. Only http://localhost or http://127.0.0.1 is accepted.
A bind failure propagates; the caller must explicitly offer another transport.(query raw)Decode a bounded OAuth query. Duplicate keys are refused, not silently overwritten.
Decode a bounded OAuth query. Duplicate keys are refused, not silently overwritten.
(response-uri? redirect-uri expected-state input)True only for an exact OAuth redirect URI with a matching state and code OR error. Neither a bare code nor a URL from another destination is an automatic callback.
True only for an exact OAuth redirect URI with a matching state and code OR error. Neither a bare code nor a URL from another destination is an automatic callback.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |