Table of Contents

Class ApiKeyMetadata

Namespace
Excalibur.A3.Governance.NonHumanIdentity
Assembly
Excalibur.A3.Governance.Abstractions.dll

Metadata about an existing API key (never contains the plaintext key).

public sealed record ApiKeyMetadata : IEquatable<ApiKeyMetadata>
Inheritance
ApiKeyMetadata
Implements
Inherited Members

Constructors

ApiKeyMetadata(string, string, PrincipalType, DateTimeOffset, DateTimeOffset, DateTimeOffset?, IReadOnlyList<string>, string?)

Metadata about an existing API key (never contains the plaintext key).

public ApiKeyMetadata(string KeyId, string PrincipalId, PrincipalType PrincipalType, DateTimeOffset CreatedAt, DateTimeOffset ExpiresAt, DateTimeOffset? RevokedAt, IReadOnlyList<string> Scopes, string? Description)

Parameters

KeyId string

The unique key identifier.

PrincipalId string

The principal that owns this key.

PrincipalType PrincipalType

The type of the owning principal.

CreatedAt DateTimeOffset

When the key was created.

ExpiresAt DateTimeOffset

When the key expires.

RevokedAt DateTimeOffset?

When the key was revoked, or null if active.

Scopes IReadOnlyList<string>

The scopes this key grants.

Description string

Optional description.

Properties

CreatedAt

When the key was created.

public DateTimeOffset CreatedAt { get; init; }

Property Value

DateTimeOffset

Description

Optional description.

public string? Description { get; init; }

Property Value

string

ExpiresAt

When the key expires.

public DateTimeOffset ExpiresAt { get; init; }

Property Value

DateTimeOffset

KeyId

The unique key identifier.

public string KeyId { get; init; }

Property Value

string

PrincipalId

The principal that owns this key.

public string PrincipalId { get; init; }

Property Value

string

PrincipalType

The type of the owning principal.

public PrincipalType PrincipalType { get; init; }

Property Value

PrincipalType

RevokedAt

When the key was revoked, or null if active.

public DateTimeOffset? RevokedAt { get; init; }

Property Value

DateTimeOffset?

Scopes

The scopes this key grants.

public IReadOnlyList<string> Scopes { get; init; }

Property Value

IReadOnlyList<string>