Skip to content

Commit 289763f

Browse files
MackinnonBuckcaptainsafia
authored andcommitted
Provide Microsoft.AspNetCore.Authentication.Certificate package README (#57811)
1 parent 45e4920 commit 289763f

File tree

1 file changed

+42
-0
lines changed
  • src/Security/Authentication/Certificate/src

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## About
2+
3+
`Microsoft.AspNetCore.Authentication.Certificate` provides ASP.NET Core middleware that enables an application to support certificate authentication.
4+
5+
## How to Use
6+
7+
To use `Microsoft.AspNetCore.Authentication.Certificate`, follow these steps:
8+
9+
### Installation
10+
11+
```shell
12+
dotnet add package Microsoft.AspNetCore.Authentication.Certificate
13+
```
14+
15+
### Configuration
16+
17+
1. Acquire an HTTPS certificate, install it, and [configure your server](https://learn.microsoft.com/aspnet/core/security/authentication/certauth#configure-your-server-to-require-certificates) to require certificates
18+
2. Configure the middleware in your APS.NET Core app's `Program.cs`:
19+
```csharp
20+
var builder = WebApplication.CreateBuilder(args);
21+
22+
builder.Services.AddAuthentication(
23+
CertificateAuthenticationDefaults.AuthenticationScheme)
24+
.AddCertificate();
25+
26+
var app = builder.Build();
27+
28+
app.UseAuthentication();
29+
```
30+
31+
## Main Types
32+
33+
* `CertificateAuthenticationOptions`: Provides options to configure certificate authentication
34+
* `ICertificateValidationCache`: Provides a cache used to store `AuthenticateResult` results after the certificate has been validated
35+
36+
## Additional Documentation
37+
38+
For additional documentation and examples, refer to the [official documentation](https://learn.microsoft.com/aspnet/core/security/authentication/certauth) on certificate authentication in ASP.NET Core.
39+
40+
## Feedback & Contributing
41+
42+
`Microsoft.AspNetCore.Authentication.Certificate` is released as open-source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/aspnetcore).

0 commit comments

Comments
 (0)