Hangfire.Dashboard.Basic.Authentication
7.0.1
dotnet add package Hangfire.Dashboard.Basic.Authentication --version 7.0.1
NuGet\Install-Package Hangfire.Dashboard.Basic.Authentication -Version 7.0.1
<PackageReference Include="Hangfire.Dashboard.Basic.Authentication" Version="7.0.1" />
paket add Hangfire.Dashboard.Basic.Authentication --version 7.0.1
#r "nuget: Hangfire.Dashboard.Basic.Authentication, 7.0.1"
// Install Hangfire.Dashboard.Basic.Authentication as a Cake Addin
#addin nuget:?package=Hangfire.Dashboard.Basic.Authentication&version=7.0.1
// Install Hangfire.Dashboard.Basic.Authentication as a Cake Tool
#tool nuget:?package=Hangfire.Dashboard.Basic.Authentication&version=7.0.1
About
Hangfire.Dashboard.Basic.Authentication is a re-usable Hangfire Basic Authentication filter that can be easily imported and configured in your project. It provides a quick and easy way to add basic authentication to your Hangfire dashboard, without the need for complex configuration.
Configurion
In your startup file, configure the Hangfire dashboard options and add the BasicAuthAuthorizationFilter:
using Hangfire.Dashboard.Basic.Authentication;
// ...
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// ...
var options = new DashboardOptions
{
Authorization = new[]
{
new BasicAuthAuthorizationFilter(new BasicAuthAuthorizationFilterOptions
{
SslRedirect = false,
RequireSsl = false,
LoginCaseSensitive = true,
Users = new []
{
new BasicAuthAuthorizationUser
{
Login = "myuser",
PasswordClear = "mypassword"
}
}
})
}
};
app.UseHangfireDashboard("/hangfire", options);
app.UseHangfireServer();
// ...
}
Usage
Just replace my_username and my_password with your desired values. And tune the SSL setting for your needs.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. |
-
net7.0
- Hangfire.AspNetCore (>= 1.7.34)
- Hangfire.Core (>= 1.7.34)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Primitives (>= 7.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Hangfire.Dashboard.Basic.Authentication:
Package | Downloads |
---|---|
nguyendk.DotnetExtensions.NET
Package Description |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Hangfire.Dashboard.Basic.Authentication:
Repository | Stars |
---|---|
TheUltimateC0der/listrr
listrr.pro creates and maintains lists on trakt.tv completely automated based on your filters.
|
.net 7 update + removed old depdencency