AuthChecker class abstract

harmony_auth checker to check which DioExceptions are from unauthorized calls.

note: calls should be matched using the provided AuthMatcher beforehand. non-matched requests are not checked for unauthorized responses.

note: only DioExceptions are checked for being unauthorized, if you have customized your dio please make sure you haven't ignored unauthorized errors.

Constructors

AuthChecker()
standard checker
const
factory
AuthChecker.byStatusCode(bool statusCode(int statusCode))
byStatusCode checker
const
factory
AuthChecker.general(bool lambda(DioException error))
general checker
const
factory
AuthChecker.statusCode(int statusCode)
statusCode checker
const
factory
AuthChecker.statusCodes(Set<int> statusCodes)
statusCodes checker
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isUnauthorizedError(DioException error) bool
check to see if error is from unauthorized call
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