aspnetcore/samples/PathSchemeSelection
Pranav K 4ce8155176 Update to netcoreapp2.2 (#46) 2018-05-16 09:55:58 -07:00
..
Controllers Switch to use forwarding instead of virtual handler (#27) 2018-02-28 14:23:48 -08:00
Models Switch to use forwarding instead of virtual handler (#27) 2018-02-28 14:23:48 -08:00
Views Switch to use forwarding instead of virtual handler (#27) 2018-02-28 14:23:48 -08:00
wwwroot Switch to use forwarding instead of virtual handler (#27) 2018-02-28 14:23:48 -08:00
.bowerrc Switch to use forwarding instead of virtual handler (#27) 2018-02-28 14:23:48 -08:00
PathSchemeSelection.csproj Update to netcoreapp2.2 (#46) 2018-05-16 09:55:58 -07:00
Program.cs React to changes in MVC Testing 2018-03-19 15:36:15 -07:00
README.md Edit readme 2018-05-04 11:04:11 -07:00
Startup.cs Switch to use forwarding instead of virtual handler (#27) 2018-02-28 14:23:48 -08:00
appsettings.Development.json Switch to use forwarding instead of virtual handler (#27) 2018-02-28 14:23:48 -08:00
appsettings.json Switch to use forwarding instead of virtual handler (#27) 2018-02-28 14:23:48 -08:00
bower.json Switch to use forwarding instead of virtual handler (#27) 2018-02-28 14:23:48 -08:00
bundleconfig.json Switch to use forwarding instead of virtual handler (#27) 2018-02-28 14:23:48 -08:00

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.