PowerSyncCredentials class

Temporary credentials to connect to the PowerSync service.

Constructors

PowerSyncCredentials({required String endpoint, required String token, String? userId, DateTime? expiresAt})
PowerSyncCredentials.fromJson(Map<String, dynamic> parsed)
factory

Properties

endpoint → String
PowerSync endpoint, e.g. "https://myinstance.powersync.co".
final
expiresAt → DateTime?
When the token expires. Only use for debugging purposes.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
token → String
Temporary token to authenticate against the service.
final
userId → String?
User ID.
final

Methods

endpointUri(String path) → Uri
Resolve an endpoint path against the endpoint URI.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

getExpiryDate(String token) → DateTime?
Get an expiry date from a JWT token, if specified.