TokenSourceResponse class

Response containing the credentials needed to connect to a LiveKit room.

Available extensions
Annotations

Constructors

TokenSourceResponse({required String serverUrl, required String participantToken, String? participantName, String? roomName})
const
TokenSourceResponse.fromJson(Map<String, dynamic> json)
Factory constructor supporting both snake_case and camelCase for backward compatibility.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
jwtPayload → LiveKitJwtPayload?

Available on TokenSourceResponse, provided by the TokenSourceJwt extension

Decode the participant token and return the parsed payload, if valid.
no setter
participantName → String?
The display name for the participant in the room. May be null if not specified.
final
participantToken → String
The JWT token containing participant permissions and metadata. Required for authentication.
final
roomName → String?
The name of the room the participant will join. May be null if not specified.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serverUrl → String
The WebSocket URL for the LiveKit server. Use this to establish the connection.
final

Methods

dispatchesAgent() → bool

Available on TokenSourceResponse, provided by the TokenSourceJwt extension

Returns true when the token's room configuration dispatches at least one agent.
hasValidToken({Duration tolerance = const Duration(seconds: 60), DateTime? currentTime}) → bool

Available on TokenSourceResponse, provided by the TokenSourceJwt extension

Returns true when the participant token is valid (not expired and past its not-before time).
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