AuthFailureNotifier class
A broadcast notifier that signals an authentication failure to the rest of the app.
AuthFailureInterceptor calls notify when a Dio request fails with an UnauthorizedException. Listeners — typically AuthRepository — subscribe to stream to force a logout and redirect to the login screen.
Must be disposed when the app is shutting down or the owner is destroyed. After dispose is called, further calls to notify are silently ignored.
See also:
- AuthFailureInterceptor, which calls notify on 401 errors.
Constructors
- AuthFailureNotifier()
- Creates an auth failure notifier.
Properties
Methods
-
dispose(
) → Future< void> - Closes the underlying stream controller and releases resources.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
) → void - Emits an authentication failure event to all current listeners.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited