aspnetcore/src/Security/samples/PathSchemeSelection
Ajay Bhargav B 7f4b846e9f
Made the encodings of .razor and .cshtml files in the repo consistent (#23502)
* Added UTF8 BOMs to .razor and .cshtml files

* Fixes and unquarantined BOM tests

* Update .editorconfig
2020-06-30 12:03:01 -07:00
..
Controllers
Models
Views Made the encodings of .razor and .cshtml files in the repo consistent (#23502) 2020-06-30 12:03:01 -07:00
wwwroot Upgrade jQuery in samples to version 3.5.1 (#21577) 2020-05-07 14:42:14 -07:00
.bowerrc
PathSchemeSelection.csproj
Program.cs
README.md
Startup.cs
appsettings.Development.json
appsettings.json
bower.json Upgrade jQuery in samples to version 3.5.1 (#21577) 2020-05-07 14:42:14 -07:00
bundleconfig.json

README.md

AuthSamples.PathSchemeSelection

Sample demonstrating selecting between cookie and another authentication scheme based on the request:

Cookie flow is the same, but notice in Startup how requests that start with /api are forwarded to the api scheme.

  1. Run the app and click on the MyClaims tab, this should trigger a redirect to login.
  2. Login with any username and password, the sample just validates that any values are provided.
  3. You should be redirected back to /Home/MyClaims which will output a few user claims from the cookie
  4. Now try going to /api/Home/MyClaims which will output a different set of claims (from the Api scheme)

Startup.cs is the most interesting class in the sample.