Method SetEnabledAsync
- Namespace
- MailFathom.Application.Access.Credentials
- Assembly
- MailFathom.Application.dll
SetEnabledAsync(UserId, Guid, bool, CancellationToken)
Turns one credential on or off without changing what it is presented as.
Task<UserCredentialWriteOutcome> SetEnabledAsync(UserId user, Guid credentialId, bool enabled, CancellationToken cancellationToken)
Parameters
userUserIdThe user the credential belongs to.
credentialIdGuidThe credential being written.
enabledboolWhether it should authenticate requests.
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.