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
resolverISecretReferenceResolverThe resolver that turns references into material.
cancellationTokenCancellationTokenCancels 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
resolveris null.- InvalidOperationException
Thrown when a reference that passed startup validation no longer resolves.