2.5 KiB
2.5 KiB
title | author | description | ms.author | ms.date | no-loc | uid | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Authentication samples for ASP.NET Core | rick-anderson | Provides links to the authentication samples in the ASP.NET Core repository. | riande | 02/21/2021 |
|
security/authentication/samples |
Authentication samples for ASP.NET Core
The ASP.NET Core repository contains the following authentication samples (main
branch):
- Claims transformation
- Cookie authentication
- Custom authorization failure response
- Custom policy provider - IAuthorizationPolicyProvider
- Dynamic authentication schemes and options
- External claims
- Selecting between cookie and another authentication scheme based on the request
- Restricts access to static files
Obtain and run the samples
The sample links provided in this article provide samples for the upcoming release of ASP.NET Core. To obtain a sample for the current release or a prior release, perform the following steps:
- Select the release branch of the ASP.NET Core repository](https://github.com/dotnet/aspnetcore). For example, the
release/5.0
branch contains the samples for the ASP.NET Core 5.0 release. - Clone or download the ASP.NET Core repository.
- On your local system, verify installation of the .NET Core SDK version matching the clone of the ASP.NET Core repository.
- Navigate to a sample in
aspnetcore/src/Security/samples
folder and run the sample with thedotnet run
command.