MutexRefresherClientAuthKeyProvider class
A RefresherClientAuthKeyProvider decorator that adds a mutex lock to
prevent concurrent refresh calls. Actual auth header getter and refresh
logic is delegated to the _delegate provider.
- Implemented types
Constructors
- MutexRefresherClientAuthKeyProvider(RefresherClientAuthKeyProvider _delegate)
- Creates a new MutexRefresherClientAuthKeyProvider.
Properties
-
authHeaderValue
→ Future<
String?> -
Retrieves the authentication header value, performing a refresh if needed.
The refreshAuthKey call ensure that the auth header value can be eagerly
refreshed to avoid failing requests due to expired tokens. Make sure to
implement a refreshAuthKey method on the delegate that first checks if
the token is expired and returning RefreshAuthKeyResult.skipped if not.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refreshAuthKey(
{bool force = false}) → Future< RefreshAuthKeyResult> -
Refreshes the authentication key with locking to prevent concurrent calls.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited