LicenseLoader Class
Handles the loading and validation of application licenses provided as JSON Web Tokens (JWT).
public static class LicenseLoaderInheritance System.Object → LicenseLoader
Remarks
This class is responsible for validating the integrity and authenticity of the license JWT against predefined criteria, including issuer validation and signature verification. Upon successful validation, it extracts and applies license details to configure application features and limits accordingly.
Methods
LicenseLoader.LoadAsync(string) Method
Asynchronously loads and validates the license JWT, applying the license details upon successful validation.
public static System.Threading.Tasks.Task LoadAsync(string licenseJwt);Parameters
licenseJwt System.String
The license JWT string to be loaded and validated.
Returns
System.Threading.Tasks.Task
A System.Threading.Tasks.Task representing the asynchronous operation.
Exceptions
System.InvalidOperationException
Thrown if the JWT type is not valid or if the license cannot be validated.
UnexpectedTypeException
Thrown if an unexpected validation result type is encountered.
Remarks
Loading reports nothing, deliberately. A caller loads licenses one at a time, so every load but the last sees a partial set, and a license in its grace period would be announced before the renewal superseding it had arrived - once per superseded license, and only in the arrival order that puts the older one first. What the licenses mean is said on the next consult instead, and once at startup by the hosted service the registration extensions install, which is the moment the set has provably stopped growing.
A host loading licenses through this method after startup therefore gets no record from the load itself. The consult that follows says everything except that a license still valid is expiring soon, which is the one status a valid cached license never reaches.