TomInMemoryGatedSecretStore class
A TomGatedSecretStore in memory, for tests: availability as set, every read answered or failed as nextFailure says, and the prompts it would have shown kept in prompts.
- Implemented types
- Annotations
-
- @visibleForTesting
Constructors
- TomInMemoryGatedSecretStore({TomGatedAvailability available = TomGatedAvailability.biometric})
-
A store of
available.
Properties
- available ↔ TomGatedAvailability
-
What availability answers.
getter/setter pair
-
handles
→ Iterable<
String> -
The handles stored.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- nextFailure ↔ TomGatedSecretErrorKind?
-
The failure the next prompting call throws (then cleared), or null.
getter/setter pair
-
prompts
→ List<
String> -
The reasons of the prompts shown, in order.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
availability(
) → Future< TomGatedAvailability> -
What gates an item on this device now; TomGatedAvailability.none
when nothing can.
override
-
delete(
String handle) → Future< void> -
Forgets the secret at
handle, if any, without a prompt.override -
lifetimeOf(
String handle) → TomGatedLifetime? -
The lifetime
handlewas written with, or null. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String handle, {required String reason}) → Future< String?> -
The secret under
handleafter the OS check, which showsreason; null when nothing is stored there (no prompt then). Throws TomGatedSecretStoreException when the check fails or is cancelled.override -
toString(
) → String -
A string representation of this object.
inherited
-
write(
String handle, String secret, {TomGatedLifetime lifetime = TomGatedLifetime.saved, String? reason}) → Future< void> -
Stores
secretunderhandle, replacing any current value. A store whose key exists only after the check (Windows Hello) shows the prompt withreasonhere too. Throws TomGatedSecretStoreException.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited