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
IsValidboolWhether the key is valid.
KeyIdstringThe key identifier, if found.
PrincipalIdstringThe principal that owns the key, if valid.
PrincipalTypePrincipalType?The type of the owning principal, if valid.
ScopesIReadOnlyList<string>The scopes of the key, if valid.
FailureReasonstringReason for validation failure, if not valid.
Properties
FailureReason
Reason for validation failure, if not valid.
public string? FailureReason { get; init; }
Property Value
IsValid
Whether the key is valid.
public bool IsValid { get; init; }
Property Value
KeyId
The key identifier, if found.
public string? KeyId { get; init; }
Property Value
PrincipalId
The principal that owns the key, if valid.
public string? PrincipalId { get; init; }
Property Value
PrincipalType
The type of the owning principal, if valid.
public PrincipalType? PrincipalType { get; init; }
Property Value
Scopes
The scopes of the key, if valid.
public IReadOnlyList<string>? Scopes { get; init; }