def pre.new

cswap-bend-cli@0.1.0.0 · usage.bend:141

import cswap-bend-cli@0.1.0.0/usage.bend as Usage
import Base
import cswap-bend-cli@0.1.0.0/usage/cred.bend as UCred
import cswap-bend-cli@0.1.0.0/usage/gate.bend as UGate

141# Before the request: an expired token of an inactive account is refreshed. A
142# dead lineage or a deterministic refusal stops here; a transient failure goes
143# on with the old token. A refreshed token is a new token: the usage endpoint
144# first, even for a setup-token scope.
145def pre.new(gate: UGate.Gate, +new: String, +token: String, +active: Bool, +now: U32, +off: U32) -> IO(Fetched):
146  fetch.req(gate, new, UCred.oauth.of(new), Maybe.default(&2, String, UCred.access_token(UCred.oauth.of(new)), token), active, now, off, Some{new}, False{})

Uses (11)

Used by (1)