PtcRunner.Kernel.MCPOAuth.TokenClient (PtcRunner v0.14.0)

Copy Markdown View Source

One-shot authorization-code and refresh token endpoint client.

Requests are form encoded, carry the exact resource indicator, never retry, and return explicit dispatch provenance. Provider bodies and authentication response headers are projected to closed results before returning.

Summary

Types

provenance()

@type provenance() :: :not_dispatched | :possibly_dispatched

Functions

exchange_code(authority, binding, operation, opts)

@spec exchange_code(PtcRunner.Kernel.MCPOAuth.Authority.t(), map(), map(), keyword()) ::
  {:ok, map()} | {:error, atom(), provenance()}

refresh(authority, binding, grant, opts)

@spec refresh(PtcRunner.Kernel.MCPOAuth.Authority.t(), map(), map(), keyword()) ::
  {:ok, map()} | {:error, atom(), provenance()}