Table of Contents

Class ApiKeyLifecycleContext

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Information handed to an IApiKeyLifecycleHandler when an API key is created, recycled, or deleted. On Created and Recycled the PrivateToken carries the raw key value — the only moment it is available programmatically. The host is responsible for protecting anything it captures; Tharga Team never persists, logs, or exposes the token elsewhere.

public record ApiKeyLifecycleContext : IEquatable<ApiKeyLifecycleContext>
Inheritance
ApiKeyLifecycleContext
Implements
Inherited Members

Constructors

ApiKeyLifecycleContext(ApiKeyLifecycleReason, string, string, string, bool, string, IReadOnlyList<Tag>)

Information handed to an IApiKeyLifecycleHandler when an API key is created, recycled, or deleted. On Created and Recycled the PrivateToken carries the raw key value — the only moment it is available programmatically. The host is responsible for protecting anything it captures; Tharga Team never persists, logs, or exposes the token elsewhere.

public ApiKeyLifecycleContext(ApiKeyLifecycleReason Reason, string ApiKeyId, string PrivateToken, string TeamKey, bool IsSystemKey, string Name, IReadOnlyList<Tag> Tags)

Parameters

Reason ApiKeyLifecycleReason

Why the handler is being invoked.

ApiKeyId string

Stable public identifier of the key (Key). Use this to correlate a host-side copy.

PrivateToken string

The raw API key value. Non-null on Created/Recycled; null on Deleted.

TeamKey string

Owning team, or null for system keys.

IsSystemKey bool

True for system (team-less) keys.

Name string

Human-readable key name. Null on Deleted.

Tags IReadOnlyList<Tag>

System-set tags on the key. Empty on Deleted.

Properties

ApiKeyId

Stable public identifier of the key (Key). Use this to correlate a host-side copy.

public string ApiKeyId { get; init; }

Property Value

string

IsSystemKey

True for system (team-less) keys.

public bool IsSystemKey { get; init; }

Property Value

bool

Name

Human-readable key name. Null on Deleted.

public string Name { get; init; }

Property Value

string

PrivateToken

The raw API key value. Non-null on Created/Recycled; null on Deleted.

public string PrivateToken { get; init; }

Property Value

string

Reason

Why the handler is being invoked.

public ApiKeyLifecycleReason Reason { get; init; }

Property Value

ApiKeyLifecycleReason

Tags

System-set tags on the key. Empty on Deleted.

public IReadOnlyList<Tag> Tags { get; init; }

Property Value

IReadOnlyList<Tag>

TeamKey

Owning team, or null for system keys.

public string TeamKey { get; init; }

Property Value

string