Winglet.Authentication.Testing 0.2.2

dotnet add package Winglet.Authentication.Testing --version 0.2.2
                    
NuGet\Install-Package Winglet.Authentication.Testing -Version 0.2.2
                    
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="Winglet.Authentication.Testing" Version="0.2.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Winglet.Authentication.Testing" Version="0.2.2" />
                    
Directory.Packages.props
<PackageReference Include="Winglet.Authentication.Testing" />
                    
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 Winglet.Authentication.Testing --version 0.2.2
                    
#r "nuget: Winglet.Authentication.Testing, 0.2.2"
                    
#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 Winglet.Authentication.Testing@0.2.2
                    
#: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=Winglet.Authentication.Testing&version=0.2.2
                    
Install as a Cake Addin
#tool nuget:?package=Winglet.Authentication.Testing&version=0.2.2
                    
Install as a Cake Tool

Winglet.Authentication.Testing

Winglet.Authentication.Testing 0.2.1 is a test-only package for deterministic canonical Winglet JWT v1 tests. It creates an ephemeral RSA keypair, issues only typ=winglet+jwt / RS256 tokens, and provides optional WebApplicationFactory configuration that replaces the production trust material for that host while retaining Winglet.Authentication 0.1.1's real validation pipeline.

Reference this package only from test projects, preferably with PrivateAssets="all". Never configure production applications to trust the test issuer or test key. The package does not provide a fake authentication handler, legacy token generator, OBO wire format or Party-specific authorization constants.

Use CreateAnonymousGlobalToken, CreateAuthenticatedToken, CreateStrongToken, CreateTenantToken, CreateStrongTenantToken and CreateServiceToken. Use RequireWingletPrivilege and the production authorization handlers to test authorization. The canonical wire contract is defined by docs/contracts/authentication/jwt-v1.md.

For a consumer service with production-style Authority/JWKS configuration, apply the helper to the real factory:

var auth = new WingletTestAuthentication();
var testFactory = productionFactory.WithWingletTestAuthentication(auth);

The helper targets the canonical Winglet Bearer scheme, replaces issuer and signing-key trust for that factory, and disables remote metadata discovery only in the test host. Consumers must not manually re-register JwtBearer, disable canonical validation, or add a fake authentication handler.

For standalone smoke, use await using var issuer = await WingletTestJwtIssuer.StartAsync(); it binds to a random localhost port and serves discovery plus JWKS. Use the issuer's semantic token factories and pass issuer.Issuer as the consuming service's configured issuer.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.2.2 78 9/10/2026
0.2.1 118 9/5/2026
0.1.0 93 9/5/2026