atproto utils for zig zat.dev

oauth: add typed permissions and scope codec #38

Open zzstoatzz.io
Open opened by zzstoatzz.io

Add a typed codec and matcher for standard AT Protocol OAuth permissions. Client callers should be able to construct valid scope tokens from typed inputs. Server callers should be able to parse a token once and match its granular permission against a concrete operation.

  • Cover repo, blob, RPC, account and identity permissions, with typed representations for include references and OAuth profile and transition markers.
  • Use a single validation path for wire and constructed values. Preserve selector pairings, explicit wildcard bounds and read-only account defaults through canonical formatting.
  • Keep session grants, policy, Lexicon fetching and token rotation in the application. Review pure permission-set expansion separately.
  • Verify published examples and intentional differences against a pinned reference revision. Require independently modeled Hegel properties, replay and mutation-calibration evidence, allocation-failure coverage, and measured parser and matcher behavior. Apply Zig Zen to the public API and its ownership contract.

Inspired by Tranquil #690 and the AT Protocol permission specification.

Sign up or Sign in to add to the discussion.