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+45c8d9adb5970d727cceec44a5ed61aea0016e50
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