From 88fcd83ff690b1b496c803046b82b906f604d743 Mon Sep 17 00:00:00 2001 From: Rick Anderson Date: Mon, 28 Jan 2019 16:25:26 -1000 Subject: [PATCH] Surface auth samples (#10628) * Surface auth samples * TOC * work * work --- aspnetcore/security/authentication/samples.md | 28 +++++++++++++++++++ aspnetcore/toc.yml | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 aspnetcore/security/authentication/samples.md diff --git a/aspnetcore/security/authentication/samples.md b/aspnetcore/security/authentication/samples.md new file mode 100644 index 0000000000..55c935fe01 --- /dev/null +++ b/aspnetcore/security/authentication/samples.md @@ -0,0 +1,28 @@ +--- +title: Authentication samples for ASP.NET Core +author: rick-anderson +description: Provides links to the authentication samples in the ASP.NET Core repository. +ms.author: riande +ms.date: 01/31/2019 +uid: security/authentication/samples +--- +# Authentication samples for ASP.NET Core + +By [Rick Anderson](https://twitter.com/RickAndMSFT) + +The [ASP.NET Core repository](https://github.com/aspnet/AspNetCore) contains the following authentication samples in the *AspNetCore/src/Security/samples* folder: + +* [Claims transformation](https://github.com/aspnet/AspNetCore/tree/release/2.2/src/Security/samples/ClaimsTransformation) +* [Cookie authentication](https://github.com/aspnet/AspNetCore/tree/release/2.2/src/Security/samples/Cookies) +* [Custom policy provider - IAuthorizationPolicyProvider](https://github.com/aspnet/AspNetCore/tree/release/2.2/src/Security/samples/CustomPolicyProvider) +* [Dynamic authentication schemes and options](https://github.com/aspnet/AspNetCore/tree/release/2.2/src/Security/samples/DynamicSchemes) +* [External claims](https://github.com/aspnet/AspNetCore/tree/release/2.2/src/Security/samples/Identity.ExternalClaims) +* [Selecting between cookie and another authentication scheme based on the request](https://github.com/aspnet/AspNetCore/tree/release/2.2/src/Security/samples/PathSchemeSelection) +* [Restricts access to static files](https://github.com/aspnet/AspNetCore/tree/release/2.2/src/Security/samples/StaticFilesAuth) + +## Run the samples + +* Select a [branch](https://github.com/aspnet/AspNetCore). For example, `release/2.2` +* Clone or download the [ASP.NET Core repository](https://github.com/aspnet/AspNetCore). +* Verify you have installed the [.NET Core SDK](https://www.microsoft.com/net/download/all) 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`. diff --git a/aspnetcore/toc.yml b/aspnetcore/toc.yml index 2521c80228..94eb651c9d 100644 --- a/aspnetcore/toc.yml +++ b/aspnetcore/toc.yml @@ -538,6 +538,8 @@ uid: security/authentication/scaffold-identity - name: Add custom user data to Identity uid: security/authentication/add-user-data + - name: Authentication samples + uid: security/authentication/samples - name: Customize Identity uid: security/authentication/customize_identity_model - name: Community OSS authentication options