Skip to content

Commit

Permalink
fix: use delay client certificate mode
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed May 24, 2022
1 parent f10f124 commit d3ac7df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sample/Aguacongas.TheIdServer.MtlsSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async Task<TokenResponse> RequestTokenAsync()

if (response.IsError)
{
throw new Exception(response.Error);
throw response.Exception ?? new InvalidOperationException(response.Error);
}

return response;
Expand Down
3 changes: 1 addition & 2 deletions src/Aguacongas.TheIdServer.Shared/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
// when mutual TLS is enable the web host must receive client certificate
builder.WebHost.ConfigureKestrel(kestrel =>
{
kestrel.ConfigureHttpsDefaults(https => https.ClientCertificateMode = ClientCertificateMode.AllowCertificate);
kestrel.ConfigureHttpsDefaults(https => https.ClientCertificateMode = ClientCertificateMode.DelayCertificate);
});
}

Expand All @@ -60,5 +60,4 @@
});
app.UseTheIdServer(app.Environment, configuration);


app.Run();

0 comments on commit d3ac7df

Please sign in to comment.