Table of Contents

Class ApiKeyRecord

Namespace
JD.AI.Core.Security
Assembly
JD.AI.Core.dll

Metadata for an API key.

public sealed class ApiKeyRecord
Inheritance
ApiKeyRecord
Inherited Members

Properties

CreatedAt

public DateTimeOffset CreatedAt { get; init; }

Property Value

DateTimeOffset

ExpiresAt

public DateTimeOffset? ExpiresAt { get; init; }

Property Value

DateTimeOffset?

IsExpired

Whether this key has passed its expiry date.

public bool IsExpired { get; }

Property Value

bool

IsRevoked

public bool IsRevoked { get; set; }

Property Value

bool

Key

public required string Key { get; init; }

Property Value

string

LastUsedAt

When the key was last used for authentication.

public DateTimeOffset? LastUsedAt { get; set; }

Property Value

DateTimeOffset?

Name

public required string Name { get; init; }

Property Value

string

PreviousKey

public string? PreviousKey { get; init; }

Property Value

string

RevokedAt

public DateTimeOffset? RevokedAt { get; set; }

Property Value

DateTimeOffset?

Role

public GatewayRole Role { get; init; }

Property Value

GatewayRole

UsageCount

Number of times this key has been used for authentication.

public long UsageCount { get; set; }

Property Value

long