IBeam.Licensing.Api 2.8.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package IBeam.Licensing.Api --version 2.8.2
                    
NuGet\Install-Package IBeam.Licensing.Api -Version 2.8.2
                    
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="IBeam.Licensing.Api" Version="2.8.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IBeam.Licensing.Api" Version="2.8.2" />
                    
Directory.Packages.props
<PackageReference Include="IBeam.Licensing.Api" />
                    
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 IBeam.Licensing.Api --version 2.8.2
                    
#r "nuget: IBeam.Licensing.Api, 2.8.2"
                    
#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 IBeam.Licensing.Api@2.8.2
                    
#: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=IBeam.Licensing.Api&version=2.8.2
                    
Install as a Cake Addin
#tool nuget:?package=IBeam.Licensing.Api&version=2.8.2
                    
Install as a Cake Tool

IBeam.Licensing.Api

IBeam.Licensing.Api provides optional ASP.NET Core endpoint wiring for IBeam tenant application licensing.

dotnet add package IBeam.Licensing.Api

When To Use This

  • You want HTTP endpoints for plan lookup, tenant license management, seat assignment, and entitlement checks.
  • You want admins or internal tools to manage tenant licensing dynamically.
  • You want thin API endpoints that delegate licensing rules to IBeam.Licensing.Services.

Do not expose this package without host authentication and authorization. License administration is a privileged surface.

What This Package Contains

Area Type(s) Purpose
Endpoint mapping MapIBeamLicensing(...) Adds licensing route groups to an ASP.NET Core app.
Registration helper AddIBeamLicensingApi(...) Registers licensing services needed by the endpoint layer.
Plan endpoints Minimal API handlers Lists configured license plans.
Tenant license endpoints Minimal API handlers Grants, updates, lists, and revokes tenant licenses.
Seat endpoints Minimal API handlers Assigns and revokes license seats.
Entitlement endpoints Minimal API handlers Lists/checks tenant entitlements.

Architecture Fit

API <-- DTO/model object --> Service <-- Entity --> Repository

This package is API-only. Endpoints bind request data, call licensing services, and return responses. Business rules, entitlement checks, and audit boundaries belong in the service layer.

Quick Start

using IBeam.Licensing.Api;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddAuthentication();
builder.Services.AddAuthorization();
builder.Services.AddIBeamLicensingApi(builder.Configuration);

var app = builder.Build();

app.UseAuthentication();
app.UseAuthorization();

app.MapIBeamLicensing("/api", "TenantAdmin");

app.Run();

Endpoint Overview

GET    /api/license-plans
GET    /api/tenants/{tenantId}/licenses
POST   /api/tenants/{tenantId}/licenses
PUT    /api/tenants/{tenantId}/licenses/{licenseId}
POST   /api/tenants/{tenantId}/licenses/{licenseId}/revoke
GET    /api/tenants/{tenantId}/licenses/{licenseId}/assignments
POST   /api/tenants/{tenantId}/licenses/{licenseId}/assignments
DELETE /api/tenants/{tenantId}/licenses/{licenseId}/assignments/{assignmentId}
GET    /api/tenants/{tenantId}/license-entitlements
POST   /api/tenants/{tenantId}/license-entitlements/check

Example license grant:

POST /api/tenants/225925cc-995e-4584-a63b-4f2cb4f38f6f/licenses
Content-Type: application/json

{
  "planKey": "hubbsly-work",
  "providerName": "stripe",
  "providerCustomerId": "cus_123",
  "providerSubscriptionId": "sub_123"
}

Example seat assignment:

POST /api/tenants/225925cc-995e-4584-a63b-4f2cb4f38f6f/licenses/{licenseId}/assignments
Content-Type: application/json

{
  "subject": {
    "subjectType": "agent",
    "subjectId": "codex",
    "displayName": "Codex"
  }
}

Example entitlement check:

POST /api/tenants/225925cc-995e-4584-a63b-4f2cb4f38f6f/license-entitlements/check
Content-Type: application/json

{
  "subject": {
    "subjectType": "agent",
    "subjectId": "codex"
  },
  "entitlement": "work:cards:create"
}

Configuration

{
  "IBeam": {
    "Licensing": {
      "Plans": [
        {
          "Key": "hubbsly-work",
          "DisplayName": "Hubbsly Work",
          "Entitlements": [ "feature:work", "work:cards:create", "mcp:tools" ],
          "Limits": {
            "Seats": 4,
            "McpCallsPerMonth": 10000
          }
        }
      ]
    }
  }
}

Data Storage

This API package does not create tables or repositories. It uses the store configured by IBeam.Licensing.Services. The default services package registers an in-memory store; production hosts should replace ILicensingStore.

Service Operations, Auditing, And Permissions

Licensing endpoints do not replace Identity authorization. Host APIs should authenticate the user, API credential, or agent and check tenant roles/API scopes before allowing license administration.

The underlying services expose operation tags such as licensing.licenses.grant and licensing.seats.assign, so IBeam service policies and audit logging can be applied at the service boundary.

Extended Docs And Agent Guidance

Agents should keep this package thin and put new licensing behavior in services.

Troubleshooting

Problem Likely Cause Fix
Endpoints return 401/403 Host authentication or policy is not satisfied Verify UseAuthentication, UseAuthorization, and the mapping policy.
License changes disappear Default in-memory store is active Register a persistent ILicensingStore.
Entitlement check fails unexpectedly Plan key, entitlement name, license status, or seat is wrong Inspect configured plans, active licenses, and assignments.

Version Notes

  • Targets net10.0.
  • Built for optional runtime licensing management.
  • Package version is assigned by the repository release workflow.
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.

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
2.9.45 141 8/10/2026
2.9.44 99 8/3/2026
2.9.43 98 7/29/2026
2.9.1 96 7/23/2026
2.9.0 97 7/21/2026
2.8.2 97 7/21/2026
2.8.1 92 7/21/2026
2.8.0 99 7/21/2026
2.7.0 92 7/21/2026
2.6.0 98 7/20/2026
2.5.0 94 7/17/2026
2.4.2 102 7/16/2026
2.4.1 100 7/14/2026
2.4.0 112 6/24/2026
2.3.0 116 6/24/2026