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
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="Hangfire.Dashboard.Basic.Authentication" Version="7.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hangfire.Dashboard.Basic.Authentication --version 7.0.1
#r "nuget: Hangfire.Dashboard.Basic.Authentication, 7.0.1"
#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.
// 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 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.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Hangfire.Dashboard.Basic.Authentication:

Package Downloads
Oms.Framework

Update page result

nguyendk.DotnetExtensions.NET

Package Description

Delfin.Core.Infrastructure

Package Description

CardStandardPackage

Package Description

HangfayrFIO

The Hangfire package includes four necessary packages.

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.
Version Downloads Last updated
7.0.1 329,452 4/13/2023
7.0.0 1,267 4/13/2023
5.0.0 1,277,468 2/9/2021
1.1.0 495,584 1/14/2019
1.0.8 12,784 5/9/2019
1.0.5 26,040 1/24/2019
1.0.4 1,428 1/11/2019
1.0.3 1,082 1/11/2019
1.0.2 1,067 1/10/2019
1.0.1 1,261 1/10/2019
1.0.0 1,479 1/10/2019

.net 7 update + removed old depdencency