Soenneker.Hangfire.BasicAuthentication
4.0.2114
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Hangfire.BasicAuthentication --version 4.0.2114
NuGet\Install-Package Soenneker.Hangfire.BasicAuthentication -Version 4.0.2114
<PackageReference Include="Soenneker.Hangfire.BasicAuthentication" Version="4.0.2114" />
<PackageVersion Include="Soenneker.Hangfire.BasicAuthentication" Version="4.0.2114" />
<PackageReference Include="Soenneker.Hangfire.BasicAuthentication" />
paket add Soenneker.Hangfire.BasicAuthentication --version 4.0.2114
#r "nuget: Soenneker.Hangfire.BasicAuthentication, 4.0.2114"
#:package Soenneker.Hangfire.BasicAuthentication@4.0.2114
#addin nuget:?package=Soenneker.Hangfire.BasicAuthentication&version=4.0.2114
#tool nuget:?package=Soenneker.Hangfire.BasicAuthentication&version=4.0.2114
Soenneker.Hangfire.BasicAuthentication
Protects a Hangfire dashboard with HTTP Basic authentication. The configured password is a PBKDF2 PHC record, so plaintext dashboard credentials do not need to be stored in application configuration.
Installation
dotnet add package Soenneker.Hangfire.BasicAuthentication
Configuration
{
"Hangfire": {
"Username": "admin",
"PasswordPhc": "<PBKDF2 PHC record>",
"LocalAuthenticationBypassEnabled": false,
"Url": "/hangfire"
}
}
Generate the PHC value once and store it in a secret provider:
using Soenneker.Hashing.Pbkdf2;
string passwordPhc = Pbkdf2HashingUtil.Hash("replace-with-a-strong-password");
Registration and middleware order
using Hangfire;
using Soenneker.Hangfire.BasicAuthentication;
using Soenneker.Hangfire.BasicAuthentication.Registrars;
builder.Services.AddHangfireBasicAuth();
app.UseHangfireAuthorized();
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
Authorization = [new HangfireAuthorizationFilter()]
});
UseHangfireAuthorized() must appear before UseHangfireDashboard(), and Hangfire:Url must match the dashboard path. HangfireAuthorizationFilter deliberately allows Hangfire's internal authorization stage to continue because the preceding middleware performs the credential check; do not use that filter without the middleware.
Requests outside the configured dashboard path are unaffected. Matching requests without valid credentials receive 401 Unauthorized and a WWW-Authenticate: Basic challenge.
Enable LocalAuthenticationBypassEnabled only when every request considered local by the application is trusted. Basic authentication must be served over HTTPS because credentials are encoded, not encrypted, in the request header.
| 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
- Hangfire.Core (>= 1.8.25)
- Newtonsoft.Json (>= 13.0.4)
- Soenneker.Extensions.HttpContext (>= 4.0.726)
- Soenneker.Validators.BasicAuth (>= 4.0.205)
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 |
|---|---|---|
| 4.0.2120 | 0 | 8/31/2026 |
| 4.0.2119 | 0 | 8/31/2026 |
| 4.0.2118 | 0 | 8/31/2026 |
| 4.0.2117 | 22 | 8/30/2026 |
| 4.0.2116 | 36 | 8/30/2026 |
| 4.0.2115 | 32 | 8/30/2026 |
| 4.0.2114 | 30 | 8/30/2026 |
| 4.0.2113 | 34 | 8/30/2026 |
| 4.0.2112 | 36 | 8/30/2026 |
| 4.0.2111 | 33 | 8/30/2026 |
| 4.0.2110 | 38 | 8/30/2026 |
| 4.0.2109 | 41 | 8/29/2026 |
| 4.0.2108 | 37 | 8/29/2026 |
| 4.0.2107 | 36 | 8/29/2026 |
| 4.0.2106 | 43 | 8/29/2026 |
| 4.0.2105 | 56 | 8/28/2026 |
| 4.0.2104 | 84 | 8/26/2026 |
| 4.0.2103 | 71 | 8/26/2026 |
| 4.0.2102 | 79 | 8/26/2026 |
| 4.0.2101 | 79 | 8/25/2026 |
Document secure Hangfire dashboard authentication