Table of Contents

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

keyId string

The configured key identifier stored beside each matching value.

limit int

The maximum rows to return, from one through MaximumKeyReferenceCount; values outside that range are rejected rather than clamped.

cancellationToken CancellationToken

Cancels the database read.

Returns

Task<IReadOnlyList<StoredSecretKeyReference>>

Up to limit references still naming the key, ordered by their stable identifier.

Exceptions

ArgumentException

Thrown when keyId is null, empty, or white space.

ArgumentOutOfRangeException

Thrown when limit is outside one through MaximumKeyReferenceCount.