Method DeleteAsync
- Namespace
- MailFathom.Application.Access.Credentials
- Assembly
- MailFathom.Application.dll
DeleteAsync(UserId, Guid, CancellationToken)
Removes one credential and frees the lookup it held.
public Task<UserCredentialWriteOutcome> DeleteAsync(UserId user, Guid credentialId, CancellationToken cancellationToken)
Parameters
userUserIdThe user the credential belongs to.
credentialIdGuidThe credential being removed.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<UserCredentialWriteOutcome>
What the act did, or why it did nothing.
Exceptions
- ArgumentException
Thrown when
usernames nobody orcredentialIdis the empty identifier.- PrincipalNotAuthorizedException
Thrown when the caller holds AdminCredentialsWrite at no scope.