TokenBundle class

An access token (typically short-lived JWT) paired with an optional refresh token (typically long-lived opaque string). The shapes follow OAuth 2.0 (RFC 6749 §5.1) conventions but are not coupled to any particular OAuth profile.

Constructors

TokenBundle({required String accessToken, String? refreshToken, required String tokenType, required int expiresIn, int? refreshExpiresIn, List<String>? scope, Ext? ext})
const
TokenBundle.fromJson(Map<String, dynamic> json)
Read this payload from a decoded JSON object.
factory

Properties

accessToken → String
Bearer-style access token. Consumers presenting this token to downstream services prove the holder of the original session. Format is consumer-defined — JWT is common, but opaque strings are also valid.
final
expiresIn → int
Seconds from issuance until the access token expires.
final
ext → Ext?
Ecosystem-defined extension members per SPEC.md §4.5.1.
final
hashCode → int
The hash code for this object.
no setterinherited
refreshExpiresIn → int?
Seconds from issuance until the refresh token expires, when one was issued.
final
refreshToken → String?
Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → List<String>?
Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.
final
tokenType → String
Token presentation scheme. Almost always "Bearer"; reserved for future schemes.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serialize to a JSON-encodable map, omitting absent members.
toString() → String
A string representation of this object.
inherited

Operators

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