Token class

Base class representation of the YouTubeMusicAPI OAuth token.

Implementers

Constructors

Token.new({required DefaultScope scope, required Bearer tokenType, required String accessToken, required String refreshToken, int expiresAt = 0, int expiresIn = 0})
Create new Token.

Properties

accessToken String
String to be used in authorization header.
getter/setter pair
expiresAt int
UNIX epoch timestamp in seconds.
getter/setter pair
expiresIn int
Seconds until expiration from request timestamp.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isExpiring bool
Wether this Token expires in the next 60 seconds.
no setter
refreshToken String
String used to obtain new access token upon expiration.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope DefaultScope
Authentication scope.
getter/setter pair
tokenType Bearer
Literal Bearer.
getter/setter pair

Methods

asAuth() String
Returns authorization-header-ready String of tokenType and accessToken.
asJson() String
Returns this Token as Json String.
asMap() JsonMap
Returns JsonMap containing underlying token values.
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