Fluens.Web.Auth 0.6.0

dotnet add package Fluens.Web.Auth --version 0.6.0
                    
NuGet\Install-Package Fluens.Web.Auth -Version 0.6.0
                    
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="Fluens.Web.Auth" Version="0.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fluens.Web.Auth" Version="0.6.0" />
                    
Directory.Packages.props
<PackageReference Include="Fluens.Web.Auth" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Fluens.Web.Auth --version 0.6.0
                    
#r "nuget: Fluens.Web.Auth, 0.6.0"
                    
#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.
#:package Fluens.Web.Auth@0.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fluens.Web.Auth&version=0.6.0
                    
Install as a Cake Addin
#tool nuget:?package=Fluens.Web.Auth&version=0.6.0
                    
Install as a Cake Tool

Fluens.Web.Auth

JWT Bearer authentication and security headers middleware for Fluens web applications.

Installation

dotnet add package Fluens.Web.Auth

Usage

fluensBuilder.AddAuth();

app.UseSecurityHeaders();
app.UseAuthentication();
app.UseAuthorization();

Configuration section: Fluens:Auth:

{
  "Fluens": {
    "Auth": {
      "Enabled": true,
      "Issuer": "https://myapp.example.com",
      "Audience": "myapp-api",
      "SecretKey": "your-secret-key-at-least-32-characters-long!"
    }
  }
}

Overriding JwtBearerOptions

AddAuth() accepts an optional configureJwt callback to override JWT Bearer defaults:

fluensBuilder.AddAuth(configureJwt: jwt =>
{
    jwt.TokenValidationParameters.ClockSkew = TimeSpan.FromMinutes(1);
});

SecurityHeadersOptions

UseSecurityHeaders() accepts an optional callback to configure which headers are added:

app.UseSecurityHeaders(opts =>
{
    opts.FrameOptions = false;                      // disable X-Frame-Options
    opts.PermissionsPolicyValue = "camera=self";    // custom Permissions-Policy
});
Property Type Default Header
ContentTypeOptions bool true X-Content-Type-Options: nosniff
FrameOptions bool true X-Frame-Options: DENY
ReferrerPolicy bool true Referrer-Policy: strict-origin-when-cross-origin
PermissionsPolicy bool true Restrictive Permissions-Policy
PermissionsPolicyValue string? null Custom override for Permissions-Policy value

License

This project is licensed under the MIT License.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.6.0 25 3/1/2026
0.5.7 27 3/1/2026
0.5.6 27 3/1/2026
0.5.5 41 2/28/2026
0.5.4 41 2/28/2026
0.5.3 43 2/27/2026
0.5.2 41 2/27/2026
0.5.1 43 2/27/2026
0.5.0 47 2/26/2026
0.3.2 49 2/26/2026
0.3.1 46 2/26/2026
0.3.0 50 2/24/2026
0.2.5 51 2/24/2026
0.2.4 46 2/24/2026
0.2.3 46 2/24/2026
0.1.0 51 2/23/2026