11// Copyright (c) Duende Software. All rights reserved.
22// Licensed under the MIT License. See LICENSE in the project root for license information.
33
4+ using Duende . ConformanceReport . Endpoints ;
45using Duende . IdentityServer ;
6+ using Duende . IdentityServer . ConformanceReport ;
57using IdentityServerHost ;
68using Serilog ;
79
@@ -11,26 +13,33 @@ public static WebApplication ConfigureServices(this WebApplicationBuilder builde
1113 {
1214 builder . Services . AddRazorPages ( ) ;
1315
14- var idsvrBuilder = builder . Services . AddIdentityServer ( options =>
15- {
16- options . Events . RaiseErrorEvents = true ;
17- options . Events . RaiseInformationEvents = true ;
18- options . Events . RaiseFailureEvents = true ;
19- options . Events . RaiseSuccessEvents = true ;
16+ var idsvrBuilder = builder . Services
17+ . AddIdentityServer ( options =>
18+ {
19+ options . Events . RaiseErrorEvents = true ;
20+ options . Events . RaiseInformationEvents = true ;
21+ options . Events . RaiseFailureEvents = true ;
22+ options . Events . RaiseSuccessEvents = true ;
2023
21- // see https://docs.duendesoftware.com/identityserver/fundamentals/resources/api-scopes
22- options . EmitStaticAudienceClaim = true ;
23- options . PushedAuthorization . AllowUnregisteredPushedRedirectUris = true ;
24+ // see https://docs.duendesoftware.com/identityserver/fundamentals/resources/api-scopes
25+ options . EmitStaticAudienceClaim = true ;
26+ options . PushedAuthorization . AllowUnregisteredPushedRedirectUris = true ;
2427
25- options . Preview . StrictClientAssertionAudienceValidation = true ;
26- } )
28+ options . Preview . StrictClientAssertionAudienceValidation = true ;
29+ } )
2730 . AddTestUsers ( TestUsers . Users ) ;
2831
2932 idsvrBuilder . AddInMemoryIdentityResources ( Resources . Identity ) ;
3033 idsvrBuilder . AddInMemoryApiScopes ( Resources . ApiScopes ) ;
3134 idsvrBuilder . AddInMemoryApiResources ( Resources . ApiResources ) ;
3235 idsvrBuilder . AddInMemoryClients ( Clients . List ) ;
3336
37+ // Add conformance report
38+ idsvrBuilder . AddConformanceReport ( options =>
39+ {
40+ options . Enabled = true ;
41+ } ) ;
42+
3443 // this is only needed for the JAR and JWT samples and adds supports for JWT-based client authentication
3544 idsvrBuilder . AddJwtBearerClientAuthentication ( ) ;
3645
@@ -70,6 +79,7 @@ public static WebApplication ConfigurePipeline(this WebApplication app)
7079 app . UseRouting ( ) ;
7180 app . UseIdentityServer ( ) ;
7281 app . UseAuthorization ( ) ;
82+ app . MapConformanceReport ( ) ;
7383 app . MapRazorPages ( ) ;
7484
7585 return app ;
0 commit comments