|
|
||
|---|---|---|
| .. | ||
| Controllers | ||
| Models | ||
| Views | ||
| wwwroot | ||
| .bowerrc | ||
| Program.cs | ||
| README.md | ||
| Startup.cs | ||
| VirtualSchemes.PathSchemeSelection.csproj | ||
| appsettings.Development.json | ||
| appsettings.json | ||
| bower.json | ||
| bundleconfig.json | ||
README.md
AuthSamples.VirtualScheme.PathSchemeSelection
Sample demonstrating selecting between cookie and another authentication scheme based on the request:
Cookie flow is the same, but notice in Startup how the "Request" virtual scheme is now the default scheme
- Run the app and click on the MyClaims tab, this should trigger a redirect to login.
- Login with any username and password, the sample just validates that any values are provided.
- You should be redirected back to /Home/MyClaims which will output a few user claims from the cookie
- 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.