Expand description
Provider-generic seat identity resolution.
One entry point, resolve_seat, answers “which provider account does
this access token belong to?” so the login guard, the auth identify
backfill and the listing all key duplicate detection on the same value:
- OpenAI Codex — read off the JWT (
chatgpt_account_idclaim, email from the profile claim). No network. - Anthropic — tokens are opaque; one read-only
GETto the pinned profile endpoint (super::anthropic_profile). Seat =account.uuid. - Every other provider — no trustworthy identity is exposed;
SeatResolution::Unsupported.
Nothing here reads or writes auth.json, and no variant ever carries
token material. A failure is reported, never turned into a guess.
Structs§
- Resolved
Seat - Identity of the seat an access token belongs to.
account_idis the provider’s FULL account id (the value stored asaccountIdand hashed bysuper::seat_fingerprint);identityis a display-only label such as an email. Neither is a secret.
Enums§
- Seat
Resolution - Outcome of
resolve_seat.
Functions§
- identity_
http_ client - HTTP client with the policy identity lookups (and the token refresh that may precede them) require: no redirects, bounded connect/total timeouts.
- resolve_
seat - Resolve the seat behind
access_tokenforprovider.endpoint_overrideis a loopback-only test seam for the network-backed providers. - supports_
seat_ identity - True when
resolve_seatcan, in principle, returnSeatResolution::Resolvedforprovider. Used by listings to point at slots whose identity is still unverified.