Expand description
Token pairs and their refresh over the token endpoint.
A refresh rotates the pair: the old access and refresh tokens stop working once the server has answered, so the caller must store the new pair before doing anything else with it.
The endpoint is queried with a single HTTP GET over the same TLS stack the connection uses;
the reply is a small JSON document.
Structs§
- Token
Pair - Access token together with the refresh token that renews it.
Functions§
- parse_
token_ response - Reads a token pair from the JSON document the token endpoint answers with.
- refresh_
over_ http - Exchanges a refresh token for a new pair at the token endpoint of the configuration.