AuthorizationProvider

Supplies (and refreshes) the authorization applied to requests that don't carry their own. Mirrors SwiftyNetwork's AuthorizationProvider.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun currentAuthorization(): AuthorizationType

The authorization to attach to the next request.

Link copied to clipboard
abstract suspend fun refreshAuthorizationIfNeeded(): Boolean

Attempts to refresh the credential after a 401. Returns true if a fresh credential is now available (and the request should be retried), false otherwise.