Table of Contents

Interface IUserIdentityDirectory

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Reads the sign-in identities a directory holds for a user, so a host can link a directory user to an identity in another system. Unchecked, like IUserDirectoryService: call it from server-side code that has already authorized the caller.

public interface IUserIdentityDirectory

Methods

GetIdentitiesAsync(string, CancellationToken)

Returns every sign-in identity the directory holds for the user, in directory order, or an empty list when it holds none.

Task<IReadOnlyList<DirectoryUserIdentity>> GetIdentitiesAsync(string directoryId, CancellationToken cancellationToken = default)

Parameters

directoryId string
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<DirectoryUserIdentity>>

GetIdentitiesByIdsAsync(IEnumerable<string>, CancellationToken)

Returns the sign-in identities of several directory users at once, one entry per distinct id the directory knows. An id the directory does not know is left out rather than failing the whole read, and null or empty ids are ignored.

Task<DirectoryUserIdentities[]> GetIdentitiesByIdsAsync(IEnumerable<string> directoryIds, CancellationToken cancellationToken = default)

Parameters

directoryIds IEnumerable<string>
cancellationToken CancellationToken

Returns

Task<DirectoryUserIdentities[]>

Remarks

The default implementation calls GetIdentitiesAsync(string, CancellationToken) once per id, so an existing directory keeps working unchanged. A directory that can read many users in one request should override it; a list surface relies on this to keep its call count bounded.