#### [Abblix\.Oidc\.Server](https://www.abblix.com/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Features\.Licensing](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing 'Abblix\.Oidc\.Server\.Features\.Licensing')

## LicenseLoader Class

Handles the loading and validation of application licenses provided as JSON Web Tokens \(JWT\)\.

```csharp
public static class LicenseLoader
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object '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 {#Abblix.Oidc.Server.Features.Licensing.LicenseLoader.LoadAsync(string)}

Asynchronously loads and validates the license JWT, applying the license details upon successful validation\.

```csharp
public static System.Threading.Tasks.Task LoadAsync(string licenseJwt);
```
#### Parameters

###### `licenseJwt` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Licensing.LicenseLoader.LoadAsync(string).licenseJwt}

The license JWT string to be loaded and validated\.

#### Returns
[System\.Threading\.Tasks\.Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task 'System\.Threading\.Tasks\.Task')  
A [System\.Threading\.Tasks\.Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task 'System\.Threading\.Tasks\.Task') representing the asynchronous operation\.

#### Exceptions

[System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException')  
Thrown if the JWT type is not valid or if the license cannot be validated\.

[UnexpectedTypeException](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Exceptions.UnexpectedTypeException 'Abblix\.Oidc\.Server\.Common\.Exceptions\.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\.
