Table of Contents

Class ApiKeyValidationResult

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

Result of validating an API key.

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

Constructors

ApiKeyValidationResult(bool, string?, string?, PrincipalType?, IReadOnlyList<string>?, string?)

Result of validating an API key.

public ApiKeyValidationResult(bool IsValid, string? KeyId, string? PrincipalId, PrincipalType? PrincipalType, IReadOnlyList<string>? Scopes, string? FailureReason)

Parameters

IsValid bool

Whether the key is valid.

KeyId string

The key identifier, if found.

PrincipalId string

The principal that owns the key, if valid.

PrincipalType PrincipalType?

The type of the owning principal, if valid.

Scopes IReadOnlyList<string>

The scopes of the key, if valid.

FailureReason string

Reason for validation failure, if not valid.

Properties

FailureReason

Reason for validation failure, if not valid.

public string? FailureReason { get; init; }

Property Value

string

IsValid

Whether the key is valid.

public bool IsValid { get; init; }

Property Value

bool

KeyId

The key identifier, if found.

public string? KeyId { get; init; }

Property Value

string

PrincipalId

The principal that owns the key, if valid.

public string? PrincipalId { get; init; }

Property Value

string

PrincipalType

The type of the owning principal, if valid.

public PrincipalType? PrincipalType { get; init; }

Property Value

PrincipalType?

Scopes

The scopes of the key, if valid.

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

Property Value

IReadOnlyList<string>