Lumen.Authorization.AspNetCore
3.0.1
dotnet add package Lumen.Authorization.AspNetCore --version 3.0.1
NuGet\Install-Package Lumen.Authorization.AspNetCore -Version 3.0.1
<PackageReference Include="Lumen.Authorization.AspNetCore" Version="3.0.1" />
<PackageVersion Include="Lumen.Authorization.AspNetCore" Version="3.0.1" />
<PackageReference Include="Lumen.Authorization.AspNetCore" />
paket add Lumen.Authorization.AspNetCore --version 3.0.1
#r "nuget: Lumen.Authorization.AspNetCore, 3.0.1"
#:package Lumen.Authorization.AspNetCore@3.0.1
#addin nuget:?package=Lumen.Authorization.AspNetCore&version=3.0.1
#tool nuget:?package=Lumen.Authorization.AspNetCore&version=3.0.1
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. |
-
net8.0
- Lumen.Authorization (>= 3.0.1)
- Lumen.Authorization.Contracts (>= 3.0.1)
- Lumen.Authorization.Migrations (>= 3.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Lumen.Authorization.AspNetCore:
| Package | Downloads |
|---|---|
|
Lumen.Authorization.Backoffice
Razor Class Library providing a mountable Backoffice UI for Lumen.Authorization. Includes controllers, ViewComponents, and CSS for managing Permissions, Profiles, and User↔Profile assignments. Mount via AddLumenBackoffice() + MapLumenBackoffice("/lumen"). |
GitHub repositories
This package is not used by any popular GitHub repositories.