TokenRefreshCoordinator

Coordinates token refresh operations using a single-flight pattern.

Multiple concurrent callers that detect a 401 will share the same refresh operation rather than each launching their own. A cooldown window prevents redundant refreshes when stale in-flight requests complete with 401 after the token has already been refreshed.

Parameters

client

the SudoUserClient used to obtain and refresh tokens

Constructors

Link copied to clipboard
constructor(client: SudoUserClient)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Perform a single-flight token refresh.