Brixa.Identity.Authorization
1.0.0
dotnet add package Brixa.Identity.Authorization --version 1.0.0
NuGet\Install-Package Brixa.Identity.Authorization -Version 1.0.0
<PackageReference Include="Brixa.Identity.Authorization" Version="1.0.0" />
<PackageVersion Include="Brixa.Identity.Authorization" Version="1.0.0" />
<PackageReference Include="Brixa.Identity.Authorization" />
paket add Brixa.Identity.Authorization --version 1.0.0
#r "nuget: Brixa.Identity.Authorization, 1.0.0"
#:package Brixa.Identity.Authorization@1.0.0
#addin nuget:?package=Brixa.Identity.Authorization&version=1.0.0
#tool nuget:?package=Brixa.Identity.Authorization&version=1.0.0
Brixa.Identity.Authorization
Permission-based authorization for ASP.NET Core services.
Install
dotnet add package Brixa.Identity.Authorization
Setup
builder.Services.AddBrixaPermissionAuthorization();
Protect Endpoints
[RequirePermission("merchant.kyc.approve")]
[HttpPost("{merchantId}/approve")]
public IActionResult Approve(Guid merchantId) => Ok();
Use well-known constants for seed permissions:
[RequirePermission(WellKnownPermissions.MerchantKycApprove)]
Or use plain strings for permissions created at runtime:
[RequirePermission("custom.permission.created.via.api")]
How It Works
- Checks JWT claims for the required permission
- If not found, checks if user has the SuperAdmin role (configurable bypass)
- If not found and
IPermissionCheckeris registered, falls back to a remote check against the Identity Service - Denies access if all checks fail
Configuration
SuperAdmin Bypass
The role that bypasses all permission checks defaults to "SuperAdmin". Override it:
{
"BrixaIdentity": {
"SuperAdminRole": "PlatformAdmin"
}
}
Permission Caching
Enable caching to avoid repeated remote permission checks:
{
"BrixaIdentity": {
"EnablePermissionCaching": true,
"PermissionCacheDurationSeconds": 300
}
}
Remote Permission Fallback
If permissions aren't embedded in the JWT (e.g., user has 50+ permissions), the handler falls back to IPermissionChecker. This is automatically registered when you use AddBrixaIdentity().
| 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
- Brixa.Identity.Abstractions (>= 1.0.0)
- Brixa.Identity.Client (>= 1.0.0)
- Microsoft.Extensions.Caching.Abstractions (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Brixa.Identity.Authorization:
| Package | Downloads |
|---|---|
|
Brixa.Identity.Platform
Meta-package that includes all Brixa.Identity NuGet packages for consuming services. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 140 | 4/27/2026 |