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
PrincipalIdstringThe principal the key is issued to.
PrincipalTypePrincipalTypeThe type of principal.
ScopesIReadOnlyList<string>The scopes/permissions this key grants.
ExpiresAtDateTimeOffset?Optional expiration. If null, DefaultExpirationDays is used.
DescriptionstringOptional human-readable description.
Properties
Description
Optional human-readable description.
public string? Description { get; init; }
Property Value
ExpiresAt
Optional expiration. If null, DefaultExpirationDays is used.
public DateTimeOffset? ExpiresAt { get; init; }
Property Value
PrincipalId
The principal the key is issued to.
public string PrincipalId { get; init; }
Property Value
PrincipalType
The type of principal.
public PrincipalType PrincipalType { get; init; }
Property Value
Scopes
The scopes/permissions this key grants.
public IReadOnlyList<string> Scopes { get; init; }