AtClientSecretSharing.forClient constructor
AtClientSecretSharing.forClient(
- AtClient atClient, {
- SecretStorePersistence? persistence,
- ({Duration cacheExpiry, bool resetOnLookup})? publicKeyCacheSettings = (cacheExpiry: Duration(minutes: 5), resetOnLookup: true),
The shared secret-sharing instance for atClient, created on first
call. persistence and publicKeyCacheSettings take effect only on
the creating call; later calls return the cached instance unchanged
(one SecretStorePersistence per APKAM keypair — see
SecretStore.persistence).
Implementation
factory AtClientSecretSharing.forClient(
AtClient atClient, {
SecretStorePersistence? persistence,
({
Duration cacheExpiry,
bool resetOnLookup
})? publicKeyCacheSettings = const (
cacheExpiry: Duration(minutes: 5),
resetOnLookup: true,
),
}) {
var instance = _instances[atClient];
if (instance == null) {
instance = AtClientSecretSharing(atClient,
publicKeyCacheSettings: publicKeyCacheSettings);
instance.secretStore.persistence = persistence;
_instances[atClient] = instance;
}
return instance;
}