Skip to main content

Module oauth

Module oauth 

Source
Expand description

OAuth refresh-token grants, shared by unv oauth refresh and the desktop app’s “Refresh access token” (Phase 24.5). Pure over JSON: the HTTP call is the caller’s (the CLI’s blocking client, the app’s pinned remote_request), so there is exactly one reading of what an issuer’s answer means and one rule for what gets stored.

Structs§

Grant
What the token endpoint said, reduced to what is stored.

Functions§

apply_grant
Stores a grant on the entry. Returns whether the refresh token rotated.
parse_grant
refresh_host
The host a refresh would contact, for the confirmation prompt.
refresh_request
The request an oauth_client entry makes to refresh itself: the token_url and the form fields. Refuses plain http except to localhost, and an entry with no refresh token, before anything is sent.
set_var