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 sees a receipt, not a claim that token exchange has succeeded.
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 sees a receipt, not a claim that token exchange has succeeded. 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. 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. 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 |