Linbik.JwtAuthManager 1.2.0-preview.2

This is a prerelease version of Linbik.JwtAuthManager.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Linbik.JwtAuthManager --version 1.2.0-preview.2
                    
NuGet\Install-Package Linbik.JwtAuthManager -Version 1.2.0-preview.2
                    
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="Linbik.JwtAuthManager" Version="1.2.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Linbik.JwtAuthManager" Version="1.2.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="Linbik.JwtAuthManager" />
                    
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 Linbik.JwtAuthManager --version 1.2.0-preview.2
                    
#r "nuget: Linbik.JwtAuthManager, 1.2.0-preview.2"
                    
#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 Linbik.JwtAuthManager@1.2.0-preview.2
                    
#: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=Linbik.JwtAuthManager&version=1.2.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Linbik.JwtAuthManager&version=1.2.0-preview.2&prerelease
                    
Install as a Cake Tool

Linbik.JwtAuthManager

JWT Authentication Manager for Linbik Framework. Provides cookie-based login/logout endpoints, RSA-256 JWT validation, and rate limiting.

📦 Installation

dotnet add package Linbik.JwtAuthManager

🚀 Features

  • Cookie-Based JWT Auth — Login, logout, and token refresh via minimal API endpoints
  • RSA-256 JWT Signing — Industry-standard asymmetric cryptography
  • PKCE Support — Proof Key for Code Exchange for public clients
  • Rate Limiting — Configurable LinbikAuth and LinbikAuthStrict policies
  • Multi-Client Support — Web, Mobile, Admin via Clients configuration
  • Keyless Mode — Zero-config development with auto-provisioning
  • LinbikAuthorize Attribute — Protect endpoints with [LinbikAuthorize]

🔧 Configuration

// In Program.cs
using Linbik.Core.Extensions;
using Linbik.JwtAuthManager.Extensions;

var builder = WebApplication.CreateBuilder(args);

// 1. Add Linbik services
builder.Services.AddLinbik()
    .AddLinbikJwtAuth();

var app = builder.Build();

// 2. Validate configuration at startup
app.EnsureLinbik();

// 3. if using controllers, add this.
app.UseRouting();  

// 4. Add authentication and authorization middleware
app.UseAuthentication();
app.UseAuthorization();

// 5. Map endpoints: /api/linbik/login, /api/linbik/logout, /api/linbik/refresh
app.UseLinbikJwtAuth();

app.Run();

🔐 Configure JWT Authentication

Choose one of the following approaches:

// Default configuration
AddLinbikJwtAuth();

// From configuration
AddLinbikJwtAuth(builder.Configuration.GetSection("Linbik:JwtAuth"));

// Fluent configuration
AddLinbikJwtAuth(opt => { });

Endpoints

Path Method Description
/api/linbik/login GET Initiate OAuth flow → exchange code → set cookies
/api/linbik/logout POST Clear all auth cookies
/api/linbik/refresh POST Refresh tokens using refresh cookie
/api/linbik/callback GET OAuth callback for code exchange

💻 Usage

Protect Endpoints

[LinbikAuthorize]
[HttpGet]
public IActionResult Protected()
{
    var userId = User.FindFirst(ClaimTypes.NameIdentifier)?.Value;
    return Ok(new { userId });
}

or with minimal APIs:

app.MapGet("/protected", [LinbikAuthorize] (ClaimsPrincipal user) =>
{
    var userId = user.FindFirst(ClaimTypes.NameIdentifier)?.Value;
    return Results.Ok(new { userId });
});

app.MapGet("/protected", (HttpContext context) =>
{
    var userId = context.User.FindFirst(ClaimTypes.NameIdentifier)?.Value;
    return Results.Ok(new { userId });
})
.RequireAuthorization("LinbikAuthorize");

Access Integration Tokens

// Get a specific integration token from cookies
var paymentToken = HttpContext.GetIntegrationToken("payment-gateway");

// Check if user has any integrations
var hasIntegrations = HttpContext.HasIntegrations();

🔒 Rate Limiting

// In Program.cs
builder.Services.AddLinbikRateLimiting();

// In middleware pipeline
app.UseLinbikRateLimiting();
{
  "Linbik": {
    "RateLimiting": {
      "PermitLimit": 100,
      "WindowSeconds": 60,
      "QueueLimit": 2
    },
    "Resilience": {
      "StrictTokenLimit": 10,
      "StrictReplenishmentPeriodSeconds": 60,
      "StrictTokensPerPeriod": 5,
      "StrictQueueLimit": 0
    }
  }
}

Rate Limiting Policies

Policy Use Case
LinbikAuth Standard auth endpoints
LinbikAuthStrict Token exchange, initiate endpoints
[EnableRateLimiting("LinbikAuth")]
public IActionResult RateLimitedAction() => Ok();

📖 Documentation

📄 License

MIT License

Contact: info@linbik.com


Version: 1.2.0
Platform: ASP.NET Core 10.0 (net10.0)
Last Updated: 2 April 2026

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
1.2.0-preview.3 42 5/30/2026
1.2.0-preview.2 79 4/26/2026
1.2.0-preview.1 105 4/2/2026
1.1.0 396 12/5/2025
1.1.0-beta0007 102 3/6/2026
1.0.7 150 3/6/2026
1.0.1 227 12/14/2025
1.0.0 98 3/6/2026
0.60.1 104 3/6/2026
0.46.0 370 11/30/2025
0.45.12 365 11/30/2025
0.45.7 249 8/31/2025
0.45.6 223 8/31/2025
0.45.5 237 8/27/2025
0.44.0 255 8/24/2025
0.42.0 117 8/23/2025
0.41.0 127 8/15/2025
0.40.0 204 8/14/2025
0.39.0 202 8/14/2025
0.38.0 201 8/14/2025
Loading failed