Optionalopts: {Cancels all refresh timers (call on shutdown).
Removes tokens for key, optionally revoking them at the OP (RFC 7009).
Optionalopts: { revoke?: boolean } = {}Cached tokens (possibly expired) for key.
Returns a usable access token for key, refreshing first if it is expired or about to expire.
Optionalopts: { forceRefresh?: boolean }Returns the cached TokenSet for key, refreshing first if the access token is (nearly) expired. Use this rather than getAccessToken() when the token may be DPoP-bound: the caller needs its token_type to build the right Authorization header (OIDCClient.resourceHeaders()).
Optionalopts: { forceRefresh?: boolean } = {}Refreshes tokens for key now. Concurrent calls share a single request.
Schedules the proactive refresh of the tokens already stored for key.
Stops refreshing key's tokens in the background; they stay stored.
Caches TokenSets per key (typically a user session id) and keeps them fresh.
getAccessToken(key)always returns a token valid for at leastrefreshSkewSec, refreshing on demand.autoRefresh(default), a timer refreshes each tokenrefreshSkewSecbefore it expires.set(key, ts, { schedule: false })/unschedule(key)keep a key's tokens without refreshing them.Events: "refreshed" (key, tokenSet) — new tokens obtained via refresh_token "refresh_error" (key, error) — refresh failed (tokens are dropped if the grant is invalid) "expired" (key) — tokens for key could not be renewed and were removed "removed" (key) — tokens deleted via delete()