Method ApplyPasswordSettingAsync
- Namespace
- MailFathom.Application.Access.DefaultAdministrator
- Assembly
- MailFathom.Application.dll
ApplyPasswordSettingAsync(UserId, Guid, UserCredentialLookup, string, DateTimeOffset, CancellationToken)
Gives the default administrator the password the deployment was started with, unless that setting was ever applied.
Task<DefaultAdministratorPasswordOutcome> ApplyPasswordSettingAsync(UserId administrator, Guid credentialId, UserCredentialLookup lookup, string passwordHash, DateTimeOffset appliedAt, CancellationToken cancellationToken)
Parameters
administratorUserIdThe default administrator.
credentialIdGuidThe identifier the credential is provisioned under where this call writes it.
lookupUserCredentialLookupThe username the credential is signed in with.
passwordHashstringThe stored record of the password.
appliedAtDateTimeOffsetWhen the setting is applied.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<DefaultAdministratorPasswordOutcome>
What the call did, or why it did nothing.
Remarks
The credential, presented on the administrative endpoint alone and narrowing nothing its user holds, and the record that the setting was applied commit together. A deployment whose administrator already holds a password credential records the setting as applied and writes nothing else, so a credential deleted later cannot bring the setting back on the next start.