def sent2

cswap-bend-cli@0.1.0.0 · daemon/view.bend:95

import cswap-bend-cli@0.1.0.0/daemon/view.bend as View
import Base
import cswap-bend-cli@0.1.0.0/usage/cred.bend as UCred
import cswap-bend-cli@0.1.0.0/policy/types.bend as T

95def sent2(+is_active: Bool, +has: Bool, +api: Bool, +creds: String, +now: U32) -> T.Sentinel:
96  match has api:
97    case False{} _:
98      T.OtherSentinel{}
99    case True{} True{}:
100      T.OtherSentinel{}
101    case True{} False{}:
102      sel_sn(is_active && UCred.expired(oauth_of(creds), now), T.TokenExpired{}, T.NoSentinel{})

Uses (8)

Used by (1)