From 56457a87721a1378d93cf5dad0b1976d2b476950 Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Thu, 5 Mar 2026 13:25:38 +0100 Subject: [PATCH] Add conformance report example (v8) --- .../src/HostingExtensions.cs | 32 ++++++++++++------- .../src/IdentityServerHost.csproj | 1 + .../IdentityServerHost/src/Pages/Index.cshtml | 5 ++- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/IdentityServer/v8/IdentityServerHost/src/HostingExtensions.cs b/IdentityServer/v8/IdentityServerHost/src/HostingExtensions.cs index 339769d5..8afdb589 100644 --- a/IdentityServer/v8/IdentityServerHost/src/HostingExtensions.cs +++ b/IdentityServer/v8/IdentityServerHost/src/HostingExtensions.cs @@ -1,7 +1,9 @@ // Copyright (c) Duende Software. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +using Duende.ConformanceReport.Endpoints; using Duende.IdentityServer; +using Duende.IdentityServer.ConformanceReport; using IdentityServerHost; using Serilog; @@ -11,19 +13,20 @@ public static WebApplication ConfigureServices(this WebApplicationBuilder builde { builder.Services.AddRazorPages(); - var idsvrBuilder = builder.Services.AddIdentityServer(options => - { - options.Events.RaiseErrorEvents = true; - options.Events.RaiseInformationEvents = true; - options.Events.RaiseFailureEvents = true; - options.Events.RaiseSuccessEvents = true; + var idsvrBuilder = builder.Services + .AddIdentityServer(options => + { + options.Events.RaiseErrorEvents = true; + options.Events.RaiseInformationEvents = true; + options.Events.RaiseFailureEvents = true; + options.Events.RaiseSuccessEvents = true; - // see https://docs.duendesoftware.com/identityserver/fundamentals/resources/api-scopes - options.EmitStaticAudienceClaim = true; - options.PushedAuthorization.AllowUnregisteredPushedRedirectUris = true; + // see https://docs.duendesoftware.com/identityserver/fundamentals/resources/api-scopes + options.EmitStaticAudienceClaim = true; + options.PushedAuthorization.AllowUnregisteredPushedRedirectUris = true; - options.Preview.StrictClientAssertionAudienceValidation = true; - }) + options.Preview.StrictClientAssertionAudienceValidation = true; + }) .AddTestUsers(TestUsers.Users); idsvrBuilder.AddInMemoryIdentityResources(Resources.Identity); @@ -31,6 +34,12 @@ public static WebApplication ConfigureServices(this WebApplicationBuilder builde idsvrBuilder.AddInMemoryApiResources(Resources.ApiResources); idsvrBuilder.AddInMemoryClients(Clients.List); + // Add conformance report + idsvrBuilder.AddConformanceReport(options => + { + options.Enabled = true; + }); + // this is only needed for the JAR and JWT samples and adds supports for JWT-based client authentication idsvrBuilder.AddJwtBearerClientAuthentication(); @@ -70,6 +79,7 @@ public static WebApplication ConfigurePipeline(this WebApplication app) app.UseRouting(); app.UseIdentityServer(); app.UseAuthorization(); + app.MapConformanceReport(); app.MapRazorPages(); return app; diff --git a/IdentityServer/v8/IdentityServerHost/src/IdentityServerHost.csproj b/IdentityServer/v8/IdentityServerHost/src/IdentityServerHost.csproj index 2143ce9b..db7ac524 100755 --- a/IdentityServer/v8/IdentityServerHost/src/IdentityServerHost.csproj +++ b/IdentityServer/v8/IdentityServerHost/src/IdentityServerHost.csproj @@ -7,6 +7,7 @@ + diff --git a/IdentityServer/v8/IdentityServerHost/src/Pages/Index.cshtml b/IdentityServer/v8/IdentityServerHost/src/Pages/Index.cshtml index 440a8fc6..73b23f0c 100644 --- a/IdentityServer/v8/IdentityServerHost/src/Pages/Index.cshtml +++ b/IdentityServer/v8/IdentityServerHost/src/Pages/Index.cshtml @@ -21,7 +21,10 @@ Click here to manage your stored grants.
  • - Click here to view your pending CIBA login requests. + Click here to view your pending CIBA login requests. +
  • +
  • + Click here to view the FAPI conformance report.
  • Here are links to the