Expand description
OAuth device-code broker (RFC-041 Phase 3).
Implements the device-authorization grant (RFC 8628). Per H1, the
device_code is a polling bearer secret and never leaves the daemon —
the client receives only { handle, user_code, verification_url, expires_in }
and polls an opaque handle. The daemon owns the device_code in a
transient, auto-expiring in-memory map.
Provider HTTP clients are Rust impls of OAuthProvider (D9): TOML selects
which provider + scopes, Rust implements how. The first impl is GitHub.
GitHub device-flow tokens do not expire by default, so refresh is a no-op
for GitHub — the trait still supports expiring providers.
Structs§
- Device
Code - Device-authorization response from
start(). - Device
Code Response - What the client receives from
/oauth/start(nodevice_code). - GitHub
Provider - GitHub OAuth device-code provider.
- OAuth
Broker - The OAuth broker. Holds in-flight device-code flows in a transient,
auto-expiring map keyed by opaque handles.
device_codenever leaves here. - Poll
Response - What
/oauth/pollreturns — a simple client-facing status. The token data never leaves the daemon (it’s persisted internally by the broker).
Enums§
- Poll
Outcome - Outcome of polling a provider’s token endpoint.
Traits§
- OAuth
Provider - A Rust implementation of one OAuth provider’s device-code flow.