resolveCredential abstract method

Future<Credential?> resolveCredential(
  1. HttpClient client,
  2. HttpError? lastError
)

Resolves the actual Credential for the HttpRequest. This method should cache the last resolved Credential and avoid unnecessary resolving procedures.

A lastError of a rejected credential (401) means the cached one is no longer valid: a resolvable (not static) Authorization resolves it again.

Implementation

Future<Credential?> resolveCredential(
  HttpClient client,
  HttpError? lastError,
);