Sidub.Licensing.Client
2.0.10
Prefix Reserved
dotnet add package Sidub.Licensing.Client --version 2.0.10
NuGet\Install-Package Sidub.Licensing.Client -Version 2.0.10
<PackageReference Include="Sidub.Licensing.Client" Version="2.0.10" />
<PackageVersion Include="Sidub.Licensing.Client" Version="2.0.10" />
<PackageReference Include="Sidub.Licensing.Client" />
paket add Sidub.Licensing.Client --version 2.0.10
#r "nuget: Sidub.Licensing.Client, 2.0.10"
#:package Sidub.Licensing.Client@2.0.10
#addin nuget:?package=Sidub.Licensing.Client&version=2.0.10
#tool nuget:?package=Sidub.Licensing.Client&version=2.0.10
Sidub.Licensing.Client
.NET client SDK for Monaiq licensing by Sidub — license enforcement, feature gating, rate limiting, and metered consumption reporting for applications that hold a Monaiq license.
Install
dotnet add package Sidub.Licensing.Client
Targets netstandard2.1 — usable from .NET Core 3.0+, .NET 5+ and modern .NET.
Setup
Register the SDK and bind your credential. The encoded credential (SIDUB_LIC_…) comes from the Monaiq portal or your license-delivery email and bundles everything the SDK needs.
using Sidub.Licensing;
using Sidub.Licensing.Client;
builder.Services.Configure<LicensingServiceOptions>(options =>
{
options.LicenseServiceUri = "https://api.monaiq.com/licensing";
options.ConsumptionServiceUri = "https://api.monaiq.com/consumption";
options.EncodedCredential = builder.Configuration["Licensing:EncodedCredential"];
});
builder.Services.AddSidubLicensing();
Check a license
ILicensingService is the enforcement surface: fetch a signed authorization, gate features against it, and record metered operations. The LicensingContextAccessor resolves the configured credential.
using Sidub.Licensing;
using Sidub.Licensing.Context;
using Sidub.Licensing.Exceptions;
using Sidub.Licensing.Features;
using Sidub.Licensing.Services;
public sealed class ReportService(ILicensingService licensing, LicensingContextAccessor contextAccessor)
{
private static readonly LicensingServiceReference ServiceReference = new();
public async Task RunAsync()
{
var context = await contextAccessor.GetContextAsync()
?? throw new InvalidOperationException("No license is configured.");
// A cryptographically signed, cached authorization for the configured license.
var authorization = await licensing.GetAuthorization(ServiceReference, context);
// Gate a rate-limited feature; the sliding window is enforced locally.
// GetLicenseFeature returns null when the license does not carry the feature —
// handle that as "not licensed", never suppress it with the ! operator.
var feature = await licensing.GetLicenseFeature<RateLimitLicenseFeature>(
ServiceReference, context, "reports.generate");
if (feature is null)
{
// The feature is not on this license — surface an upgrade path to the user.
return;
}
try
{
await licensing.PerformOperation<RateLimitLicenseFeature, RateLimitLicenseFeatureState>(
ServiceReference, context, new RateLimitLicenseFeatureOperation(feature, 1));
}
catch (RateLimitException)
{
// The throw IS the enforcement signal — surface an upgrade path to the user.
}
}
}
AssertLicense evaluates declarative assertions (feature existence, service access, rate limits) against an authorization; rate-limit violations throw RateLimitException rather than returning false.
Sell from inside your app
An application you distribute — desktop, mobile, CLI — can sell your offerings from inside itself
with IPurchaseClient. The buyer signs in with their Monaiq identity and buys with their own
token; no key of yours ships with the app, and the client never sends one.
using Sidub.Licensing.Checkout;
using Sidub.Licensing.Client;
using Sidub.Licensing.Client.Purchase;
builder.Services.AddSidubLicensingPurchaseClient(options =>
{
options.PurchaseServiceUri = "https://api.monaiq.com/purchase";
options.AccessTokenProvider = ct => signIn.AcquireAccessTokenAsync(ct); // MSAL (desktop) or native auth (mobile)
});
// Read the catalog live (anonymous), then buy as the signed-in buyer.
var catalog = await purchase.ListOfferingsAsync(issuerClientId);
var session = await purchase.CreateCheckoutAsync(new PurchaseCheckoutRequest
{
RequestId = Guid.NewGuid(), // idempotency key — reuse on retry
OfferingId = offering.Id,
IssuerClientId = issuerClientId
});
if (session.SessionUrl is not null)
OpenSystemBrowser(session.SessionUrl); // paid: Stripe Checkout; free: null, license already minted
var result = await purchase.PollResultAsync(session.SessionId);
// result.EncodedCredential is the credential the runtime SDK takes.
The guide, the sign-in options and the raw HTTP contract: https://docs.monaiq.com/integrate/in-app-purchase/
Resilience built in
- Authorization fetches retry transient failures with bounded backoff and a per-attempt timeout; exhaustion surfaces as a typed
LicenseAuthorizationUnavailableException. - The last signature-verified authorization bridges brief API outages inside a bounded grace window — denials and revocations are never bridged.
- Metered consumption is buffered, aggregated, and delivered with exactly-once submission identity; buffered usage flushes on shutdown.
Structured errors
API failures surface as LicensingApiException carrying the server's error contract: a
machine-readable Code (PascalCase, e.g. ValidationError, AuthorizationDenied), the
CorrelationId to quote when contacting support, the HTTP StatusCode, structured
Details, and the server's Retry-After hint when backpressure applies. Branch on Code,
not on message text.
Learn more
- Documentation: https://docs.monaiq.com
- Getting started: https://docs.monaiq.com/integrate/
- .NET quickstart: https://docs.monaiq.com/integrate/dotnet/
- Support: https://docs.monaiq.com/resources/legal-and-support/
© Sidub Inc. Proprietary license — see the LICENSE file.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.Extensions.Caching.Memory (>= 10.0.7)
- Microsoft.Extensions.Http (>= 10.0.7)
- Sidub.Licensing (>= 2.0.10)
- Sidub.Platform.Authentication.Gremlin (>= 1.10.53)
- Sidub.Platform.Cryptography.AzureKeyVault (>= 1.10.53)
- Sidub.Platform.Storage (>= 1.10.53)
- Sidub.Platform.Storage.Gremlin (>= 1.10.53)
- Sidub.Platform.Storage.Http (>= 1.10.53)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Sidub.Licensing.Client:
| Package | Downloads |
|---|---|
|
Docuoria
Deterministic, local-first PDF data extraction pipeline. Template-driven extract / classify / dry-run / execute engine with a CLI script surface suitable for AI agent automation. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.10 | 157 | 9/10/2026 |
| 1.6.13 | 104 | 9/3/2026 |
| 1.6.7 | 99 | 8/31/2026 |
| 1.6.0 | 110 | 8/30/2026 |
| 1.5.170 | 103 | 8/19/2026 |
| 1.5.87 | 100 | 8/9/2026 |
| 1.5.85 | 104 | 8/8/2026 |
| 1.5.74 | 109 | 8/3/2026 |
| 1.5.73 | 110 | 8/3/2026 |
| 1.5.72 | 108 | 8/3/2026 |
| 1.5.59 | 116 | 8/2/2026 |
| 1.5.57 | 109 | 8/1/2026 |
| 1.5.55 | 111 | 7/31/2026 |
| 1.5.51 | 112 | 7/31/2026 |
| 1.5.48 | 112 | 7/30/2026 |
| 1.5.1 | 169 | 3/24/2026 |
| 1.4.0 | 122 | 3/21/2026 |
| 1.3.44 | 119 | 3/17/2026 |
| 1.3.43 | 139 | 3/17/2026 |
| 1.3.38 | 129 | 3/7/2026 |