ApiKeyDraft
Namespace AgentPrism · Assembly
AgentPrism.Abstractions.dllA draft for creating an API key.
public sealed record ApiKeyDraft : IEquatable<ApiKeyDraft>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The raw value, digest, and prefix are generated by IApiKeyStore.CreateAsync; the draft carries only the information given by the operator.
Constructors
Section titled “Constructors”ApiKeyDraft()
Section titled “ ApiKeyDraft()”public ApiKeyDraft()Properties
Section titled “Properties”ExpiresAt
Section titled “ ExpiresAt”The expiration. Never expires if null.
public DateTimeOffset? ExpiresAt { get; init; }Property Value
Section titled “Property Value”The name for the operator to recognize the key by.
public required string Name { get; init; }Property Value
Section titled “Property Value”Scopes
Section titled “ Scopes”The scope set. Must not be empty.
public required IReadOnlyList<ApiKeyScope> Scopes { get; init; }Property Value
Section titled “Property Value”TenantId
Section titled “ TenantId”The tenant the key is bound to.
public required string TenantId { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(ApiKeyDraft?)
Section titled “ Equals(ApiKeyDraft?)”public bool Equals(ApiKeyDraft? other)Parameters
Section titled “Parameters”other ApiKeyDraft?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(ApiKeyDraft?, ApiKeyDraft?)
Section titled “ operator ==(ApiKeyDraft?, ApiKeyDraft?)”public static bool operator ==(ApiKeyDraft? left, ApiKeyDraft? right)Parameters
Section titled “Parameters”left ApiKeyDraft?
right ApiKeyDraft?
Returns
Section titled “Returns”operator !=(ApiKeyDraft?, ApiKeyDraft?)
Section titled “ operator !=(ApiKeyDraft?, ApiKeyDraft?)”public static bool operator !=(ApiKeyDraft? left, ApiKeyDraft? right)Parameters
Section titled “Parameters”left ApiKeyDraft?
right ApiKeyDraft?