Cerbi.CerbiStream.Auth
1.0.0
See the version list below for details.
dotnet add package Cerbi.CerbiStream.Auth --version 1.0.0
NuGet\Install-Package Cerbi.CerbiStream.Auth -Version 1.0.0
<PackageReference Include="Cerbi.CerbiStream.Auth" Version="1.0.0" />
<PackageVersion Include="Cerbi.CerbiStream.Auth" Version="1.0.0" />
<PackageReference Include="Cerbi.CerbiStream.Auth" />
paket add Cerbi.CerbiStream.Auth --version 1.0.0
#r "nuget: Cerbi.CerbiStream.Auth, 1.0.0"
#:package Cerbi.CerbiStream.Auth@1.0.0
#addin nuget:?package=Cerbi.CerbiStream.Auth&version=1.0.0
#tool nuget:?package=Cerbi.CerbiStream.Auth&version=1.0.0
Cerbi.Auth
Reusable helpers that standardize how Cerbi APIs configure JWT bearer authentication. The package binds configuration from conventional Jwt sections, enforces safe HTTPS defaults outside local development, and exposes a single AddCerbiJwtAuth extension for easy service registration.
Installation
dotnet add package Cerbi.CerbiStream.Auth
Or reference the project directly:
<ProjectReference Include="src/Cerbi.Auth/Cerbi.Auth.csproj" />
Usage
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddCerbiJwtAuth(
builder.Configuration,
options =>
{
options.RequireHttpsMetadata = true;
options.SaveToken = true;
});
Configuration can live under either Jwt:* (preferred) or Authentication:Jwt:*:
{
"Jwt": {
"Authority": "https://login.cerbi.dev",
"Audience": "cerbi-api"
}
}
Local-only scenarios may disable HTTPS metadata by setting Jwt:RequireHttpsMetadata to false while DOTNET_ENVIRONMENT is Development.
Local packaging
dotnet pack src/Cerbi.Auth/Cerbi.Auth.csproj --configuration Release -o .nupkgs
Consume the nupkg via a local feed:
dotnet nuget add source $(pwd)/.nupkgs --name cerbi-local
Contributing
dotnet test Cerbi.Auth.sln- Submit PRs with green CI and updated documentation/tests.
License
MIT
| 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
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 8.0.6)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.