Table of Contents

Interface ISystemApiKeyManagementService

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

User-facing management of system API keys — keys not bound to any team. All methods require the SystemManage scope and no team need be selected.

public interface ISystemApiKeyManagementService

Remarks

Separate from IApiKeyManagementService so each interface is wholly one kind: every operation there names the team it acts on, every operation here acts on none. That homogeneity is what lets the registration declare the rule once — AddSystemService here, AddTeamService there — instead of leaving it to a per-method annotation somebody has to remember on the next method added.

Methods

CreateSystemKeyAsync(string, string[], DateTime?)

[RequireScope("apikey:system-manage")]
Task<IApiKey> CreateSystemKeyAsync(string name, string[] scopes, DateTime? expiryDate = null)

Parameters

name string
scopes string[]
expiryDate DateTime?

Returns

Task<IApiKey>

DeleteSystemKeyAsync(string)

[RequireScope("apikey:system-manage")]
Task DeleteSystemKeyAsync(string key)

Parameters

key string

Returns

Task

GetSystemKeysAsync()

[RequireScope("apikey:system-manage")]
IAsyncEnumerable<IApiKey> GetSystemKeysAsync()

Returns

IAsyncEnumerable<IApiKey>

LockSystemKeyAsync(string)

[RequireScope("apikey:system-manage")]
Task LockSystemKeyAsync(string key)

Parameters

key string

Returns

Task

RefreshSystemKeyAsync(string)

[RequireScope("apikey:system-manage")]
Task<IApiKey> RefreshSystemKeyAsync(string key)

Parameters

key string

Returns

Task<IApiKey>