SessionBlob class
SessionBlob
Constructors
-
SessionBlob({required String sessionId, required String expiresAt, List<
CookieJarEntry> ? cookies, List<RequestHeader> ? headers, List<StorageEntry> ? localStorage, List<StorageEntry> ? sessionStorage, String? bindOrigin, SessionBlobRefreshHint? refreshHint}) -
const
-
SessionBlob.fromJson(Map<
String, dynamic> json) -
Read this payload from a decoded JSON object.
factory
Properties
- bindOrigin → String?
-
The web origin this session is for. Companions MUST refuse to inject the session
into any other origin.
final
-
Cookies the Companion injects into the appropriate origin's cookie jar. Order is
significant for sites that set multiple cookies with the same name on different
paths.
final
- expiresAt → String
-
Time after which the session material MUST be discarded. The maintainer SHOULD set
this conservatively — short TTL is the primary defence against a compromised
Companion replaying the session beyond its useful lifetime.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ List<
RequestHeader> ? -
HTTP request headers the Companion attaches to outbound requests to the bound
origin until
expiresAt. Typically holdsAuthorization: Bearer ….final -
localStorage
→ List<
StorageEntry> ? -
Optional localStorage entries to set on the origin. Used by SPAs that store session
material there rather than in cookies.
final
- refreshHint → SessionBlobRefreshHint?
-
Tells the Companion when to call back for a refreshed session.
maintainerOnly= don't refresh on your own.on401= call when the third party returns 401.beforeExpiry= pre-emptively refresh shortly beforeexpiresAt.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionId → String
-
Maintainer-assigned opaque id for this session. Used for revoke/refresh operations
against the maintainer.
final
-
sessionStorage
→ List<
StorageEntry> ? -
Optional sessionStorage entries to set on the origin.
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