IBeam.Licensing 2.9.43

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

IBeam.Licensing

IBeam.Licensing contains the core licensing contracts, request/response models, plan models, subject model, and option objects used by IBeam-backed applications.

Install this package when shared application code needs to understand licensing concepts without taking a dependency on the service or API implementation.

dotnet add package IBeam.Licensing

When To Use This

  • You need common licensing models in API, service, worker, or integration projects.
  • You want to check whether a tenant has an entitlement such as work:cards:create.
  • You need to represent seats for users, API credentials, agents, or external subjects.
  • You are building your own licensing store or API layer and only need contracts.

Licensing is intentionally separate from Identity. Identity answers who the caller is and which roles/scopes they have. Licensing answers whether the tenant purchased or was granted the capability being used.

What This Package Contains

Area Type(s) Purpose
Plan catalog LicenseProductInfo, LicensePlanInfo, LicensePlanOptions, ILicensePlanCatalogProvider Defines products, plans, entitlements, limits, default seats, default credit grants, provider price references, and metadata.
Tenant licenses TenantLicense, GrantTenantLicenseRequest, UpdateTenantLicenseRequest, ITenantLicenseService Represents a tenant's active/revoked product license.
Seat assignments LicenseSeatAssignment, AssignLicenseSeatRequest, ILicenseSeatAssignmentService Links a license to a user, API credential, agent, or external subject.
Seat policy helpers GrantSingleUserLicenseRequest, GrantTenantSeatLicenseRequest, ILicenseSeatPolicyService Provides one-call workflows for solo purchases and tenant/team seat grants.
Authorization ILicenseAuthorizer, LicenseAuthorizationResult Checks whether a subject can use an entitlement.
Gate ILicenseGate, LicenseGateRequest, LicenseGateResult Returns structured allow/deny details for entitlement and seat checks.
Store contract ILicensingStore Persistence boundary for licenses and seat assignments.
Extensibility ILicenseExtension Hook for provider-specific or app-specific licensing behavior.

Architecture Fit

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

This package is the model/contract layer. It does not own HTTP endpoints, database tables, or provider integrations. Services make licensing decisions, repositories persist licensing data, and APIs only expose service calls.

Core Concepts

Concept Plain-English Meaning
Product The sellable product family a plan belongs to.
Plan The product package a tenant can buy or receive.
Plan level A host-defined ordering such as basic, pro, or enterprise.
Entitlement A named capability, such as feature:work or work:cards:create.
Limit A numeric quota, such as seats or monthly calls.
Credit grant A plan-provided consumption allowance for a host-defined bucket.
Tenant license A plan granted to one tenant.
Seat assignment A subject consuming a seat on a tenant license.
Subject The thing using the product: user, API credential, agent, or external identity.

License Lifecycle

Tenant licenses distinguish runtime grant status from commercial billing state:

Field Meaning
Status Runtime grant state such as active, trialing, grace, manual, suspended, expired, or revoked.
CommercialStatus Commercial state such as paid, trial, grace, past-due, canceled, manual, or support-granted.
StartsUtc / ExpiresUtc Runtime validity window for the grant.
GraceEndsUtc Optional runtime grace window after expiration.

Use EvaluateRuntimeEligibility(now) when you need a structured runtime decision. IsActive(now) remains available for existing consumers and returns the runtime eligibility result.

Code Example

Typical service-layer usage:

public sealed class WorkCardService
{
    private readonly ILicenseAuthorizer _licenses;

    public WorkCardService(ILicenseAuthorizer licenses)
    {
        _licenses = licenses;
    }

    public async Task CreateCardAsync(Guid tenantId, Guid userId, CancellationToken ct)
    {
        await _licenses.RequireEntitlementAsync(
            tenantId,
            new LicenseSubject(LicenseSubjectTypes.User, userId.ToString()),
            "work:cards:create",
            ct);

        // Continue with the licensed operation.
    }
}

Identity and Licensing are often checked together:

await _roleAccess.AuthorizeAsync(user, "work:write", ct);
await _licenses.RequireEntitlementAsync(tenantId, subject, "work:cards:create", ct);

For API credential and MCP scenarios, treat the API credential scope as the authenticated permission and the license entitlement as the purchased capability:

API credential scope: api-scope:work
License entitlement: work:cards:create

For structured runtime decisions, use the gate:

var gateResult = await licenseGate.CheckAsync(
    new LicenseGateRequest
    {
        TenantId = tenantId,
        Subject = new LicenseSubject(LicenseSubjectTypes.User, userId.ToString()),
        Entitlement = "work:cards:create",
        OperationName = "work.cards.create"
    },
    ct);

if (!gateResult.Allowed)
{
    // Route by gateResult.DenialCode, such as missing-seat or missing-entitlement.
}

Configuration Shape

Plans are usually configured under IBeam:Licensing:

{
  "IBeam": {
    "Licensing": {
      "Products": [
        {
          "Key": "hubbsly",
          "DisplayName": "Hubbsly"
        }
      ],
      "Plans": [
        {
          "Key": "hubbsly-work",
          "ProductKey": "hubbsly",
          "DisplayName": "Hubbsly Work",
          "Classification": "tenant",
          "Level": 2,
          "Entitlements": [ "feature:work", "work:cards:create" ],
          "Limits": {
            "Seats": 4
          },
          "DefaultSeatLimit": 4,
          "DefaultCreditGrants": [
            {
              "BucketKey": "ai-chat",
              "Amount": 500,
              "Period": "monthly"
            }
          ],
          "ProviderPrices": [
            {
              "ProviderName": "stripe",
              "PriceId": "price_123",
              "Currency": "USD",
              "BillingPeriod": "monthly"
            }
          ]
        }
      ]
    }
  }
}

Service Operations, Auditing, And Permissions

This core package only defines contracts. Runtime service operations are tagged in IBeam.Licensing.Services so IBeam service policies and audit logging can protect calls such as license grants, updates, revocations, and seat assignment changes.

Data Storage

This package does not create tables or data stores.

Storage Item Created By This Package Notes
License plan data No Plans come from configuration by default.
Tenant license data No Persist through an ILicensingStore implementation.
Seat assignment data No Persist through an ILicensingStore implementation.

Package Relationships

Package Role
IBeam.Licensing Core contracts and models.
IBeam.Licensing.Services Service-layer orchestration and entitlement checks.
IBeam.Licensing.Api Optional ASP.NET Core endpoints.

Extended Docs And Agent Guidance

Agents should keep licensing checks in services. Controllers should call services and translate responses only.

Version Notes

  • Targets net10.0.
  • Designed to work with IBeam Identity or bring-your-own authentication.
  • 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.
  • net10.0

    • No dependencies.

NuGet packages (4)

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

Package Downloads
IBeam.Licensing.Services

Tenant licensing services, plan catalog, entitlement authorization, and in-memory store for IBeam-backed applications.

IBeam.Billing.Licensing

Provider-agnostic reconciliation from IBeam billing state into IBeam license grants.

IBeam.Commerce.Repositories.AzureTable

Azure Table Storage providers for IBeam licensing, billing, and credit stores.

IBeam.Licensing.Credits

Optional IBeam integration that combines license entitlement checks with credit reservations and settlements.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.9.43 60 7/29/2026
2.9.1 122 7/23/2026
2.9.0 116 7/21/2026
2.8.2 113 7/21/2026
2.8.1 104 7/21/2026
2.8.0 112 7/21/2026
2.7.0 108 7/21/2026
2.6.0 122 7/20/2026
2.5.0 121 7/17/2026
2.4.2 121 7/16/2026
2.4.1 110 7/14/2026
2.4.0 131 6/24/2026
2.3.0 126 6/24/2026