AuthRest class abstract
handle token refresh api calls for harmony_auth.
Constructors
- AuthRest({required Dio dio, required String refreshUrl, required AuthChecker checker})
-
standard implementation.
constfactory
- AuthRest.accessOnly({required Dio dio, required String refreshUrl, required AuthChecker checker})
-
accessOnly implementation.
constfactory
-
AuthRest.general({required Dio dio, required AuthMatcher refreshTokensMatcher, required Future<
AuthToken> refresh(Dio dio, AuthToken token)}) -
general implementation.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- refreshTokensMatcher → AuthMatcher
-
matcher to check to see if this call is to refresh tokens.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refreshTokens(
AuthToken token) → Future< AuthToken> -
note: should ONLY throw
DioException
or AuthRestException. AuthRestException is for when refresh token is invalidated.DioException
is for other type of errors like when server is down or a socket exception occurs. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited