pub struct AuthStore {
pub cloud: Option<ApiKey>,
pub tokens: BTreeMap<String, String>,
pub expirations: BTreeMap<String, String>,
pub refresh_tokens: BTreeMap<String, String>,
}Expand description
Every credential torii knows about, in one struct. tokens is a
map rather than fixed fields so auth.toml can keep older or
newer entries without parser breakage when we add providers.
0.7.25 added expirations: optional ISO-8601 timestamps recorded
when a token was minted with a TTL. The expirations table is
purely advisory — torii doesn’t auto-rotate; auth doctor reads
the timestamps to warn the user when a token is close to expiring
and they should run torii auth rotate <provider>.
Fields§
§cloud: Option<ApiKey>§tokens: BTreeMap<String, String>§expirations: BTreeMap<String, String>§refresh_tokens: BTreeMap<String, String>0.7.39 — refresh tokens issued by OAuth device flow. Lets
resolve_token quietly mint a fresh access_token when one
is close to expiry, instead of forcing the user to re-run
auth oauth <provider>. Persisted under a [token_refresh]
table in auth.toml. Empty for providers that don’t issue
refresh tokens (GitHub OAuth Apps).