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
KeyIdstringThe unique key identifier.
PrincipalIdstringThe principal that owns this key.
PrincipalTypePrincipalTypeThe type of the owning principal.
CreatedAtDateTimeOffsetWhen the key was created.
ExpiresAtDateTimeOffsetWhen the key expires.
RevokedAtDateTimeOffset?When the key was revoked, or null if active.
ScopesIReadOnlyList<string>The scopes this key grants.
DescriptionstringOptional description.
Properties
CreatedAt
When the key was created.
public DateTimeOffset CreatedAt { get; init; }
Property Value
Description
Optional description.
public string? Description { get; init; }
Property Value
ExpiresAt
When the key expires.
public DateTimeOffset ExpiresAt { get; init; }
Property Value
KeyId
The unique key identifier.
public string KeyId { get; init; }
Property Value
PrincipalId
The principal that owns this key.
public string PrincipalId { get; init; }
Property Value
PrincipalType
The type of the owning principal.
public PrincipalType PrincipalType { get; init; }
Property Value
RevokedAt
When the key was revoked, or null if active.
public DateTimeOffset? RevokedAt { get; init; }
Property Value
Scopes
The scopes this key grants.
public IReadOnlyList<string> Scopes { get; init; }