AuthInterceptor class
Interceptor that injects the Bearer token into every request.
Strategy:
- Before request: get a valid token.
- If request fails with unauthenticated: force-refresh and retry once.
- permissionDenied is NOT retried (valid token, missing role).
Constructors
- AuthInterceptor(AuthTokenProvider _tokenProvider, void _onAuthFailure())
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call<
I extends Object, O extends Object> (AnyFn< I, O> next) → AnyFn<I, O> -
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