IAzureCosmosDbCreateNewPassword Method

Creates a new password in the database and deactivates the old one.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
Task CreateNewPassword(
	EncryptedPasswordDto password,
	EncryptedPasswordDto old,
	AccountDto createdBy,
	string ipAddress,
	CancellationToken cancellationToken = default
)

Parameters

password  EncryptedPasswordDto
Password to create
old  EncryptedPasswordDto
Old password to deactivate
createdBy  AccountDto
User creating the password
ipAddress  String
IP Address of the createdBy
cancellationToken  CancellationToken  (Optional)
Cancellation token (optional)

Return Value

Task
Cosmos DB Object-creation Task

Exceptions

UnauthorizedAccessExceptionThrown if the user createdBy did not have the correct permissions
ArgumentNullExceptionThrown if password, old or createdBy was
ArgumentExceptionThrown if ipAddress is IsNullOrWhiteSpace(String)
ResourceInvalidStateExceptionThrown if password is in an invalid state.

See Also