AuthHandler class

Constructors

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

Properties

authOptions AuthOptions
final
containsAuthorizationHeader Future<bool>
no setter
containsJwtInStorage Future<bool>
no setter
containsRefreshTokenInStorage Future<bool>
no setter
dio Dio
final
exceptionHandler ExceptionHandler
final
exceptionOptions ExceptionOptions
final
hashCode int
The hash code for this object.
no setterinherited
isAuthorized Future<bool>
no setter
jwt String?
no setter
loggingOptions LoggingOptions
final
options RestApiClientOptions
final
refreshToken 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([RequestInterceptorHandler? handler]) 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>(RequestOptions requestOptions, [RequestInterceptorHandler? handler]) 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