The SSO client used for all token traffic.
The storage adapter backing this manager.
Build the SSO login URL. See EveSsoClient.getAuthorizationUrl.
Exchange an authorization code and store the resulting token under the character it belongs to. An existing token for that character is replaced; storage never holds two entries for one character.
Import tokens obtained elsewhere (a previous library version, another
tool, a migration). The character identity is decoded from the access
token; expiresIn is in seconds and defaults to the JWT exp claim.
Delete a character's token, optionally revoking it at SSO first.
The stored record for a character, or null.
Every stored token.
Every stored character without its secrets.
True when the stored token grants every listed scope.
Refresh a character's token through SSO regardless of expiry. Concurrent calls for the same character share one SSO request.
Refresh stored tokens with bounded concurrency. Per-character failures
never reject: each character gets its own RefreshResult. The one
rejection is a failing storage.list(), because with no records there
is no character to attribute the fault to and a silent empty run would
hide a broken store from a scheduler.
A TokenProvider bound to a character, for onTokenRefresh. Every
invocation refreshes through SSO (coalesced), because the client only
calls it after ESI has rejected the current token.
The character as an Identity for esi.as() on the shared
runtime (@lgriffin/esi.ts/client). Before each request the view gets
the stored token, refreshed first when it is stale; after a 401 it gets a
token refreshed through SSO. Nothing is looked up until a request needs
it, so an unknown character fails at the request, not here. The same
object comes back for the same character, so esi.as() memoises one
view per character rather than one per call.
An EsiClient whose access token and refresh provider are bound to the character. The token is validated (and refreshed if stale) first.
Since 11.0.0; removing it needs a future major release, and
none is scheduled. Each client this returns has its own rate limiter, error budget and cache. Build one
runtime with createEsi({ userAgent }) from @lgriffin/esi.ts/client and
call esi.as(this.identity(characterId)) for a per-character view over
it; esi.shutdown() replaces each client's shutdown(). See
guides/MULTI-CHARACTER.md, "Moving from EsiTokenManager.createClient".
Keeps one valid SSO token per character on top of a pluggable ITokenStorage, refreshing ahead of expiry, coalescing concurrent refreshes, persisting rotated refresh tokens, and recording revocations so SSO is not hammered with a dead refresh token.