Class MailboxRefreshToken
- Namespace
- MailFathom.Domain.Accounts
- Assembly
- MailFathom.Domain.dll
The long-lived credential MailFathom holds on one mailbox owner's behalf, owned by the operation that read it.
public sealed class MailboxRefreshToken : IDisposable
- Inheritance
-
MailboxRefreshToken
- Implements
- Inherited Members
Remarks
The token acts for a named person, so it is personal data by this repository's own classification: it is never logged, never rendered by a synthesized ToString(), and never held longer than the operation that needs it. The material lives in a pinned buffer that Dispose() erases, for the reason a resolved secret does — a string is immutable, unpinned, and copied again on every compaction, so erasing one is not well defined.
This is a domain value rather than the infrastructure's resolved-secret type, and the difference is what each one means rather than how it is held. A resolved secret is material an operator provisioned behind a reference; this is a credential MailFathom itself stores, rotates, and re-seals under its own key. The two meet only where the adapter seeds one from the other, which is exactly where the seeding path belongs.
Methods
- Create(ReadOnlySpan<byte>)
Takes ownership of a copy of the token's bytes.
- Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- FromText(string)
Encodes a token the authorization server issued as text.
- RevealAsString()
Reveals the token as its UTF-8 text view.
- RevealBytes()
Reveals the token's bytes, which is what a store seals.
- ToString()
Returns a string that represents the current object.