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
                    
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="Identity.Base.Roles" Version="0.7.15" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Identity.Base.Roles" Version="0.7.15" />
                    
Directory.Packages.props
<PackageReference Include="Identity.Base.Roles" />
                    
Project file
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 Identity.Base.Roles --version 0.7.15
                    
#r "nuget: Identity.Base.Roles, 0.7.15"
                    
#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 Identity.Base.Roles@0.7.15
                    
#: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=Identity.Base.Roles&version=0.7.15
                    
Install as a Cake Addin
#tool nuget:?package=Identity.Base.Roles&version=0.7.15
                    
Install as a Cake Tool

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.
  • ClaimsPrincipal helpers for parsing and checking identity.permissions claims.
  • 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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