LumoAuth 1.6.0

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

LumoAuth

The official LumoAuth SDK for .NET 8 and newer. It lets .NET code ask whether a user or an AI agent may do something, and act on the answer:

  • Authorization checks: role-based (RBAC), relationship-based (Zanzibar) and attribute-based (ABAC).
  • Sign-in: OAuth 2.1 and OpenID Connect, including an authorization-code flow with PKCE.
  • AI agents: capabilities, budgets, human approvals, Just-in-Time (JIT) permissions, delegation, MCP tokens, MCP tool checks and AAuth request signing.

Every call is async and accepts a CancellationToken. Every failure is an exception that you can catch by type.

Install

dotnet add package LumoAuth

The package targets .NET 8. Its only dependency is BouncyCastle.Cryptography, which is used for Ed25519 keys.

Quick start

using LumoAuth;
using LumoAuth.Models;

// Reads LUMOAUTH_URL, LUMOAUTH_ORG_ID and LUMOAUTH_API_KEY
using var lumo = LumoAuthClient.FromEnvironment();

bool canEdit = await lumo.Permissions.CheckAsync("document.edit");
bool canView = await lumo.Zanzibar.IsViewerAsync("document:readme", "user:bob");

An AI agent uses LumoAgent, which fetches and refreshes its own token:

// Reads AGENT_CLIENT_ID, AGENT_CLIENT_SECRET and LUMOAUTH_ORG_ID
using var agent = LumoAgent.FromEnvironment();

ApprovalResult ok = await agent.Approvals.RequireAsync(new ApprovalRequest
{
    TaskId = "wire-001",
    Reason = "Wire $4,500 to INV-7741",
    OnBehalfOf = "ada@acme.com",
    Impact = ApprovalImpact.High,
});

Configuration

Environment variable Option Meaning Default
LUMOAUTH_URL BaseUrl LumoAuth region URL. The EU region is https://eu.app.lumoauth.dev. https://app.lumoauth.dev
LUMOAUTH_ORG_ID OrgId Your organization's slug none
LUMOAUTH_API_KEY ApiKey Organization API key, sent as X-API-Key none
AGENT_CLIENT_ID LumoAgentOptions.ClientId Agent OAuth client ID none
AGENT_CLIENT_SECRET LumoAgentOptions.ClientSecret Agent OAuth client secret none

A user access token goes in AccessToken or TokenProvider, or you can call lumo.WithAccessToken(token). Organization API keys work only on the admin API, client registration and the permission and Zanzibar checks. The ABAC routes need a user access token. Some calls also need an OAuth scope on that token, for example authz:read to list permissions or abac:read for ABAC.

Main types

Type Namespace What it does
LumoAuthClient LumoAuth The client. Its namespaces are Permissions, Zanzibar, Abac, Auth, Agents, Approvals, Jit, Delegation and Mcp.
LumoAgent LumoAuth An agent client that manages its own token.
JitContext LumoAuth Runs one JIT task and revokes its tokens when disposed.
DelegationChain LumoAuth Lets an agent act on behalf of a user.
AuthorizationCodeFlow LumoAuth.Web Signs users in with the authorization-code flow and PKCE.
AAuthClient, AAuthVerifier, JwksCache LumoAuth.AAuth Agent request signing and token verification.
LumoAuthException and subclasses LumoAuth.Errors The error types. A 403 caused by a missing scope lists the scopes in RequiredScopes.

Building an ASP.NET Core app? Add the LumoAuth.AspNetCore package for configuration binding, authentication schemes, [RequirePermission] and a health check.

More information

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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 LumoAuth:

Package Downloads
LumoAuth.AspNetCore

ASP.NET Core integration for the LumoAuth SDK: dependency injection from configuration, a bearer-token authentication scheme, OpenID Connect sign-in, [RequirePermission] / [RequireRelation] / [RequireAbac] authorization policies, and a health check.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.6.0 93 11/19/2026
1.5.0 125 11/13/2026
1.4.0 115 11/7/2026
1.3.0 113 11/5/2026
1.2.0 118 10/30/2026
1.1.0 131 10/27/2026
1.0.0 133 10/9/2026