Class ApiKeyLifecycleContext
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
ReasonApiKeyLifecycleReasonWhy the handler is being invoked.
ApiKeyIdstringStable public identifier of the key (Key). Use this to correlate a host-side copy.
PrivateTokenstringThe raw API key value. Non-null on Created/Recycled; null on Deleted.
TeamKeystringOwning team, or null for system keys.
IsSystemKeyboolTrue for system (team-less) keys.
NamestringHuman-readable key name. Null on Deleted.
TagsIReadOnlyList<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
IsSystemKey
True for system (team-less) keys.
public bool IsSystemKey { get; init; }
Property Value
Name
Human-readable key name. Null on Deleted.
public string Name { get; init; }
Property Value
PrivateToken
public string PrivateToken { get; init; }
Property Value
Reason
Why the handler is being invoked.
public ApiKeyLifecycleReason Reason { get; init; }
Property Value
Tags
System-set tags on the key. Empty on Deleted.
public IReadOnlyList<Tag> Tags { get; init; }
Property Value
TeamKey
Owning team, or null for system keys.
public string TeamKey { get; init; }