Table of Contents

Interface IMailboxRefreshTokenStore

Namespace
MailFathom.Application.Accounts
Assembly
MailFathom.Application.dll

Holds the refresh token MailFathom stores for one mail account, under MailFathom's own protection.

public interface IMailboxRefreshTokenStore

Remarks

The port names the operation in domain terms for the reason IEmailContentStore does: what protects the value and where it is written are the adapter's decisions, and both are expected to change without a caller noticing. Sealing, the key ring, the identifier of the key that sealed a value, and every PostgreSQL type involved stay inside the adapter; nothing above it ever sees ciphertext.

It takes no persistence session and joins no transaction, unlike the repositories that write mail. A token is stored during a token request rather than during a unit of work over the mailbox, so there is no transaction of the caller's to participate in, and a store that took a session it could not use would guarantee nothing while appearing to.

Methods

FindTokenAsync(MailAccountId, CancellationToken)

Reads the stored refresh token for one account.

SaveTokenAsync(MailAccountId, MailboxRefreshToken, CancellationToken)

Stores the refresh token for one account, replacing whatever was stored before.