Nova.Sessions.AspNetCore
10.2.0
See the version list below for details.
dotnet add package Nova.Sessions.AspNetCore --version 10.2.0
NuGet\Install-Package Nova.Sessions.AspNetCore -Version 10.2.0
<PackageReference Include="Nova.Sessions.AspNetCore" Version="10.2.0" />
<PackageVersion Include="Nova.Sessions.AspNetCore" Version="10.2.0" />
<PackageReference Include="Nova.Sessions.AspNetCore" />
paket add Nova.Sessions.AspNetCore --version 10.2.0
#r "nuget: Nova.Sessions.AspNetCore, 10.2.0"
#:package Nova.Sessions.AspNetCore@10.2.0
#addin nuget:?package=Nova.Sessions.AspNetCore&version=10.2.0
#tool nuget:?package=Nova.Sessions.AspNetCore&version=10.2.0
Nova.Sessions.AspNetCore
ASP.NET Core middleware and services for activating, validating, and controlling Nova sessions.
Version 10.2.0
This is a breaking middleware release and must be upgraded together with
Nova.Sessions.Abstractions and Nova.Sessions.Data.Sql 10.2.0.
- 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 =>
{
options.MaxConcurrentSessions = 1;
options.ExpireTimeoutMins = 15;
options.IdleTimeoutMins = 20;
},
(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 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.4.0 | 41 | 10/21/2026 |
| 10.3.0 | 87 | 10/11/2026 |
| 10.2.1 | 102 | 10/11/2026 |
| 10.2.0 | 90 | 10/9/2026 |
| 10.1.4 | 110 | 9/28/2026 |
| 10.1.3 | 110 | 9/23/2026 |
| 10.1.2 | 107 | 9/23/2026 |
| 10.1.1 | 108 | 9/22/2026 |
| 10.1.0 | 107 | 9/22/2026 |
| 10.0.4 | 108 | 9/22/2026 |
| 10.0.3 | 118 | 9/13/2026 |
| 10.0.2 | 110 | 9/13/2026 |
| 2.0.3 | 158 | 7/14/2026 |
| 2.0.2 | 144 | 7/5/2026 |
| 2.0.1 | 133 | 7/5/2026 |
| 2.0.0 | 137 | 7/5/2026 |
10.2.0: Breaking session middleware update. Adds multi-server-safe session creation, asynchronous context building and audit logging, typed HTTP error handling, sampled license validation, and AddNovaSessions overloads for request-scoped client-state configuration. Requires Nova.Sessions.Abstractions and Nova.Sessions.Data.Sql 10.2.0.