Lumen.Authorization.Backoffice
3.0.1
dotnet add package Lumen.Authorization.Backoffice --version 3.0.1
NuGet\Install-Package Lumen.Authorization.Backoffice -Version 3.0.1
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="Lumen.Authorization.Backoffice" Version="3.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lumen.Authorization.Backoffice" Version="3.0.1" />
<PackageReference Include="Lumen.Authorization.Backoffice" />
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 Lumen.Authorization.Backoffice --version 3.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Lumen.Authorization.Backoffice, 3.0.1"
#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 Lumen.Authorization.Backoffice@3.0.1
#: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=Lumen.Authorization.Backoffice&version=3.0.1
#tool nuget:?package=Lumen.Authorization.Backoffice&version=3.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Lumen.Authorization
Pluggable role-based authorization library for ASP.NET Core (.NET 8). Manages Permissions, Profiles (roles), and User↔Profile assignments, backed by SQL Server and exposed via a mountable Backoffice UI.
Packages
| Package | Purpose |
|---|---|
Lumen.Authorization |
Core: domain, CQRS handlers, EF Core persistence, DI root |
Lumen.Authorization.Contracts |
Public interfaces (IUserPermissionService, IUserIdAccessor) and exported events |
Lumen.Authorization.Migrations |
EF Core migrations for the Lumen schema; hosted service applies them on startup |
Lumen.Authorization.AspNetCore |
ASP.NET Core glue: [RequirePermission], policy provider, discovery, enforcement |
Lumen.Authorization.Backoffice |
Razor Class Library with Profiles & Permissions management UI |
Minimum wiring in Program.cs
// Umbrella: registers core, migrations, enforcement, and discovery in one call
builder.Services.AddLumenAuthorization(builder.Configuration);
// Optional: mountable Backoffice UI
builder.Services.AddLumenBackoffice();
// ...
app.UseStaticFiles(); // serves _content/Lumen.Authorization.Backoffice/
app.UseAuthentication();
app.UseAuthorization();
app.MapLumenBackoffice("/lumen");
SQL Server is required. Provide the connection string via
IConfiguration["ConnectionStrings:DefaultConnection"]or use the string overload:AddLumenAuthorization("Server=...;Database=...;").
Protecting an endpoint
// Convention: permission code = "Controller.Action"
[RequirePermission]
public IActionResult Index() { ... }
// Explicit code
[RequirePermission("Profiles.Delete")]
public IActionResult Delete(Guid id) { ... }
Repository & documentation
- Source: https://github.com/KauaVilasBoas/Lumen
- Consumer guide:
docs/authz-library.mdin the repository - Architecture decision: ADR-0004
| Product | Versions 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.
-
net8.0
- Lumen.Authorization (>= 3.0.1)
- Lumen.Authorization.AspNetCore (>= 3.0.1)
- Lumen.Authorization.Contracts (>= 3.0.1)
- MediatR (>= 12.4.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.