LicenseValidationResult
Models & Types · AiDotNet.Models
Contains the result of a license key validation attempt.
For Beginners
After the license validator contacts the server (or checks its cache), this object tells you whether the key is valid, what tier the user is on, how many seats are used, and when the key expires.
Constructors
| Constructor | Summary |
|---|---|
LicenseValidationResult(LicenseKeyStatus status, string tier, DateTimeOffset? expiresAt, int seatsUsed, int? seatsMax, DateTimeOffset? validatedAt, string message, byte[] decryptionToken, IReadOnlyList<string> capabilities) |
Creates a new LicenseValidationResult. |
Properties
| Property | Summary |
|---|---|
DateTimeOffset ValidatedAt { get; } |
Gets the UTC timestamp of when this validation was performed. |
DateTimeOffset? ExpiresAt { get; } |
Gets the expiration date of the license, or null if it does not expire. |
IReadOnlyList<string> Capabilities { get; } |
Gets the namespace-prefixed capability strings (e.g., tensors:save, tensors:load, model:save, model:load) the server returned for the validated license. |
LicenseKeyStatus Status { get; } |
Gets the validation status of the license key. |
byte[] DecryptionToken { get; } |
Gets a copy of the server-side decryption token for Layer 2 key escrow, or null if not available. |
int SeatsUsed { get; } |
Gets the number of seats currently in use for this license. |
int? SeatsMax { get; } |
Gets the maximum number of seats allowed for this license, or null if unlimited. |
string Message { get; } |
Gets an optional human-readable message from the server. |
string Tier { get; } |
Gets the subscription tier associated with this license, or null if unknown. |
Methods
| Method | Summary |
|---|---|
bool HasCapability(string capability) |
Returns true if the server granted the named capability for this license. |