Interface IDefaultAdministratorStore
- Namespace
- MailFathom.Application.Access.DefaultAdministrator
- Assembly
- MailFathom.Application.dll
Where the record that a deployment's default administrator was written, and that its password setting was applied, is kept.
public interface IDefaultAdministratorStore
Remarks
Both acts happen at most once per deployment, and several replicas start at once, so each is one statement against a row every replica contends for rather than a read followed by a write: the replica that wins writes, and every other one reads what it wrote.
Methods
- ApplyPasswordSettingAsync(UserId, Guid, UserCredentialLookup, string, DateTimeOffset, CancellationToken)
Gives the default administrator the password the deployment was started with, unless that setting was ever applied.
- RecordOnceAsync(UserId, Guid, DateTimeOffset, CancellationToken)
Records the default administrator unless this deployment ever recorded one, and reports the administrator it holds.