Nova.Sessions.AspNetCore
10.3.0
dotnet add package Nova.Sessions.AspNetCore --version 10.3.0
NuGet\Install-Package Nova.Sessions.AspNetCore -Version 10.3.0
<PackageReference Include="Nova.Sessions.AspNetCore" Version="10.3.0" />
<PackageVersion Include="Nova.Sessions.AspNetCore" Version="10.3.0" />
<PackageReference Include="Nova.Sessions.AspNetCore" />
paket add Nova.Sessions.AspNetCore --version 10.3.0
#r "nuget: Nova.Sessions.AspNetCore, 10.3.0"
#:package Nova.Sessions.AspNetCore@10.3.0
#addin nuget:?package=Nova.Sessions.AspNetCore&version=10.3.0
#tool nuget:?package=Nova.Sessions.AspNetCore&version=10.3.0
Nova.Sessions.AspNetCore
ASP.NET Core middleware and services for activating, validating, and controlling Nova sessions.
Version 10.3.0
This is a breaking middleware release and must be upgraded together with
Nova.Sessions.Abstractions and Nova.Sessions.Data.Sql 10.2.0.
Uses
Nova.Sessions.Model.NovaSessionOptionsas the single options contract for middleware and licensing-client initialization.Validates at startup that
LicensingBaseUrlis an absolute HTTP or HTTPS URL.Removes the duplicate
Nova.Sessions.AspNetCore.Model.NovaSessionOptionstype and its temporary mapping adapter.Adds structured validation-start diagnostics for client state and session settings, with password and salt values redacted.
Returns a structured
401 Unauthorizedresponse when the client must authenticate again.Returns a structured
403 Forbiddenresponse for expected session-policy rejection.Includes the stable session error code and request trace identifier in error responses.
Allows unexpected failures to reach the consuming application's global exception handler.
Treats missing, malformed, or inconsistent JWT timing claims as reauthentication failures.
Returns a generic structured
500 Internal Server Errorfor known session-configuration failures while logging diagnostic details internally.Returns
503 Service UnavailablewithRetry-Afterfor licensing and distributed-lock availability failures.Corrects the token-versus-session lifetime comparisons.
Validates session option ranges and timeout relationships when the application starts.
Uses the same
NovaSessionOptionstype in registration, validation, and runtime services.Uses
IAuditLogfor session audit events and awaits every audit operation.Preserves an application-provided
IAuditLog; the package no-op logger is registered only as a fallback.Removes RayAudit, Graylog, and Serilog package dependencies from the session middleware package.
Samples active-session license validation and distinguishes rejected licenses from temporary licensing-service failures.
Lets consuming applications initialize application-specific
ClientStateBasevalues inProgram.cswithout adding a separate middleware.Requires the consuming application to provide
ClientStateBase.System; JWT, IP, user-agent, path, and server values are populated by Nova.
Client-state configuration
Configure session options and application-specific client-state values together:
builder.Services.AddNovaSessions(
options => builder.Configuration
.GetSection("NovaSessionOptions")
.Bind(options),
(context, state) =>
{
state.System = "accounting4";
state.SystemVersion = "1405.1";
state.Branch = 1;
state.DbId = "main";
state.DbName = "ERP";
state.DbServer = "sql01";
state.DbServerId = "primary";
});
For request-dependent values, use the asynchronous overload and resolve scoped services through context.RequestServices. The separate ConfigureNovaClientState() extension remains available for advanced replacement and testing scenarios.
Place the session middleware after forwarded-header and authentication middleware:
app.UseForwardedHeaders();
app.UseAuthentication();
app.UseNovaSessions();
app.UseAuthorization();
No separate UseClientStateSetter() middleware is required.
Migration from 10.1.x
- Upgrade
Nova.Sessions.Abstractions,Nova.Sessions.Data.Sql, andNova.Sessions.AspNetCoretogether to 10.2.0. - Replace explicit references to
Nova.Sessions.AspNetCore.Model.NovaSessionOptionswithNova.Sessions.Model.NovaSessionOptions; inferredAddNovaSessionslambdas require no code change. - Replace custom
ISessionContextBuilder.Buildimplementations withBuildAsyncand await audit operations. - Configure the required
ClientStateBase.Systemvalue through anAddNovaSessionsclient-state callback. - Update direct construction of
JwtSessionContextBuilderfor its new dependencies; dependency injection is recommended. - Do not rely on the package to register or resolve
ISystemResolver; the consuming application now supplies the system value. - Ensure issued access tokens contain a
jticlaim. - Handle the middleware's structured
401,403, and503responses where applicable. Unexpected exceptions continue to the application's global exception handler.
| 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
- AutoMapper (>= 15.1.3)
- FluentValidation (>= 12.0.0)
- Nova.Abstractions (>= 10.0.2)
- Nova.Abstractions.Security (>= 10.0.2)
- Nova.Licensing.Client (>= 10.0.3)
- Nova.Model (>= 10.0.2)
- Nova.Security (>= 10.0.3)
- Nova.Sessions.Abstractions (>= 10.2.0)
- Nova.Sessions.Data.Sql (>= 10.2.0)
- Nova.Sessions.Model (>= 10.0.2)
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 |
|---|---|---|
| 10.3.0 | 82 | 10/11/2026 |
| 10.2.1 | 98 | 10/11/2026 |
| 10.2.0 | 86 | 10/9/2026 |
| 10.1.4 | 107 | 9/28/2026 |
| 10.1.3 | 107 | 9/23/2026 |
| 10.1.2 | 104 | 9/23/2026 |
| 10.1.1 | 105 | 9/22/2026 |
| 10.1.0 | 105 | 9/22/2026 |
| 10.0.4 | 104 | 9/22/2026 |
| 10.0.3 | 114 | 9/13/2026 |
| 10.0.2 | 108 | 9/13/2026 |
| 2.0.3 | 155 | 7/14/2026 |
| 2.0.2 | 141 | 7/5/2026 |
| 2.0.1 | 131 | 7/5/2026 |
| 2.0.0 | 134 | 7/5/2026 |
10.3.0: Breaking API update. Uses Nova.Sessions.Model.NovaSessionOptions as the single shared session-options contract for middleware and licensing-client initialization, validates LicensingBaseUrl at startup, and adds structured validation-start diagnostics with sensitive credential fields redacted.