AuthenticationInterceptor class
Adds bearer credentials only to allowed origins and retries one eligible 401. Share its coordinator within one authenticated session; writes require opt-in.
- Implemented types
Constructors
-
AuthenticationInterceptor({required TokenRefreshCoordinator coordinator, required Set<
String> allowedOrigins, bool replayWrites = false})
Properties
-
allowedOrigins
→ Set<
String> -
final
- coordinator → TokenRefreshCoordinator
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- replayWrites → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
intercept(
HttpRequest request, CancellationToken token, HttpRequestHandler next) → Future< HttpResponse> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited