APIToken class

Implemented types

Constructors

APIToken(String username, {String? token, DateTime? issueTime, Duration? duration, String? refreshToken, bool withRefreshToken = false})
APIToken.fromCredential(APICredential credential, {Duration? duration})
factory
APIToken.fromJson(Map json)
factory

Properties

accessTime → DateTime
no setter
duration → Duration
final
expireTime → DateTime
no setter
hashCode → int
The hash code for this object.
no setteroverride
issueTime → DateTime
final
refreshToken → String?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
token → String
final
username → String
final

Methods

compareTo(APIToken other) → int
Compares this object to another object.
override
isExpired({DateTime? now}) → bool
markAccessTime() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Properties

tokenDefaultAlphabetPairsRandom ↔ List<String>
getter/setter pair

Static Methods

generateToken(int length, {int variableLength = 0, String prefix = '', Random? random}) → String

Constants

tokenDefaultAlphabet → const List<String>