Skip to main content

grant_json

Function grant_json 

Source
pub fn grant_json(grant: &TokenGrant, now_ms: i64) -> Value
Expand description

A grant as a GitHub-shaped token response, so the flow’s last step stores it like any other: the expiry in seconds from now, the numeric id and login, and the marker that the account is brokered. A grant already expired (or about to) is one second from now, never 0: the blob reads 0 as “doesn’t expire”, so it would never be refreshed.