Clarify code sample in readme

This commit is contained in:
Joe DeCock 2026-01-05 16:49:45 -06:00
parent 9dbd7df396
commit 7201602876

View file

@ -16,11 +16,12 @@ To get started, install this package and then add some minimal configuration:
```cs
// Keep your existing code that configures the JwtBearer handler unchanged:
builder.Services.AddAuthentication("token")
var schemeName = "token";
builder.Services.AddAuthentication(schemeName)
.AddJwtBearer("token", options => { /* Your existing configuration here */ });
// Add DPoP support with our extensions:
builder.Services.ConfigureDPoPTokensForScheme("token", options =>
builder.Services.ConfigureDPoPTokensForScheme(schemeName, options =>
{
options.EnableReplayDetection = false; // Disable replay detection to show a minimal setup
options.AllowBearerTokens = true; // Allow both Bearer and DPoP tokens, to facilitate migration to DPoP