Factory function that creates a backoff strategy for 401 retry delays.
The strategy determines the delay between retry attempts and when to stop retrying
(by returning NaN). Wrap with upto() to limit retry attempts.
Provider instance that supplies authorization credentials.
Called before each request to retrieve the current token. On 401 responses, the provider is called again before retry, allowing token refresh.
Configuration options for the withAuthorization middleware.
Remarks
This middleware handles automatic authorization header injection and retry on
401 Unauthorizedresponses. The TokenProvider interface allows integration with any authentication system (static tokens, JWT refresh, OAuth flows).See