atproto/browser/oauth/resource
Async mirror of atproto/oauth/resource.gleam: wraps a Client so every
request to the session’s PDS carries Authorization: DPoP <token> and a
proof bound to its method, URL, and access-token hash, with the
server-nonce retry. Requests for any other origin fail with
TransportError.Other and nothing is sent. Token refresh is the caller’s
job (it owns session persistence); this module only signs.
A thin async wrapper over the shared effect kernel in
atproto_core/oauth/resource: it computes the access-token hash (ath)
once with WebCrypto and runs the per-request signing effect against the
base client.
Values
pub fn client(
base: xrpc.Client,
session session: session.VerifiedSession,
dpop_key dpop_key: dpop.DpopKey,
) -> promise.Promise(xrpc.Client)
A client that signs every request to the session’s PDS with its DPoP-bound access token.