Identity.Base.Roles
0.7.15
dotnet add package Identity.Base.Roles --version 0.7.15
NuGet\Install-Package Identity.Base.Roles -Version 0.7.15
<PackageReference Include="Identity.Base.Roles" Version="0.7.15" />
<PackageVersion Include="Identity.Base.Roles" Version="0.7.15" />
<PackageReference Include="Identity.Base.Roles" />
paket add Identity.Base.Roles --version 0.7.15
#r "nuget: Identity.Base.Roles, 0.7.15"
#:package Identity.Base.Roles@0.7.15
#addin nuget:?package=Identity.Base.Roles&version=0.7.15
#tool nuget:?package=Identity.Base.Roles&version=0.7.15
Identity.Base.Roles
Full documentation lives at docs/packages/identity-base-roles/index.md. This README highlights the basics for quick reference.
Role-based access control primitives for Identity Base. Includes:
- EF Core entities and configuration for roles, permissions, role-permission associations, user-role links, and audit entries.
- Configuration binding for role/permission definitions and default role assignments.
- Services for role assignment and permission resolution.
ClaimsPrincipalhelpers for parsing and checkingidentity.permissionsclaims.- Optional DbContext (
IdentityRolesDbContext) with convenience registration helpers.
Usage
// Register RBAC services and configure the provided DbContext
var rolesBuilder = services.AddIdentityRoles(
configuration,
configureDbContext: (sp, options) =>
{
var connectionString = sp.GetRequiredService<IConfiguration>().GetConnectionString("Primary")
?? throw new InvalidOperationException("ConnectionStrings:Primary must be set.");
options.UseNpgsql(connectionString); // or UseSqlServer(connectionString)
});
// Or map an existing DbContext that implements IRoleDbContext
rolesBuilder.UseDbContext<AppDbContext>();
// Map endpoints when building the app
app.MapIdentityRolesUserEndpoints();
// During startup
await app.Services.SeedIdentityRolesAsync(); // host-controlled migrations must run first
Consumers opt in explicitly; no additional tables are created unless the package is referenced and configured.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
-
net9.0
- Identity.Base (>= 0.7.15)
- Microsoft.EntityFrameworkCore (>= 9.0.10)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.10)
- Microsoft.Extensions.Configuration (>= 9.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.10)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Identity.Base.Roles:
| Package | Downloads |
|---|---|
|
Identity.Base.Admin
Administrative endpoints, authorization handlers, and helpers for managing Identity Base users, roles, and audit trails. |
|
|
Identity.Base.Organizations
Organization management layer for Identity Base, providing domain entities, EF Core integration, services, and HTTP APIs for organization membership and roles. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.15 | 57 | 1/6/2026 |
| 0.7.12 | 109 | 12/30/2025 |
| 0.7.9 | 315 | 12/17/2025 |
| 0.7.7 | 256 | 12/3/2025 |
| 0.7.6 | 221 | 11/26/2025 |
| 0.7.5 | 362 | 11/14/2025 |
| 0.7.4 | 315 | 11/13/2025 |
| 0.7.3 | 316 | 11/10/2025 |
| 0.7.2 | 228 | 11/9/2025 |
| 0.7.1 | 174 | 11/9/2025 |
| 0.6.3 | 168 | 11/8/2025 |
| 0.6.2 | 172 | 11/8/2025 |
| 0.6.1 | 212 | 11/6/2025 |
| 0.5.10 | 213 | 11/5/2025 |
| 0.5.1 | 224 | 11/2/2025 |
| 0.4.3 | 177 | 11/2/2025 |
| 0.4.2 | 175 | 11/2/2025 |
| 0.3.6 | 151 | 11/1/2025 |
| 0.3.4 | 152 | 11/1/2025 |
| 0.2.7 | 158 | 11/1/2025 |
| 0.2.4 | 216 | 10/29/2025 |
| 0.2.3 | 222 | 10/29/2025 |