aspnetcore/samples/StaticFilesAuth
Nate McMaster 8f471bf65b
Remove net461 from samples
2018-11-16 13:56:18 -08:00
..
Controllers Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00
Models Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00
PrivateFiles Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00
Views Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00
wwwroot Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00
Program.cs Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00
README.md Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00
Startup.cs Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00
StaticFilesAuth.csproj Remove net461 from samples 2018-11-16 13:56:18 -08:00
appsettings.Development.json Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00
appsettings.json Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00
bundleconfig.json Create a StaticFilesAuth sample #28 2018-04-20 10:48:36 -07:00

README.md

AuthSamples.StaticFilesAuth

Sample demonstrating restricting access to static files using Authentication and Authorization. There are two different approaches. Links to each scenario are provided on the home page.

  1. For a given url path, allow only authenticated users to access static files. See /MapAuthenticatedFiles in Startup.cs.
  2. For a given url path, use an authorization policy to determine who should have access to specific files. See /MapImperativeFile in startup.cs.

You can log in with any user name. For the policy scenario the user will only have access to the directory matching their name.