TomSecretsAdminClient class final
An authenticated admin connection.
Properties
-
events
→ Stream<
Map< String, Object?> > -
The pushed events (after
subscribe).no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Whether the connection has ended.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceStart → int
-
The service's start time (from the challenge; 0 on a connection that
claimed the service).
no setter
Methods
-
close(
) → Future< void> - Ends the connection.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
request(
String op, [Map< String, Object?> fields = const {}]) → Future<Map< String, Object?> > -
Sends the admin request
opwithfields; answers the answer, or throws TomSecretsAdminException for anerror. -
toString(
) → String -
A string representation of this object.
inherited
-
unlock(
String password, {List< int> ? keyFile}) → Future<void> - Unlocks with the master password (and key file).
-
unlockWithBundle(
String vault, TomSecretsUnlockBundle bundle) → Future< void> -
Unlocks
vault(a store's name asstatuslists it: the primary unlocks the service, another store a locked store of an unlocked service) withbundle, the key material the OS unlock read (protocol.md 6.4): sealed under this connection's bundle key. A bundle that no longer opens the vault (re-keyed) answersdeniedreasonbad_password; one the service cannot open,bad_bundle.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
claim(
TomSecretsRuntime runtime, {required String password, List< int> ? keyFile, Map<String, Object?> client = const {'name' : 'tsm'}}) → Future<(TomSecretsAdminClient, Uint8List)> -
Takes the service over with the master password (
claim): the service cannot prove itself here, so the caller warns the user first. Answers the connection and the new admin key. -
connect(
TomSecretsRuntime runtime, List< int> adminKey, {Map<String, Object?> client = const {'name' : 'tsm'}}) → Future<TomSecretsAdminClient> -
Connects to the admin endpoint of
runtimeand proves both sides holdadminKey; throwsservice_impostorwhen the service'smac2is wrong,deniedwhen the service refuses the key.