Authenticator class abstract
Handles authentication challenges raised by the ChopperClient.
Optionally, you can override either onAuthenticationSuccessful or onAuthenticationFailed in order to listen to when a particular authentication request succeeds or fails.
For example, you can use these in order to reset or mutate your instance's internal state for the purposes of keeping track of the number of retries made to authenticate a request.
Furthermore, you can use these callbacks to determine whether your authentication Request from authenticate actually succeeded or failed.
Constructors
Properties
- 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 setter
- onAuthenticationSuccessful → AuthenticationCallback?
-
Optional callback called by ChopperClient when the outgoing
request from authenticate was successful.
no setter
- 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 inresponse
, based on the incomingrequest
or optionally, theoriginalRequest
(which was not modified with any previous RequestInterceptors). -
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