OpsFusion.Licensing 10.0.1

dotnet add package OpsFusion.Licensing --version 10.0.1
                    
NuGet\Install-Package OpsFusion.Licensing -Version 10.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpsFusion.Licensing" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpsFusion.Licensing" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="OpsFusion.Licensing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpsFusion.Licensing --version 10.0.1
                    
#r "nuget: OpsFusion.Licensing, 10.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpsFusion.Licensing@10.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpsFusion.Licensing&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=OpsFusion.Licensing&version=10.0.1
                    
Install as a Cake Tool

OpsFusion.Licensing

OpsFusion.Licensing provides reusable licensing primitives and optional API endpoint mapping for .NET services.

Features

  • License token payload model
  • License key generation and validation
  • Storage codec helpers for license documents
  • Reusable minimal API endpoint for license generation

Install

dotnet add package OpsFusion.Licensing

Core Usage (Library)

var payload = new LicenseTokenPayload(
    ProductCode: "OpsFusion.POS.Desktop",
    Subject: "customer@example.com",
    ExpiresAtUtc: DateTimeOffset.UtcNow.AddDays(30),
    NotBeforeUtc: DateTimeOffset.UtcNow,
    TenantId: "tenant-001",
    MachineId: null,
    PlanCode: "pro");

string licenseKey = LicenseKeyGenerator.Generate(payload, "your-signing-key");

Reusable API Integration

In Program.cs:

builder.Services.AddOpsFusionLicensingApi(builder.Configuration);

// ...

app.MapOpsFusionLicensingApi();

Default endpoint:

  • POST /api/v1/licenses/generate

Configuration

{
  "LicensingApi": {
    "ProductCode": "OpsFusion.POS.Desktop",
    "SigningKey": "your-signing-key",
    "ApiKey": "optional-api-key",
    "MinDurationDays": 1,
    "MaxDurationDays": 3650,
    "RoutePrefix": "/api/v1/licenses"
  }
}

Request Body

{
  "subject": "customer@example.com",
  "tenantId": "tenant-001",
  "planCode": "pro",
  "durationDays": 365,
  "startAtUtc": "2026-05-03T00:00:00Z"
}
  • X-License-Api-Key: <value> (required only if LicensingApi:ApiKey is configured)

Success Response

{
  "success": true,
  "data": {
    "licenseKey": "...",
    "notBeforeUtc": "2026-05-03T00:00:00Z",
    "expiresAtUtc": "2027-05-03T00:00:00Z",
    "productCode": "OpsFusion.POS.Desktop",
    "subject": "customer@example.com",
    "tenantId": "tenant-001",
    "planCode": "pro"
  },
  "error": null
}

Notes

  • If SigningKey is empty, runtime fallback order is:
    1. POS_LICENSE_SIGNING_KEY environment variable
    2. Jwt:SigningKey configuration key
  • Keep signing keys secret and rotate periodically.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.1 118 5/2/2026
10.0.0 109 4/27/2026