Skip to main content

Module token_cache

Module token_cache 

Source
Expand description

On-disk token cache.

Path: ~/.cache/sharepoint/tokens.json (mode 0600). Keyed by <tenant_id>:<client_id>:<oid> so multiple accounts coexist. Atomic writes via tempfile-and-rename so a crashed write never corrupts the file or leaks the rotated refresh token alongside the previous one.

Structs§

Account
CacheEntry
TokenCache

Functions§

cache_key
load
remove
Remove one entry; no-op if absent.
save
upsert
Replace one entry atomically (load → mutate → save).