MrWhoOidc.Client 2.0.1

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

MrWhoOidc.Client

Client SDK for integrating .NET applications with the MrWhoOidc authorization server. The package offers:

  • Strongly-typed options with validation and configuration binding helpers.
  • Discovery client with caching and telemetry instrumentation.
  • JWKS cache utilities ready for token validation scenarios.
  • Token client supporting authorization code, client credentials, refresh tokens, token exchange, and JARM validation.
  • Authorization helper capable of emitting JAR request objects (signed with client secret or custom credentials).
  • Logout manager that builds front-channel logout URLs and validates back-channel logout tokens (with replay protection).
  • Optional PKCE builder, state/nonce helpers, and DPoP proof generation hooks.

Getting started

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddMrWhoOidcClient(builder.Configuration, sectionName: "MrWhoOidc:Client");

var app = builder.Build();

Configuration highlights

"MrWhoOidc": {
	"Issuer": "https://issuer",
	"ClientId": "web-client",
	"ClientSecret": "super-secret",
	"Scopes": [ "openid", "profile" ],
	"Jar": {
		"Enabled": true,
		"SigningAlgorithm": "HS256",
		"Lifetime": "00:05:00"
	},
	"Jarm": {
		"Enabled": true,
		"ResponseMode": "query.jwt"
		},
		"Logout": {
			"EnableBackchannel": true,
			"BackchannelReplayCacheDuration": "00:05:00"
	}
}
### Front-channel logout helper

```csharp
public class LogoutController(IMrWhoLogoutManager logoutManager)
{
	[HttpGet("/signout")] 
	public async Task<IActionResult> SignOutAsync([FromQuery] string? returnUrl)
	{
		var callback = new Uri("https://app.example.com/signed-out");
		var request = await logoutManager.BuildFrontChannelLogoutAsync(new FrontChannelLogoutOptions
		{
			PostLogoutRedirectUri = callback,
			IdTokenHint = await HttpContext.GetTokenAsync("id_token"),
			Sid = User.FindFirst("sid")?.Value
		});

		await HttpContext.SignOutAsync();
		return Redirect(request.LogoutUri.ToString());
	}
}
```

### Back-channel logout validation

```csharp
[HttpPost("/backchannel-logout")]
public async Task<IActionResult> ReceiveLogoutAsync([FromForm(Name = "logout_token")] string logoutToken,
	IMrWhoLogoutManager logoutManager, IDistributedCache replayCache)
{
	var result = await logoutManager.ValidateBackchannelLogoutAsync(logoutToken);
	if (!result.Success)
	{
		return BadRequest(result.Error);
	}

	await _sessionStore.RevokeBySidAsync(result.Sid);
	return Ok();
}
```

Troubleshooting JAR/JARM

  • invalid_state after redirect: ensure the state claim inside the JARM payload matches the stored state (cookies can be cleared if callbacks are delayed).
  • invalid_response with c_hash or s_hash: verify the authorization server uses the same signing key advertised in discovery/JWKS and that the callback reuses the same state and code.
  • Missing signing key for request objects: configure either ClientSecret (HS256) or provide a custom Jar.SigningCredentialsResolver that returns asymmetric credentials with an explicit kid for rotation.
  • JARM validation failures in integration tests: call IMrWhoJwksCache.Invalidate() after rotating server keys so cached metadata refreshes.

See the docs in /docs/mrwhooidc-client-nuget-backlog.md for the roadmap and /docs/developer-guide.md for server-side integration details.

Additional notes on signed request objects and JARM validation live in /docs/jar-jarm-guide.md.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
2.0.1 1,182 1/2/2026
2.0.0 141 1/2/2026