AuthHandler class

Constructors

AuthHandler({required Dio dio, required RestApiClientOptions options, required AuthOptions authOptions, required ExceptionOptions exceptionOptions, required LoggingOptions loggingOptions})

Properties

authOptions AuthOptions
final
containsAuthorizationHeader Future<bool>
no setter
containsJwtInStorage Future<bool>
no setter
containsRefreshTokenInStorage Future<bool>
no setter
dio Dio
final
exceptionOptions ExceptionOptions
final
hashCode int
The hash code for this object.
no setterinherited
isAuthorized Future<bool>
no setter
jwt Future<String?>
no setter
loggingOptions LoggingOptions
final
options RestApiClientOptions
final
refreshToken Future<String?>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
usesAuth bool
no setter

Methods

authorize({required String jwt, required String refreshToken}) Future<bool>
clear() Future
executeTokenRefresh() Future<void>
Refreshes the token by calling specified refresh-token endpoint
init() Future
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshTokenCallback<T>(DioException e) Future<Response<T>?>
Gets called when response status code is UnAuthorized and refreshes the token by calling specified refresh-token endpoint
toString() String
A string representation of this object.
inherited
unAuthorize() Future<bool>

Operators

operator ==(Object other) bool
The equality operator.
inherited