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 (9)

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

Package Downloads
Oms.Framework

Update page result

AlphaReds.Core.Common

Common class for AlphaReds project

Fsel.Core

Fsel Core Package

Delfin.Core.BackgroundJobs

A powerful library for managing background jobs in .NET applications, designed to simplify the execution of asynchronous tasks, scheduled jobs, and long-running processes. This package integrates seamlessly with popular job scheduling frameworks, ensuring reliable and efficient job management.

nguyendk.DotnetExtensions.NET

Package Description

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Hangfire.Dashboard.Basic.Authentication:

Repository Stars
DevArchitecture/DevArchitecture
DevArchitecture Backend Project
TheUltimateC0der/listrr
listrr.pro creates and maintains lists on trakt.tv completely automated based on your filters.
Version Downloads Last updated
7.0.1 984,972 4/13/2023
7.0.0 2,049 4/13/2023
5.0.0 1,673,503 2/9/2021
1.1.0 740,236 1/14/2019
1.0.8 14,961 5/9/2019
1.0.5 26,160 1/24/2019
1.0.4 2,434 1/11/2019
1.0.3 1,134 1/11/2019
1.0.2 4,443 1/10/2019
1.0.1 1,378 1/10/2019
1.0.0 1,883 1/10/2019

.net 7 update + removed old depdencency