Expand description
Protocol pieces behind the client: the device flow poll loop (RFC 8628), token exchange constants (RFC 8693) and the pushed authorization request body and answer (RFC 9126).
Nothing here puts a secret in an error: a device code, a token or a pushed request body is never echoed, and a malformed answer is reported by its kind only.
Structs§
- Cancel
Token - Stops a device flow: clone it, hand one copy to the poll and call
cancelon the other. - Device
Authorization - The answer to a device authorization request: show
user_codeandverification_urito the person. - Device
Poll Options - Test hooks and cancellation for the device poll.
- Pushed
Authorization - The answer to a pushed authorization request.
Constants§
- DEFAULT_
DEVICE_ INTERVAL_ SECONDS - DEVICE_
CODE_ GRANT - SLOW_
DOWN_ STEP_ SECONDS - TOKEN_
EXCHANGE_ GRANT - TOKEN_
TYPE_ ACCESS_ TOKEN - The only token type the service exchanges (
subject_token_type,actor_token_typeandrequested_token_type).
Functions§
- build_
authorization_ url_ from_ request_ uri - The authorize URL for a pushed request: only
client_idandrequest_uri(RFC 9126 section 4). - parse_
device_ authorization - Validate the service’s device authorization answer; the error never echoes it.
- parse_
pushed_ authorization - poll_
for_ device_ token - Poll until the person decides (RFC 8628 section 3.5).
- pushed_
request_ params - The authorize parameters of a pushed request, in order.
client_idis set again by client authentication.