Table of Contents

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

account PhoneNumber

The account.

cancellationToken CancellationToken

Cancels 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

account PhoneNumber

The account.

numberToTrust PhoneNumber

The contact whose key to trust.

verifiedSafetyNumber string

The safety number verified out of band; marks the key as verified.

trustAllKnownKeys bool

Trust all known keys of the contact without verification.

cancellationToken CancellationToken

Cancels the request.

Returns

Task

A task that completes when the key was trusted.