Wiaoj.Pagination.Signing 0.5.1-alpha

This is a prerelease version of Wiaoj.Pagination.Signing.
dotnet add package Wiaoj.Pagination.Signing --version 0.5.1-alpha
                    
NuGet\Install-Package Wiaoj.Pagination.Signing -Version 0.5.1-alpha
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Wiaoj.Pagination.Signing" Version="0.5.1-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wiaoj.Pagination.Signing" Version="0.5.1-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Wiaoj.Pagination.Signing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Wiaoj.Pagination.Signing --version 0.5.1-alpha
                    
#r "nuget: Wiaoj.Pagination.Signing, 0.5.1-alpha"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Wiaoj.Pagination.Signing@0.5.1-alpha
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Wiaoj.Pagination.Signing&version=0.5.1-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Wiaoj.Pagination.Signing&version=0.5.1-alpha&prerelease
                    
Install as a Cake Tool

Wiaoj.Pagination.Signing

Optional deterministic authentication for opaque Wiaoj Pagination cursors. This package does not depend on Entity Framework, Querying, ASP.NET Core or a particular secret store. It never encrypts payloads and is not an authorization mechanism. Do not put confidential values into cursor payloads.

using Wiaoj.Pagination.Signing;

var policy = new KeysetCursorSigning("catalog.assets.v1", currentKey, [previousKey]);
var page = policy.BeginPage();
var cursor = page.Sign(sortKeyBytes);
if (!policy.TryVerify(cursor, out var verifiedPayload))
{
    // Treat it as an invalid cursor; never try unsigned parsing as a fallback.
}

A stable purpose separates endpoint/security scopes. The endpoint still owns authorization, query/sort binding, cursor serialization and validation of the authenticated bytes. Capture a page signer once per result page so every emitted cursor uses the same key version. Retain prior keys only for the configured rollout window. A signing policy has no built-in expiry; removing a key invalidates its cursors. Authentication deliberately does not alter the existing Querying v1 signed wire format.

You can also use KeysetCursorSigning.FromSecurity with a versioned ISubkeyDeriver<TContext>, or add startup-validated profiles directly to your host:

using Microsoft.Extensions.DependencyInjection;
using Wiaoj.Pagination.Signing;

services.AddPagination(pagination =>
    pagination.AddKeysetCursorSigning<CatalogCursorProfile, CatalogKeyContext>(
        configuration.GetSection("CursorSigning:Catalog")));

Register the matching Wiaoj.Security subkey deriver in the host. Configuration contains only the non-secret Purpose. Inject IKeysetCursorSigning<CatalogCursorProfile> and pass its policy explicitly; the named registration overload remains available for apps that choose profiles at runtime. The Querying EF fluent registration delegates to the same services. Do not place raw keys in configuration.

Package boundary and upgrades

Applications using only cursor signing can reference Wiaoj.Pagination.Signing directly. Wiaoj.Querying.Pagination.EntityFrameworkCore references it transitively: installing the EF adapter provides the types, but no endpoint signs cursors unless it explicitly passes a signing policy. Consumers of the pre-split drafts move their signing imports to using Wiaoj.Pagination.Signing;; the Querying builder call and existing signed cursors remain unchanged. Replace the draft-only direct registration services.AddKeysetCursorSigning(...) with an AddKeysetCursorSigning(...) call inside the AddPagination callback.

The signing package and EF adapter must be included in the same separately approved release. The package smoke workflow tests local candidates only; it does not publish them.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Wiaoj.Pagination.Signing:

Package Downloads
Wiaoj.Querying.Pagination.EntityFrameworkCore

Applies Wiaoj queries and pagination to Entity Framework Core data.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.1-alpha 0 12/6/2026
0.5.0-alpha.1 0 12/5/2026