Table of Contents

Method ResolvePasswordAsync

Namespace
MailFathom.Infrastructure.Mail
Assembly
MailFathom.Infrastructure.dll

ResolvePasswordAsync(ISecretReferenceResolver, CancellationToken)

Resolves the mailbox password and hands ownership of the material to the caller.

public Task<ResolvedSecret> ResolvePasswordAsync(ISecretReferenceResolver resolver, CancellationToken cancellationToken)

Parameters

resolver ISecretReferenceResolver

The resolver that turns references into material.

cancellationToken CancellationToken

Cancels the resolution.

Returns

Task<ResolvedSecret>

The owned password, which the caller must dispose when its operation ends.

Remarks

The exception is a fail-closed path rather than an ordinary branch: startup already proved the reference resolves, so a failure here means the material disappeared underneath a running deployment.

Exceptions

ArgumentNullException

Thrown when resolver is null.

InvalidOperationException

Thrown when a reference that passed startup validation no longer resolves.