ErrorForwardingAuthenticator class
Authenticator that forwards authenticate calls with 400 errors to registered handlers
Any responses with 400 errors will have their details forwarded to registered handlers.
Handlers can be registered to receive these responses and reply with an updated request that can potentially satisfy the error. They can also return null if the error cannot be handled.
- Inheritance
-
- Object
- Authenticator
- ErrorForwardingAuthenticator
Constructors
Properties
- handlerCount → int
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- onAuthenticationFailed → AuthenticationCallback?
-
Optional callback called by ChopperClient when the outgoing
request from authenticate failed to authenticate.
no setterinherited
- onAuthenticationSuccessful → AuthenticationCallback?
-
Optional callback called by ChopperClient when the outgoing
request from authenticate was successful.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticate(
Request request, Response response, [Request? originalRequest]) → FutureOr< Request?> -
Returns a Request that includes credentials to satisfy
an authentication challenge received in
response, based on the incomingrequestor optionally, theoriginalRequest(which was not modified with any previous Interceptors).override -
dispose(
) → void - Clean-up the authenticator and dispose all handlers.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerHandler(
ErrorHandler handler) → bool - Register a callback which can handle errors.
-
toString(
) → String -
A string representation of this object.
inherited
-
unregisterHandler(
ErrorHandler handler) → bool - Unregister a handler that was previously set by registerHandler.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited