atproto_core/oauth/transport

The shared OAuth transport as an Effect: a form-encoded POST carrying a DPoP proof, with the mandatory nonce retry (first attempt no nonce, retry with the server’s DPoP-Nonce on use_dpop_nonce). dpop_nonce_challenge is the single, target-agnostic copy of the nonce-detection logic.

Values

pub fn dpop_nonce_challenge(
  resp: response.Response(String),
) -> option.Option(String)

The DPoP nonce a server is asking us to use, if it rejected the request with use_dpop_nonce. The authorization server (PAR/token) signals this in the JSON body; the PDS resource server signals it in the WWW-Authenticate header. Either way the nonce itself comes in the DPoP-Nonce header.

pub fn post_form_with_dpop(
  url: String,
  form: List(#(String, String)),
) -> effect.Effect(Result(response.Response(String), String))
Search Document