SecretStore class

In-memory store of the secrets this atSign's APKAM keypair holds, keyed by (namespace, name).

Annotations
  • @experimental

Constructors

SecretStore({SecretStorePersistence? persistence})

Properties

hashCode int
The hash code for this object.
no setterinherited
persistence SecretStorePersistence?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getSecret(String namespace, String name) Secret?
init() Future<void>
Loads previously persisted secrets, if persistence is set.
listSecrets({String? namespace, String? namePrefix}) List<Secret>
All secrets, optionally restricted to one namespace and/or to names beginning with namePrefix. The prefix filter lets a system caller enumerate a family of reserved secrets within a scope — e.g. the group provider listing __rk.* epoch keys for one (atSign, namespace) to resolve the current key or prune old epochs.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putIfNewer(Secret secret) Future<bool>
Stores secret only if it is newer than any existing (namespace, name) entry. Returns whether it was stored. This is the conflict rule for secrets arriving from other clients — and as the arrival/merge path it accepts reserved (__) names: system secrets must flow between clients.
putSecret(Secret secret, {bool allowReservedName = false}) Future<void>
Stores secret, overwriting any existing (namespace, name) entry.
removeSecret(String namespace, String name) Future<bool>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

namespaceAuthorizes(Map<String, dynamic> approvedNamespaces, String namespace) bool
Whether an enrollment approved for approvedNamespaces (a map of namespace -> access, as carried by an enrollment record) is authorized for namespace.