AuthToken class abstract
Authentication token class. Should be subclasses to contain actual
token data. It's a good idea to add a factory constructor
AuthToken.fromJson to keep serialization and deserialization in one place.
Constructors
- AuthToken()
-
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
Methods
-
isValid(
) → bool - Checks whether the token is valid. Should return false if anything in the token data prompts it won't work.
-
needsRefresh(
) → bool - Check whether the token is obsolete. If the token has an expiration date, override this method.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serialize token contents into a json, to store on the device.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited