Go to file
Doug Bunting 73695fc443 Serialize cookie token at most once
- #23 part 3
- `Get[AndStore]Tokens()` would deserialize cookie token from request even if `IsRequestValidAsync()` already had
- `GetAndStoreTokens()` serialized an old (never saved) cookie token once and a new one twice

- refactor serialization from `DefaultAntiforgeryTokenStore` to `DefaultAntiforgery`
 - divide responsibilities and ease overall fix
- above refactoring took `IAntiforgeryContextAccessor` responsibilities along to `DefaultAntiforgery` as well
 - store all tokens in `IAntiforgeryContextAccessor` to avoid repeated (de)serializations
 - remove `AntiforgeryTokenSetInternal`

nits:
- bit more parameter renaming to `httpContext`
- remove argument checks in helper methods
 - did _not_ do a sweep through the repo; just files in this PR
2016-02-09 15:29:04 -08:00
samples/AntiforgerySample Updated Json.Net version 2016-02-04 16:04:44 -08:00
src/Microsoft.AspNetCore.Antiforgery Serialize cookie token at most once 2016-02-09 15:29:04 -08:00
test Serialize cookie token at most once 2016-02-09 15:29:04 -08:00
tools
.bowerrc
.gitattributes
.gitignore
.travis.yml
Antiforgery.sln Rename AspNet 5 file contents. 2016-01-22 12:24:22 -08:00
CONTRIBUTING.md
LICENSE.txt
NuGet.config
NuGetPackageVerifier.json Rename AspNet 5 file contents. 2016-01-22 12:24:22 -08:00
README.md
appveyor.yml
build.cmd
build.sh
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.