TokenInspect 0.2.0
dotnet add package TokenInspect --version 0.2.0
NuGet\Install-Package TokenInspect -Version 0.2.0
<PackageReference Include="TokenInspect" Version="0.2.0" />
<PackageVersion Include="TokenInspect" Version="0.2.0" />
<PackageReference Include="TokenInspect" />
paket add TokenInspect --version 0.2.0
#r "nuget: TokenInspect, 0.2.0"
#:package TokenInspect@0.2.0
#addin nuget:?package=TokenInspect&version=0.2.0
#tool nuget:?package=TokenInspect&version=0.2.0
TokenInspect
Core library for the Token Inspect plugin: a didactic token-flow inspector for OIDC/OAuth 2.0 applications.
This package provides:
IFlowRecorder: the contract that host code calls to begin a flow run, append steps, and complete or fail it. Ships with aNullFlowRecorder(no-op, safe default) and an in-memoryFlowRecorder.ITraceStore: the host-implemented persistence abstraction. The library never persists anything itself; the host wires Redis, a database, or in-memory.MapTokenInspect(): the egress endpoint extension. Returns the journal for the authorized principal only. TheAuthorizedelegate defaults to deny; the host must opt in.
Install
dotnet add package TokenInspect
Basic use (host wiring)
builder.Services.AddTokenInspect(opts =>
{
opts.Enabled = !builder.Environment.IsProduction();
opts.Authorize = (ctx, sessionId) =>
{
// Host-defined ownership check; never trust a request-supplied id.
return ctx.Request.Cookies.TryGetValue("session", out var owned)
&& string.Equals(owned, sessionId, StringComparison.Ordinal);
};
});
// Your ITraceStore implementation:
builder.Services.AddSingleton<ITraceStore, MyRedisTraceStore>();
var app = builder.Build();
app.MapTokenInspect(); // GET /internal/trace (gated by Authorize)
For an ASP.NET middleware that records server-side hops automatically (validation, RBAC, downstream calls), see TokenInspect.AspNetCore.
Security
The package is inert until Enabled = true. The Authorize delegate defaults to deny: no host wiring, no access. See the security model for the full set of controls.
License
MIT.
| Product | Versions 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. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TokenInspect:
| Package | Downloads |
|---|---|
|
TokenInspect.AspNetCore
Drop-in ASP.NET Core middleware for the Token Inspect plugin: records incoming token validation, RBAC, and downstream calls per correlation id. Bounded ring with TTL, dev endpoint loopback-only by default, principal-derived Authorize delegate. |
GitHub repositories
This package is not used by any popular GitHub repositories.