ApiKeyStrategy class
Attaches a static API key to every request as an x-api-key header.
The key is a compile-time constant — never stored dynamically.
Individual requests opt out via noAuth: true.
@Deprecated — not yet implemented on the backend. Uncomment and configure once backend API key support is ready.
- Inheritance
-
- Object
- AuthStrategy
- ApiKeyStrategy
Constructors
- ApiKeyStrategy({required String apiKey})
-
const
Properties
Methods
-
apply(
RequestOptions options) → Future< void> -
Attach auth credentials to
optionsbefore the request is sent.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
Called when the API layer receives a 401.
Use to trigger token refresh or logout in your app provider.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited