Add AT Protocol OAuth 2.0 with DPoP for CLI authentication
Replace password-based createSession with OAuth 2.0 + DPoP as the
default login flow. The CLI discovers the PDS authorization server,
performs a Pushed Authorization Request with DPoP proof, opens the
browser for user authorization, and exchanges the code for tokens
via a loopback redirect server.
Session is now a discriminated union (Legacy/OAuth) with dual auth
dispatch in the XRPC client. Legacy password auth remains available
via --legacy flag. Existing session.json files deserialize as Legacy
for backward compatibility.
Also: inject $type field into putRecord/createRecord calls (required
by newer PDS versions), make logout account argument optional when
only one account exists, and update documentation.
New deps: p256 (ES256 signing), urlencoding.
sans-self.org
1484cdb8
4b46ef58