Fluens.Web.Auth
0.6.6
dotnet add package Fluens.Web.Auth --version 0.6.6
NuGet\Install-Package Fluens.Web.Auth -Version 0.6.6
<PackageReference Include="Fluens.Web.Auth" Version="0.6.6" />
<PackageVersion Include="Fluens.Web.Auth" Version="0.6.6" />
<PackageReference Include="Fluens.Web.Auth" />
paket add Fluens.Web.Auth --version 0.6.6
#r "nuget: Fluens.Web.Auth, 0.6.6"
#:package Fluens.Web.Auth@0.6.6
#addin nuget:?package=Fluens.Web.Auth&version=0.6.6
#tool nuget:?package=Fluens.Web.Auth&version=0.6.6
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() adds all security headers by default. Accepts an optional Action<SecurityHeadersOptions>? configure callback to override individual headers:
app.UseSecurityHeaders(opts =>
{
// opts.FrameOptions = false; // disable X-Frame-Options
// opts.PermissionsPolicyValue = "camera=(), microphone=()"; // custom policy
});
All headers are enabled via SecurityHeadersOptions (all properties use init and default to true):
| 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 | 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
- Fluens.Web (>= 0.6.6)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.3)
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.6 | 37 | 3/11/2026 |
| 0.6.5 | 79 | 3/4/2026 |
| 0.6.4 | 78 | 3/4/2026 |
| 0.6.3 | 83 | 3/3/2026 |
| 0.6.2 | 90 | 3/2/2026 |
| 0.6.1 | 82 | 3/2/2026 |
| 0.6.0 | 81 | 3/1/2026 |
| 0.5.7 | 88 | 3/1/2026 |
| 0.5.6 | 79 | 3/1/2026 |
| 0.5.5 | 82 | 2/28/2026 |
| 0.5.4 | 86 | 2/28/2026 |
| 0.5.3 | 89 | 2/27/2026 |
| 0.5.2 | 88 | 2/27/2026 |
| 0.5.1 | 85 | 2/27/2026 |
| 0.5.0 | 87 | 2/26/2026 |
| 0.3.2 | 93 | 2/26/2026 |
| 0.3.1 | 88 | 2/26/2026 |
| 0.3.0 | 87 | 2/24/2026 |
| 0.2.5 | 89 | 2/24/2026 |
| 0.2.4 | 84 | 2/24/2026 |