Interface IIdentityService
- Namespace
- Signal.Application.Abstractions
- Assembly
- Signal.Application.dll
Inspects and trusts identity keys (safety numbers).
public interface IIdentityService
Methods
ListAsync(PhoneNumber, CancellationToken)
Lists known identities (GET /v1/identities/{number}).
Task<IReadOnlyList<Identity>> ListAsync(PhoneNumber account, CancellationToken cancellationToken = default)
Parameters
accountPhoneNumberThe account.
cancellationTokenCancellationTokenCancels the request.
Returns
- Task<IReadOnlyList<Identity>>
The identities.
TrustAsync(PhoneNumber, PhoneNumber, string?, bool, CancellationToken)
Trusts an identity (PUT /v1/identities/{number}/trust/{numberToTrust}).
Task TrustAsync(PhoneNumber account, PhoneNumber numberToTrust, string? verifiedSafetyNumber = null, bool trustAllKnownKeys = false, CancellationToken cancellationToken = default)
Parameters
accountPhoneNumberThe account.
numberToTrustPhoneNumberThe contact whose key to trust.
verifiedSafetyNumberstringThe safety number verified out of band; marks the key as verified.
trustAllKnownKeysboolTrust all known keys of the contact without verification.
cancellationTokenCancellationTokenCancels the request.
Returns
- Task
A task that completes when the key was trusted.