TokenProtocol<T extends AuthToken> class
Two functions wrapped in simple class when we should refresh or revoke the token this is a protocol :)
Constructors
-
TokenProtocol({ShouldRevoke shouldRevokeToken = _shouldRevokeToken, ShouldRefresh<
T> shouldRefresh = _shouldRefresh}) -
Provide a handy TokenProtocol
and pass shouldRevokeToken and shouldRefresh wrapped functions to it
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shouldRefresh
→ ShouldRefresh<
T> -
shouldRefresh - check if we should refresh token
final
- shouldRevokeToken → ShouldRevoke
-
shouldRevokeToken - check if we should revoke token.
final
Methods
-
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