TomSecretsClient class final
A client of the Tom Secrets Manager's secrets service.
One connection, opened by the first call (or open); after not_running
or a dropped connection the next call connects again. Calls may overlap.
A Dart isolate has its own client; there is no fork to guard against.
The library logs nothing: no value, token or payload.
Constructors
Properties
- clientName → String
-
The name
hellogives the program.final - clientToken → String?
-
The client token sent in every
hello, when the program has one.final - connectTimeout → Duration
-
How long connecting and the
welcomemay take.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- welcome → TomSecretsWelcome?
-
The
welcomeof the current connection, or null when not connected.no setter
Methods
-
close(
) → Future< void> - Closes the connection; a later call connects again.
-
get(
String reference, {String? field, Map< String, String> ? dimensions, bool wait = true, Duration? timeout, bool wantClientToken = false, TomSecretsProgressCallback? onProgress, bool waitOnRateLimit = false}) → Future<TomSecretValue> - Reads one secret.
-
getFile(
String reference, {String? field, Map< String, String> ? dimensions, bool wait = true, Duration? timeout, TomSecretsProgressCallback? onProgress}) → Future<TomSecretFile> -
BReads an attachment or a typed key as bytes, over binary frames. Fails asunsupportedwhen the service does not offer the featuresbinaryandgetFile. -
getMany(
List< TomSecretRequest> requests, {bool wait = true, Duration? timeout, TomSecretsProgressCallback? onProgress, bool waitOnRateLimit = false}) → Future<List< TomSecretResult> > - Reads several secrets under one approval prompt (1 to 256); the results come in request order, each a value or an error. Every reference is parsed locally first.
-
match(
String url, {String? frameUrl, String? userName, bool pick = false, bool wait = true, Duration? timeout, TomSecretsProgressCallback? onProgress}) → Future< List< TomSecretsLoginCandidate> > -
BThe login entries of the web pageurl(a login form in a frame:frameUrl) that this client's grants cover, never a value (protocol.md 5.5match): the exact host first, then the last used. Answered only for the browser host and the developer-tool helpers; any other client getsdenied(reasonnot_allowed_op). Fails asunsupportedwhen the service does not offermatch. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
) → Future< void> - Connects, unless a connection is open.
-
propose(
{required String url, required String userName, required String password, String? title}) → Future< bool> -
BProposes a login for the user to save in the manager app (protocol.md 5.5propose): the service passes it to the attached app and keeps nothing. Only for the browser host and the helpers with a grant; with no app attachedunavailable(reasonno_app). Fails asunsupportedwhen the service does not offerpropose. Answers whether the vaults hold the credential already (a helper's, which is then not proposed, DP-52). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
The process's shared client, created on first use with the defaults.
no setter