Table of Contents

Method RedeemAsync

Namespace
MailFathom.Application.EmailContent.Attachments
Assembly
MailFathom.Application.dll

RedeemAsync(string, CancellationToken)

Verifies a presented capability and reports what it authorizes.

Task<AttachmentDownloadTicket?> RedeemAsync(string capability, CancellationToken cancellationToken)

Parameters

capability string

The text the request carried, which is entirely untrusted.

cancellationToken CancellationToken

Cancels resolving the signing material.

Returns

Task<AttachmentDownloadTicket>

What the capability authorizes, or null when it authorizes nothing.

Remarks

A malformed capability, one whose signature does not verify, one naming key material this deployment no longer holds, and one that has expired are one answer on purpose. Distinguishing them would tell whoever presented a forgery which part of it was wrong, and the caller acts identically on all of them.