DVDevClientPairing class

What a pairing link carries: where the server is, which branch it serves, the key its bundles are sealed with, and the token that lets this device fetch them.

The key is what stops another machine pushing code; the token is what stops another device reading it. Both travel out of band -- a QR code on the developer's screen or a deep link sent to a colleague -- which is the whole of the pairing: nothing on the network can substitute either.

Constructors

DVDevClientPairing({required Uri server, required String branch, required List<int> publicKey, required String token})
DVDevClientPairing.parse(Uri link)
Parses a pairing link, refusing anything it could not trust.
factory

Properties

branch → String
final
hashCode → int
The hash code for this object.
no setterinherited
dartvel-dev://pair?server=...&branch=...&key=...&token=...
no setter
publicKey → Uint8List
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
server → Uri
final
token → String
final

Methods

bundleUri(String target) → Uri
Where the current bundle for target is fetched.
graphUri() → Uri
Where the project graph the dev menu's inspectors show is fetched.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

newToken([Random? random]) → String
32 bytes from a secure source, base64url.
tokenMatches(String? presented, String expected) → bool
Whether presented is expected, compared in constant time.