Toamaisutaa.OpenIdConnect 0.5.0

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

Toamaisutaa.OpenIdConnect

Bearer token validation for Toamaisutaa. This is the resource-server half: it validates the tokens your identity provider issues, and signs the ones local password login issues, so that nothing downstream can tell the two apart.

builder.Services.AddToamaisutaaBearer(builder.Configuration);   // section "Oidc"

app.UseAuthentication();
{
  "Oidc": {
    "Authority": "https://id.example.com/realms/main",
    "ClientId": "your-api",
    "RoleClaim": "roles"
  }
}

Every endpoint comes from the issuer's discovery document, so Keycloak, Authentik, Pocket ID, Okta and Entra are a configuration change rather than a code change.

What it does beyond the defaults

  • MapInboundClaims is off, always. Claims keep the names the issuer gave them, so sub is sub and not a SOAP-era URI that only matches by accident.
  • Userinfo enrichment, for issuers that keep group membership out of the access token entirely. Off unless configured.
  • 403s that explain themselves. Every refusal logs which claim was read, what the token actually carried there, and every claim type present. An empty 403 with a valid token is a miserable afternoon; this is the fix.
  • Query-string tokens for named paths, because SignalR's browser transport cannot set a header. Opt-in per path prefix rather than globally.

This package does not perform an interactive login. It is a resource server: the browser gets its tokens from the identity provider, and this validates them.

Pair it with Toamaisutaa.AspNetCore for authorization policies, ICurrentUser and the endpoints.

Documentation

OIDC bearer validation - docs.toamaisutaa.pianonic.ch

Licensed under PolyForm Noncommercial 1.0.0 - free for noncommercial use; commercial use needs a separate licence.

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 (1)

Showing the top 1 NuGet packages that depend on Toamaisutaa.OpenIdConnect:

Package Downloads
Toamaisutaa.AspNetCore

ASP.NET Core integration for Toamaisutaa: the authenticated-by-default authorization policy, ICurrentUser, the runtime OIDC configuration endpoint a SPA reads at startup, and the local username and password sign-in endpoints.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.0 0 8/12/2026
0.4.0 0 8/12/2026
0.3.0 38 8/11/2026
0.2.0 35 8/11/2026
0.1.0 40 8/11/2026