Kck.Bundle.MinimalApi
5.0.0
dotnet add package Kck.Bundle.MinimalApi --version 5.0.0
NuGet\Install-Package Kck.Bundle.MinimalApi -Version 5.0.0
<PackageReference Include="Kck.Bundle.MinimalApi" Version="5.0.0" />
<PackageVersion Include="Kck.Bundle.MinimalApi" Version="5.0.0" />
<PackageReference Include="Kck.Bundle.MinimalApi" />
paket add Kck.Bundle.MinimalApi --version 5.0.0
#r "nuget: Kck.Bundle.MinimalApi, 5.0.0"
#:package Kck.Bundle.MinimalApi@5.0.0
#addin nuget:?package=Kck.Bundle.MinimalApi&version=5.0.0
#tool nuget:?package=Kck.Bundle.MinimalApi&version=5.0.0
Kck.Bundle.MinimalApi
Lightweight Minimal API setup, a slim variant of Kck.Bundle.WebApi: Serilog, the in-memory cache, exception handling
and health check services, plus the JWT token service when Kck:Security:Jwt:Issuer is set. No Argon2, event bus or
rate limiting; ASP.NET Core authentication is configured separately.
Installation
dotnet add package Kck.Bundle.MinimalApi
Quick Start
// Program.cs
using Kck.Exceptions.AspNetCore.Extensions;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddKckMinimalApiDefaults(builder.Configuration);
var app = builder.Build();
app.UseKckExceptionHandling(); // RFC 7807 problem details for unhandled exceptions
// Map your minimal API endpoints
app.MapGet("/products/{id:int}", async (int id, IProductService svc, CancellationToken ct)
=> await svc.GetAsync(id, ct) is { } product
? Results.Ok(product)
: Results.NotFound());
app.MapHealthChecks("/health");
app.Run();
Configuration
| Property | Description | Default |
|---|---|---|
Kck:Security:Jwt:Issuer |
JWT token issuer; setting it registers the JWT token service | — |
Kck:Security:Jwt:Audience |
JWT token audience; required once Issuer is set |
— |
These are the only settings the bundle reads. The cache is always the in-memory one and the health checks have no configuration; configure the providers in code for anything else.
Issuer alone is not enough: the JWT options are validated at start-up, and without Audience and an RS256 signing
key the application fails to start with JwtOptions is invalid: • Audience: null or empty and
• RsaKeyBase64: KeySource=Configuration but RsaKeyBase64 is empty. The bundle does not bind the key; set it (and any
other JwtOptions value, such as AccessTokenExpiration) on JwtOptions yourself:
using Kck.Security.Jwt;
builder.Services.AddKckMinimalApiDefaults(builder.Configuration);
builder.Services.Configure<JwtOptions>(jwt =>
jwt.RsaKeyBase64 = Environment.GetEnvironmentVariable("JWT_RSA_KEY_B64"));
Resources
| 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
- Kck.Caching.Abstractions (>= 5.0.0)
- Kck.Caching.InMemory (>= 5.0.0)
- Kck.Core.Abstractions (>= 5.0.0)
- Kck.Exceptions.AspNetCore (>= 5.0.0)
- Kck.Logging.Serilog (>= 5.0.0)
- Kck.Observability.Abstractions (>= 5.0.0)
- Kck.Observability.OpenTelemetry (>= 5.0.0)
- Kck.Security.Abstractions (>= 5.0.0)
- Kck.Security.Jwt (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.