Skip to content

Commit 29a4be5

Browse files
authored
Merge pull request #52 from DuendeSoftware/mb/conformance
Add Conformance Report feature and required dependencies
2 parents 229fd62 + 5c64500 commit 29a4be5

3 files changed

Lines changed: 29 additions & 3 deletions

File tree

src/Duende.IdentityServer.Demo.csproj

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

1010
<ItemGroup>
1111
<PackageReference Include="Duende.IdentityServer" Version="8.0.0-alpha.1" />
12+
<PackageReference Include="Duende.IdentityServer.ConformanceReport" Version="0.1.0-alpha.0.3488" />
1213
<PackageReference Include="Duende.AspNetCore.Authentication.JwtBearer" Version="0.3.0" />
1314
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
1415
</ItemGroup>

src/HostingExtensions.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using Duende.AspNetCore.Authentication.JwtBearer.DPoP;
2+
using Duende.ConformanceReport.Endpoints;
23
using Duende.IdentityServer.Configuration;
4+
using Duende.IdentityServer.ConformanceReport;
35
using Duende.IdentityServer.Services;
46
using Duende.IdentityServer.Validation;
57
using IdentityServerHost;
@@ -57,7 +59,11 @@ public static WebApplication ConfigureServices(this WebApplicationBuilder builde
5759
.AddTestUsers(TestUsers.Users)
5860
.AddJwtBearerClientAuthentication()
5961
.AddSaml()
60-
.AddInMemorySamlServiceProviders(Config.SamlServiceProviders);
62+
.AddInMemorySamlServiceProviders(Config.SamlServiceProviders)
63+
.AddConformanceReport(options =>
64+
{
65+
options.Enabled = true;
66+
});
6167

6268
builder.Services.AddAuthentication()
6369
.AddLocalApi()
@@ -128,8 +134,9 @@ public static WebApplication ConfigurePipeline(this WebApplication app)
128134
app.UseRouting();
129135
app.UseIdentityServer();
130136
app.UseAuthorization();
131-
132-
137+
138+
app.MapConformanceReport();
139+
133140
app.MapRazorPages()
134141
.RequireAuthorization();
135142
app.MapControllers();

src/Pages/Index.cshtml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@
7878
</a>
7979
</div>
8080
</div>
81+
<div class="card m-2" style="width: 18rem;">
82+
<div class="card-body">
83+
<h5 class="card-title">
84+
<i class="glyphicon glyphicon-flag"></i>
85+
Conformance Report
86+
</h5>
87+
<p class="card-text">Assess your configuration against
88+
<a href="https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1" rel="noopener noreferrer" target="_blank">OAuth 2.1</a> and
89+
<a href="https://openid.net/specs/fapi-2_0-security-profile.html" rel="noopener noreferrer" target="_blank">FAPI 2.0 Security Profile</a> specifications.
90+
</p>
91+
</div>
92+
<div class="card-footer p-0">
93+
<a href="/_duende/conformance-report" rel="nofollow" class="btn btn-primary w-100">
94+
Go
95+
<i class="glyphicon glyphicon-chevron-right"></i>
96+
</a>
97+
</div>
98+
</div>
8199
<div class="card m-2" style="width: 18rem;">
82100
<div class="card-body">
83101
<h5 class="card-title">

0 commit comments

Comments
 (0)