3.5 KiB
3.5 KiB
title | author | description | ms.author | ms.date | uid |
---|---|---|---|---|---|
Authentication samples for ASP.NET Core | rick-anderson | Provides links to the authentication samples in the ASP.NET Core repository. | riande | 01/31/2019 | security/authentication/samples |
Authentication samples for ASP.NET Core
::: moniker range=">= aspnetcore-3.0"
The ASP.NET Core repository contains the following authentication samples in the AspNetCore/src/Security/samples folder:
- Claims transformation
- Cookie authentication
- 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
Run the samples
- Select a branch. For example,
Tag:v3.0.0
- Clone or download the ASP.NET Core repository.
- Verify you have installed the .NET Core SDK version matching the clone of the ASP.NET Core repository.
- Navigate to a sample in AspNetCore/src/Security/samples and run the sample with
dotnet run
.
::: moniker-end
::: moniker range="< aspnetcore-3.0"
The ASP.NET Core repository contains the following authentication samples in the AspNetCore/src/Security/samples folder:
- Claims transformation
- Cookie authentication
- 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
Run the samples
- Select a branch. For example,
release/2.2
- Clone or download the ASP.NET Core repository.
- Verify you have installed the .NET Core SDK version matching the clone of the ASP.NET Core repository.
- Navigate to a sample in AspNetCore/src/Security/samples and run the sample with
dotnet run
.
::: moniker-end