Table of Contents

Class ApiKeyRequest

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

Request to create a new API key for a principal.

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

Constructors

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

Request to create a new API key for a principal.

public ApiKeyRequest(string PrincipalId, PrincipalType PrincipalType, IReadOnlyList<string> Scopes, DateTimeOffset? ExpiresAt, string? Description)

Parameters

PrincipalId string

The principal the key is issued to.

PrincipalType PrincipalType

The type of principal.

Scopes IReadOnlyList<string>

The scopes/permissions this key grants.

ExpiresAt DateTimeOffset?

Optional expiration. If null, DefaultExpirationDays is used.

Description string

Optional human-readable description.

Properties

Description

Optional human-readable description.

public string? Description { get; init; }

Property Value

string

ExpiresAt

Optional expiration. If null, DefaultExpirationDays is used.

public DateTimeOffset? ExpiresAt { get; init; }

Property Value

DateTimeOffset?

PrincipalId

The principal the key is issued to.

public string PrincipalId { get; init; }

Property Value

string

PrincipalType

The type of principal.

public PrincipalType PrincipalType { get; init; }

Property Value

PrincipalType

Scopes

The scopes/permissions this key grants.

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

Property Value

IReadOnlyList<string>