Go to file
Ryan Nowak 4629148519 [Design] Add antiforgery middleware
This new middleware participates in authentication and acts as a filter
when the request doesn't include a valid CSRF token for a POST.

Any authentication middleware that you want to validate an antiforgery
token should go ahead of this middleware in the pipeline (Cookies,
IISIntegration). This also takes care of automatic auth (Windows) done by
weblistener.

Any authentication middleware that you want to ignore antiforgery should
go after this middleware in the pipeline.

To facilitate this, there are a few changes in the antiforgery API
surface. Namely we can now pass in a principal to validate tokens. You
can't pass in a principal to generate tokens - we expect you to be logged
in at that poing. Also, ValidateRequestAsync(...) now checks the HTTP verb
and won't validate GETs and such.
2016-02-24 15:04:09 -08:00
samples/AntiforgerySample Updated Json.Net version 2016-02-04 16:04:44 -08:00
src/Microsoft.AspNetCore.Antiforgery [Design] Add antiforgery middleware 2016-02-24 15:04:09 -08:00
test [Design] Add antiforgery middleware 2016-02-24 15:04:09 -08:00
tools Strong name Microsoft.AspNet.Antiforgery. 2015-11-03 12:51:41 -08:00
.bowerrc * Add functional tests for sample 2016-01-06 09:37:15 -08:00
.gitattributes Build with dotnet 2016-01-15 15:53:26 -08:00
.gitignore Build with dotnet 2016-01-15 15:53:26 -08:00
.travis.yml Build with dotnet 2016-01-15 15:53:26 -08:00
Antiforgery.sln Rename AspNet 5 file contents. 2016-01-22 12:24:22 -08:00
CONTRIBUTING.md
LICENSE.txt
NuGet.config
NuGetPackageVerifier.json Enabled xml doc generation 2016-02-17 12:12:44 -08:00
README.md
appveyor.yml Build with dotnet 2016-01-15 15:53:26 -08:00
build.cmd Update `build.cmd` to match latest template 2016-02-24 12:27:40 -08:00
build.sh Build with dotnet 2016-01-15 15:53:26 -08:00
global.json
makefile.shade

README.md

Antiforgery

AppVeyor: AppVeyor

Travis: Travis

Antiforgery system for generating secure tokens to prevent Cross-Site Request Forgery attacks.

This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the Home repo.