NPv.Auth.AspNetCore
0.4.0
dotnet add package NPv.Auth.AspNetCore --version 0.4.0
NuGet\Install-Package NPv.Auth.AspNetCore -Version 0.4.0
<PackageReference Include="NPv.Auth.AspNetCore" Version="0.4.0" />
<PackageVersion Include="NPv.Auth.AspNetCore" Version="0.4.0" />
<PackageReference Include="NPv.Auth.AspNetCore" />
paket add NPv.Auth.AspNetCore --version 0.4.0
#r "nuget: NPv.Auth.AspNetCore, 0.4.0"
#:package NPv.Auth.AspNetCore@0.4.0
#addin nuget:?package=NPv.Auth.AspNetCore&version=0.4.0
#tool nuget:?package=NPv.Auth.AspNetCore&version=0.4.0
NPv.Auth.AspNetCore
ASP.NET Core host integration for NPv authentication realms.
The package provides Minimal API auth endpoints, secure auth-cookie handling,
claims helpers, and dependency-injection registration for the application
workflows in NPv.Auth.Application.
Status
This package is at an early stage (0.x). Its public API, endpoint routes, and
cookie behavior may change between minor versions.
Installation
dotnet add package NPv.Auth.AspNetCore
Register a realm during application startup and map its endpoints in the host:
services.AddAuthRealm<Account, EmailConfirmation, PasswordRecovery, RefreshToken>(
new AuthRealmOptions
{
Name = "admin",
Path = "/api/admin/auth",
ClientBaseUrl = "https://admin.example.com",
RefreshCookieName = "a_rt",
DeviceCookieName = "a_di"
});
app.MapAuthRealm<Account>();
The host remains responsible for authentication middleware, authorization, configuration values, persistence registration, and database migrations.
Author's Note
This library grew out of my long-standing personal interest in structuring and publishing open source packages. Over time, I’ve revisited and refined earlier internal utilities and ideas, giving them a more consistent shape and preparing them for wider reuse. Along the way, I’ve also taken the opportunity to explore how open source distribution and licensing work in the .NET ecosystem.
It’s a small step toward something I’ve always wanted to try — sharing practical, minimal tools that reflect years of learning, experimentation, and refinement.
Hopefully, someone finds it useful.
Nikolai 😛
⚖️ License
MIT — you are free to use this in commercial and open-source software.
| 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
- NPv.AspNetCore.Endpoints (>= 0.1.0)
- NPv.Auth.Application (>= 0.4.0)
- NPv.Auth.Domain (>= 0.2.0)
- NPv.CQS.Abstractions (>= 3.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.