Method ReadReferencesSealedByKeyAsync
- Namespace
- MailFathom.Infrastructure.Secrets.Database
- Assembly
- MailFathom.Infrastructure.dll
ReadReferencesSealedByKeyAsync(string, int, CancellationToken)
Reads a bounded inventory of stored secrets still sealed under one key.
Task<IReadOnlyList<StoredSecretKeyReference>> ReadReferencesSealedByKeyAsync(string keyId, int limit, CancellationToken cancellationToken)
Parameters
keyIdstringThe configured key identifier stored beside each matching value.
limitintThe maximum rows to return, from one through MaximumKeyReferenceCount; values outside that range are rejected rather than clamped.
cancellationTokenCancellationTokenCancels the database read.
Returns
- Task<IReadOnlyList<StoredSecretKeyReference>>
Up to
limitreferences still naming the key, ordered by their stable identifier.
Exceptions
- ArgumentException
Thrown when
keyIdis null, empty, or white space.- ArgumentOutOfRangeException
Thrown when
limitis outside one through MaximumKeyReferenceCount.