Skip to content

Commit c8e5d75

Browse files
authored
Merge pull request #301 from DuendeSoftware/mb/conformance
Add conformance report example (v8)
2 parents 5fe2a4d + 56457a8 commit c8e5d75

3 files changed

Lines changed: 26 additions & 12 deletions

File tree

IdentityServer/v8/IdentityServerHost/src/HostingExtensions.cs

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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;
45
using Duende.IdentityServer;
6+
using Duende.IdentityServer.ConformanceReport;
57
using IdentityServerHost;
68
using 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;

IdentityServer/v8/IdentityServerHost/src/IdentityServerHost.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
<ItemGroup>
99
<PackageReference Include="Duende.IdentityServer" Version="8.0.0-alpha.1" />
10+
<PackageReference Include="Duende.IdentityServer.ConformanceReport" Version="0.1.0-alpha.0.3488" />
1011
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
1112
</ItemGroup>
1213

IdentityServer/v8/IdentityServerHost/src/Pages/Index.cshtml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
Click <a href="~/grants">here</a> to manage your stored grants.
2222
</li>
2323
<li>
24-
Click <a href="~/ciba/all">here</a> to view your pending CIBA login requests.
24+
Click <a href="~/ciba/all">here</a> to view your pending CIBA login requests.
25+
</li>
26+
<li>
27+
Click <a href="~/_duende/conformance-report">here</a> to view the FAPI conformance report.
2528
</li>
2629
<li>
2730
Here are links to the

0 commit comments

Comments
 (0)