WoW2.Sdk.Beta.Be.Identity.Testing 10.0.27-beta

Prefix Reserved
This is a prerelease version of WoW2.Sdk.Beta.Be.Identity.Testing.
dotnet add package WoW2.Sdk.Beta.Be.Identity.Testing --version 10.0.27-beta
                    
NuGet\Install-Package WoW2.Sdk.Beta.Be.Identity.Testing -Version 10.0.27-beta
                    
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="WoW2.Sdk.Beta.Be.Identity.Testing" Version="10.0.27-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WoW2.Sdk.Beta.Be.Identity.Testing" Version="10.0.27-beta" />
                    
Directory.Packages.props
<PackageReference Include="WoW2.Sdk.Beta.Be.Identity.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 WoW2.Sdk.Beta.Be.Identity.Testing --version 10.0.27-beta
                    
#r "nuget: WoW2.Sdk.Beta.Be.Identity.Testing, 10.0.27-beta"
                    
#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 WoW2.Sdk.Beta.Be.Identity.Testing@10.0.27-beta
                    
#: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=WoW2.Sdk.Beta.Be.Identity.Testing&version=10.0.27-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=WoW2.Sdk.Beta.Be.Identity.Testing&version=10.0.27-beta&prerelease
                    
Install as a Cake Tool

WoW2.Sdk.Beta.Be.Identity.Testing

The Identity test kit. Today it holds the fake token issuer; fakes over the contract, personas, the OTP code sink and the broker conformance bases land once the contract's brokers exist. It references the contract, WoW2.Sdk.Beta.Be.Identity.Auth and WoW2.Sdk.Beta.Be.Testing.

dotnet add package WoW2.Sdk.Beta.Be.Identity.Testing --prerelease

Fake token issuer

FakeTokenIssuer signs person, service and exchanged tokens in the exact shape Identity issues, with an in-memory RSA key, so a consumer tests with no Identity running.

using var issuer = new FakeTokenIssuer();

await using var factory = new WebApplicationFactory<Program>().WithWebHostBuilder(host =>
    host.ConfigureTestServices(services => services.AddFakeTokenIssuer(issuer)));
var client = factory.CreateClient();

// The audience is the host's real one: a wrong one still answers 401.
var worker = issuer.IssueServiceToken("ocharo-editorial", "https://files.example.com/", "files.read");
client.DefaultRequestHeaders.Authorization = new("Bearer", worker);
await client.GetAsync("/files");

var person = new FakePerson { Id = Guid.NewGuid(), OrganizationId = organizationId, Role = "owner", Permissions = ["files:share"], SessionId = Guid.NewGuid() };
var own = issuer.IssuePersonToken(person, "https://files.example.com/", scopes: "files.read");
var exchanged = issuer.IssueExchangedToken(person, "ocharo-editorial", "https://files.example.com/", "files.read");
  • AddFakeTokenIssuer makes the default JwtBearer scheme trust only the fake. A host's metadata address, trusted issuers and resolver stop being read, so nothing reaches a network; its audiences stay.
  • issuer.AsTrustedIssuer(partition, audiences) is the other way in: add it to JwtOptions.TrustedIssuers when a test needs the real trusted-issuer pipeline, a stamped partition included.
  • Lifetime defaults to 5 minutes; clock dates the tokens, so a past clock makes an expired token.

A caller under test

CreateTokenEndpointHandler() answers form posts as Identity's /connect/token does, for client_credentials and token exchange. Swap it in as the primary handler of the named HttpClient the be sdk's token handler posts through, or use a plain HttpClient:

using var tokens = new HttpClient(issuer.CreateTokenEndpointHandler());
var response = await tokens.PostAsync("https://fake-issuer.test/connect/token", new FormUrlEncodedContent(new Dictionary<string, string>
{
    ["grant_type"] = "client_credentials",
    ["client_id"] = "ocharo-editorial",
    ["client_secret"] = "any",
    ["resource"] = "https://desk.example.com/",
    ["scope"] = "desk.media",
}));

The handler has no registry: any client may ask for any resource and scope, a client secret isn't checked, an omitted scope grants none, and an exchanged token keeps every permission. A failure answers 400 with { "error": … }, under the same error codes as Identity.

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
10.0.27-beta 0 11/5/2026
10.0.26-beta 39 11/5/2026
10.0.25-beta 41 11/5/2026
10.0.24-beta 52 11/3/2026
10.0.23-beta 50 11/2/2026
10.0.22-beta 52 11/2/2026
10.0.21-beta 59 11/2/2026
10.0.20-beta 59 11/2/2026
10.0.19-beta 61 11/2/2026
10.0.18-beta 61 11/2/2026
10.0.17-beta 60 11/2/2026
10.0.16-beta 56 11/2/2026
10.0.15-beta 56 11/2/2026
10.0.14-beta 62 11/1/2026
10.0.13-beta 60 11/1/2026
10.0.12-beta 56 11/1/2026
10.0.11-beta 58 11/1/2026
10.0.10-beta 59 10/30/2026
10.0.9-beta 60 10/30/2026
10.0.8-beta 60 10/28/2026
Loading failed