Skip to content

Provide Microsoft.AspNetCore.Authentication.Certificate package README #57811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions src/Security/Authentication/Certificate/src/PACKAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## About

`Microsoft.AspNetCore.Authentication.Certificate` provides ASP.NET Core middleware that enables an application to support certificate authentication.

## How to Use

To use `Microsoft.AspNetCore.Authentication.Certificate`, follow these steps:

### Installation

```shell
dotnet add package Microsoft.AspNetCore.Authentication.Certificate
```

### Configuration

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
2. Configure the middleware in your APS.NET Core app's `Program.cs`:
```csharp
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddAuthentication(
CertificateAuthenticationDefaults.AuthenticationScheme)
.AddCertificate();

var app = builder.Build();

app.UseAuthentication();
```

## Main Types

* `CertificateAuthenticationOptions`: Provides options to configure certificate authentication
* `ICertificateValidationCache`: Provides a cache used to store `AuthenticateResult` results after the certificate has been validated

## Additional Documentation

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.

## Feedback & Contributing

`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).
Loading