IBeam.Licensing.Services 2.8.0

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

IBeam.Licensing.Services

IBeam.Licensing.Services provides the service-layer implementation for IBeam tenant licensing: plan lookup, tenant license grants, license updates/revocation, seat assignment, and entitlement authorization.

dotnet add package IBeam.Licensing.Services

For ASP.NET Core endpoints, use IBeam.Licensing.Api.

When To Use This

  • You want runtime services for tenant license administration.
  • You need ILicenseAuthorizer to guard product features.
  • You want service-operation tags and audit support around licensing mutations.
  • You want an in-memory licensing store for tests, local development, or simple prototypes.

What This Package Contains

Area Type(s) Purpose
Plan catalog ConfigurationLicensePlanCatalogProvider Reads plan definitions from IBeam:Licensing.
Tenant licenses TenantLicenseService Grants, updates, lists, and revokes tenant licenses.
Seat assignments LicenseSeatAssignmentService Assigns and revokes seats for users, credentials, agents, or external subjects.
Entitlement checks LicenseAuthorizer Checks tenant license status, entitlements, and seat requirements.
Store in-memory ILicensingStore implementation Default development/test persistence.
DI AddIBeamLicensingServices(...) Registers the licensing service stack.

Architecture Fit

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

This package is the service layer. Licensing business rules live here. APIs should call these services, and repository implementations should persist state without owning authorization decisions.

Quick Start

using IBeam.Licensing.Services;

builder.Services.AddIBeamLicensingServices(builder.Configuration);

Configure plans:

{
  "IBeam": {
    "Licensing": {
      "Plans": [
        {
          "Key": "hubbsly-work",
          "DisplayName": "Hubbsly Work",
          "Description": "Work module access for users and agents.",
          "Entitlements": [ "feature:work", "work:cards:create", "mcp:tools" ],
          "Limits": {
            "Seats": 4,
            "McpCallsPerMonth": 10000
          },
          "Metadata": {
            "product": "hubbsly",
            "module": "work"
          }
        }
      ]
    }
  }
}

Grant a tenant license:

var license = await tenantLicenses.GrantLicenseAsync(
    tenantId,
    new GrantTenantLicenseRequest
    {
        PlanKey = "hubbsly-work",
        ProviderName = "stripe",
        ProviderCustomerId = "cus_123",
        ProviderSubscriptionId = "sub_123"
    },
    createdByUserId,
    ct);

Assign a seat:

await seatAssignments.AssignSeatAsync(
    tenantId,
    license.LicenseId,
    new AssignLicenseSeatRequest
    {
        Subject = new LicenseSubject(LicenseSubjectTypes.Agent, "codex")
    },
    createdByUserId,
    ct);

Check access before a feature runs:

await licenseAuthorizer.RequireEntitlementAsync(
    tenantId,
    new LicenseSubject(LicenseSubjectTypes.User, userId.ToString()),
    "work:cards:create",
    ct);

Service Operations

Licensing mutation methods are tagged with IBeam operation names. These names are used by service policies, audit logging, and future permission tooling.

Service Class Operation Representative Method Operations
Tenant licenses licensing.licenses licensing.licenses.list, licensing.licenses.grant, licensing.licenses.update, licensing.licenses.revoke
Seat assignments licensing.seats licensing.seats.list, licensing.seats.assign, licensing.seats.revoke

Example policy:

{
  "IBeam": {
    "Services": {
      "Authorization": {
        "Operations": {
          "licensing.licenses.grant": {
            "AllowedRoles": [ "Owner", "Admin" ]
          },
          "licensing.seats.revoke": {
            "AllowedRoles": [ "Owner", "Admin" ]
          }
        }
      }
    }
  }
}

Auditing

When IBeam service auditing is enabled, license grants, updates, revocations, and seat mutations should be captured at the service boundary. The audit record should describe the database-facing entity state before and after mutation, not an API DTO decorated with external data.

Data Storage

The bundled store is in-memory and intended for local development, tests, and simple hosts. Production applications should replace ILicensingStore with an Azure Table, EF, SQL, or application-specific provider.

builder.Services.AddIBeamLicensingServices(builder.Configuration);
builder.Services.AddScoped<ILicensingStore, MyLicensingStore>();

Register the replacement after AddIBeamLicensingServices so the host application's store wins.

Extension Points

Extension Point Interface Why Replace It
License persistence ILicensingStore Store licenses and seats in the host data platform.
Plan catalog ILicensePlanCatalogProvider Load plans from database, billing provider, or another config source.
Entitlement checks ILicenseAuthorizer Add product-specific quota or billing-state rules.
Provider hooks ILicenseExtension Integrate Stripe, Azure Marketplace, manual grants, or custom billing.

Extended Docs And Agent Guidance

Agents should tag new custom licensing methods with [IBeamOperation("licensing.<area>.<action>")] and route work through IServiceOperationExecutor when policy/audit behavior is required.

Troubleshooting

Problem Likely Cause Fix
Entitlement check fails Tenant has no active license with the entitlement Verify plan configuration and tenant license status.
Seat check fails Subject does not have an active assignment Assign a seat or use a plan/rule that does not require one.
Data disappears after restart In-memory store is active Register a persistent ILicensingStore.
Audits are missing Service auditing not configured Register IBeam service auditing and a sink/logger package.

Version Notes

  • Targets net10.0.
  • Uses IBeam service-operation patterns.
  • 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 (1)

Showing the top 1 NuGet packages that depend on IBeam.Licensing.Services:

Package Downloads
IBeam.Licensing.Api

ASP.NET Core endpoint wiring for IBeam tenant application licensing.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.9.1 63 7/23/2026
2.9.0 85 7/21/2026
2.8.2 86 7/21/2026
2.8.1 78 7/21/2026
2.8.0 83 7/21/2026
2.7.0 88 7/21/2026
2.6.0 99 7/20/2026
2.5.0 101 7/17/2026
2.4.2 106 7/16/2026
2.4.1 99 7/14/2026
2.4.0 122 6/24/2026
2.3.0 119 6/24/2026