Dabbler.Security.Blazor
2.0.2
Prefix Reserved
dotnet add package Dabbler.Security.Blazor --version 2.0.2
NuGet\Install-Package Dabbler.Security.Blazor -Version 2.0.2
<PackageReference Include="Dabbler.Security.Blazor" Version="2.0.2" />
<PackageVersion Include="Dabbler.Security.Blazor" Version="2.0.2" />
<PackageReference Include="Dabbler.Security.Blazor" />
paket add Dabbler.Security.Blazor --version 2.0.2
#r "nuget: Dabbler.Security.Blazor, 2.0.2"
#:package Dabbler.Security.Blazor@2.0.2
#addin nuget:?package=Dabbler.Security.Blazor&version=2.0.2
#tool nuget:?package=Dabbler.Security.Blazor&version=2.0.2
Dabbler.Security.Blazor
Part of the Dabbler Platform. See
docs/platform-overview.mdfor the platform-level view of how this library fits in.
The Blazor Server UI surface for
Dabbler.Security: secured-rendering
components, the security-administration dashboard, role and
organization switchers, restriction-aware grid and form binders, and
the authentication pages (login, MFA, external-login callback).
Audience
Blazor Server teams already adopting Dabbler.Security who want the
matching UI surface — admin pages, dashboard, role-aware navigation,
declarative security wrappers — without reimplementing them. The
package is the consumer-facing complement to Dabbler.Security's
service-level model.
Prerequisites and stack constraints
- Blazor Server
- MudBlazor 9.x
- .NET 10 (current LTS)
- Reference to
Dabbler.Security(this library extends its service-level model into UI) - Reference to
Dabbler.Components(for the underlying grid + form primitives)
Install
Adoption note: The recommended adoption model for internal projects is integrated source under
src/Libs/Dabbler.Security.Blazor/. NuGet packages are available; to install the package:dotnet add package Dabbler.Security.Blazor
Minimal registration
builder.Services.AddDabblerSecurityBlazor();
This registers MudBlazor services, cascading authentication state,
restriction-aware renderers, and a DelegatingHandler for passing user
identity to downstream API calls. It complements
AddDabblerSecurity(...) from the service-level library.
Smallest working example
A page that mounts the central security dashboard with role-aware tabs:
@page "/admin/security"
<DabblerSecurityDashboard />
A typical wrapper around a privileged control:
<DabblerSecured PageKey="Dashboard" ControlKey="ExportButton">
<MudButton OnClick="@ExportAsync">Export</MudButton>
</DabblerSecured>
A layout that exposes role switching for multi-role users:
@* MainLayout.razor *@
<MudAppBar>
<DabblerRoleSwitcher />
</MudAppBar>
Supported components
Authentication pages
| Component | Route | Description |
|---|---|---|
LoginPage |
/login |
Magic-link login with optional external OIDC/OAuth entry points. |
MfaPage |
/mfa |
TOTP setup and verification when product policy enables MFA. |
Admin pages
| Component | Route | Description |
|---|---|---|
UserListPage |
/admin/users |
List and manage application users. |
UserEditPage |
/admin/users/{id} |
Edit user details and metadata. |
RoleListPage |
/admin/roles |
View and manage security roles. |
RoleAssignmentPage |
/admin/roles/assign |
Assign and remove roles from users. |
AuditLogPage |
/admin/audit |
View a chronological audit trail of security events. |
Core authorization-UI components
| Component | Description |
|---|---|
DabblerSecurityNav |
Navigation menu item for admin pages; automatically appears for authorized users (gated by baked-in role). |
DabblerSecured |
Declarative wrapper enforcing page, field, or control permissions on its child content. |
DabblerRoleSwitcher |
Dropdown for users with multiple roles to switch their active role. |
Dashboard
| Component | Description |
|---|---|
DabblerSecurityDashboard |
Central admin panel exposing five tabs: Role Master Details, Default Masks, Organization Master Details, Users and Role Assignment, Role Documentation. Each tab is gated by the active baked-in role. Every tab but Role Documentation is laid out with MasterDetailExpansionShell from Dabbler.Components. |
RestrictedFormField / RestrictedGridColumn |
Render fields and grid columns subject to the active role's ColumnRestriction rules and DefaultMask + MaskExemption resolution. |
Current contract notes
- The retained supported contract is the runtime authorization story: secured rendering, role switching, security navigation, permission editing, and row filters.
- The admin / dashboard pages are part of the supported core — the
demo app and
tests/Dabbler.Security.Blazor.Tests/exercise them directly. - Broader external-login and MFA breadth remains available, but should be treated as product / policy configuration rather than the default reusable platform story.
Related packages
Dabbler.Security— service-level authorization model (restrictions, masking, baked-in roles, authentication). This library cannot function without it.Dabbler.Components— the CRUD primitives thatRestrictedFormField/RestrictedGridColumnwrap, and theMasterDetailExpansionShellthe admin tabs use.Dabbler.Testing.Blazor— watermark instrumentation for Playwright E2E tests of admin / dashboard pages.
Warnings and caveats
- Disabled-state and hidden-control tests should sign in as the role
whose product definition mandates that absence, not a privileged
role whose product direction might widen later. Asserting
"SystemAdmin cannot see X" is brittle; assert under the user-type
role whose
UiRestrictionactually defines the absence. Seedocs/planning/lessons-learned.md→ Hard-Asserted Disabled-State Tests Become Regressions When The Feature Gets Enabled. - On a
MudTextField,data-testidlands on the<input>, not the wrapper (MudBlazor 9.x; checked against 9.12.0). Test selectors should useGetByTestId("foo")directly rather than chaining a.Locator("input")after. - License: MIT (see LICENSE).
If this library stops being maintained
This package is MIT-licensed, and its source is in
src/Libs/Dabbler.Security.Blazor.
If it stops being maintained, copy that source into your application,
replace the package reference with a project reference to your copy, and
own it from there. Keep the MIT license notice with the copied code.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Dabbler.Components (>= 2.0.2)
- Dabbler.Security (>= 2.0.2)
- Microsoft.AspNetCore.Components.Web (>= 10.0.15)
- MudBlazor (>= 9.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.2 | 95 | 11/13/2026 |
| 2.0.1 | 94 | 11/13/2026 |
| 2.0.0 | 91 | 11/13/2026 |
| 1.0.0 | 103 | 11/9/2026 |
| 0.1.0-preview.1 | 138 | 5/30/2026 |