OAuthToken class

OAuth 2.1 token response

Annotations
  • @immutable

Constructors

OAuthToken({required String accessToken, String tokenType = 'Bearer', int? expiresIn, String? refreshToken, List<String>? scopes, required DateTime issuedAt, Map<String, dynamic>? extra})
const
OAuthToken.fromJson(Map<String, dynamic> json)
factory

Properties

accessToken → String
Access token
final
expiresAt → DateTime?
Get token expiry time
no setter
expiresIn → int?
Expiration time in seconds
final
extra → Map<String, dynamic>?
Additional token data
final
hashCode → int
The hash code for this object.
no setterinherited
isExpired → bool
Check if token is expired
no setter
issuedAt → DateTime
Token issue time
final
refreshToken → String?
Refresh token
final
remainingLifetime → int?
Get remaining lifetime in seconds
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → String?
Get scope as a single string
no setter
scopes → List<String>?
Scopes granted
final
tokenType → String
Token type (usually "Bearer")
final

Methods

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.
inherited

Operators

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