Trellis.Authorization
3.0.0-alpha.385
dotnet add package Trellis.Authorization --version 3.0.0-alpha.385
NuGet\Install-Package Trellis.Authorization -Version 3.0.0-alpha.385
<PackageReference Include="Trellis.Authorization" Version="3.0.0-alpha.385" />
<PackageVersion Include="Trellis.Authorization" Version="3.0.0-alpha.385" />
<PackageReference Include="Trellis.Authorization" />
paket add Trellis.Authorization --version 3.0.0-alpha.385
#r "nuget: Trellis.Authorization, 3.0.0-alpha.385"
#:package Trellis.Authorization@3.0.0-alpha.385
#addin nuget:?package=Trellis.Authorization&version=3.0.0-alpha.385&prerelease
#tool nuget:?package=Trellis.Authorization&version=3.0.0-alpha.385&prerelease
Trellis.Authorization
Lightweight authorization primitives for permissions, actors, and resource-based checks.
Installation
dotnet add package Trellis.Authorization
Quick Example
using System.Collections.Generic;
using Trellis;
using Trellis.Authorization;
var actor = Actor.Create("user-1", new HashSet<string> { "orders:read" });
IResult result = actor.HasPermission("orders:read")
? Result.Ok()
: Result.Fail(new Error.Forbidden("policy.id") { Detail = "Missing permission." });
Key Features
- Defines
Actor,ActorId,IActorProvider,IAuthorize, and resource authorization interfaces. Actor.Idis the strongly-typedActorIdvalue object — reuse it on consumer aggregate boundaries (Order.CreatedByActorId,Document.LastModifiedByActorId) for type-checked principal-identity comparisons.- Works without ASP.NET Core, Mediator, or any web dependency.
- Keeps permission rules inside the same Result-based workflow as the rest of your application.
Documentation
Part of Trellis
This package is part of the Trellis framework.
| Product | Versions 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. |
-
net10.0
- Trellis.Core (>= 3.0.0-alpha.385)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on Trellis.Authorization:
| Package | Downloads |
|---|---|
|
Trellis.Asp
ASP.NET Core integration for Trellis. Result-to-HTTP response mapping, scalar value validation, JSON converters (with bundled AOT source generator), and ASP.NET actor providers (Claims, Entra, Development) for Trellis.Authorization. |
|
|
Trellis.Testing
FluentAssertions extensions and test doubles for Trellis - assert Result, Maybe, and Error types with readable fluent syntax |
|
|
Trellis.Mediator
Result-aware pipeline behaviors for martinothamar/Mediator. Provides validation, authorization, logging, tracing, and exception handling behaviors that understand Trellis Result types and short-circuit correctly. |
|
|
Trellis.EntityFrameworkCore
EF Core integration for Trellis. Convention-based value converter registration for Trellis primitives, Result-returning SaveChanges wrappers, Maybe/Result query extensions, and provider-agnostic database exception classification. |
|
|
Trellis.Asp.Authorization
Azure Entra ID v2.0 actor provider for Trellis. Maps JWT claims to Actor with permissions, forbidden permissions, and ABAC attributes. Integrates Trellis.Authorization with ASP.NET Core. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-alpha.385 | 65 | 6/15/2026 |
| 3.0.0-alpha.382 | 99 | 6/12/2026 |
| 3.0.0-alpha.372 | 97 | 6/10/2026 |
| 3.0.0-alpha.360 | 142 | 6/7/2026 |
| 3.0.0-alpha.342 | 132 | 6/5/2026 |
| 3.0.0-alpha.337 | 97 | 6/3/2026 |
| 3.0.0-alpha.336 | 84 | 6/3/2026 |
| 3.0.0-alpha.304 | 102 | 5/29/2026 |
| 3.0.0-alpha.158 | 118 | 4/5/2026 |
| 3.0.0-alpha.157 | 63 | 4/4/2026 |
| 3.0.0-alpha.140 | 78 | 3/30/2026 |
| 3.0.0-alpha.137 | 82 | 3/27/2026 |
| 3.0.0-alpha.135 | 63 | 3/26/2026 |
| 3.0.0-alpha.127 | 75 | 3/23/2026 |
| 3.0.0-alpha.123 | 65 | 3/19/2026 |
| 3.0.0-alpha.118 | 71 | 3/14/2026 |
| 3.0.0-alpha.111 | 69 | 3/12/2026 |
| 3.0.0-alpha.104 | 65 | 3/9/2026 |
| 3.0.0-alpha.100 | 62 | 3/4/2026 |
| 3.0.0-alpha.99 | 62 | 3/4/2026 |