Граф коммитов

107 Коммитов

Автор SHA1 Сообщение Дата
unknown b922d816be Fix aspnet/Mvc#2749 - fail gracefully with non-form content
This change will report a more specific error when antiforgery is used
with non-form content than "invalid content type".
2015-08-06 10:29:16 -07:00
Ryan Nowak 9bcecf3994 Fix #5 - better error message for missing tokens
This fix changes the model for error messaging in antiforgery. Now only
the token store will report a detailed error message including the names
of form field and cookie. Other components will give more generic errors
and assume that this was handled by the token store.

This way you still see an error if the user creates a token store that
doesn't throw, but it's a generic error that doesn't give incorrect
information.
2015-08-06 08:48:47 -07:00
Ryan Nowak e13e707503 CR feedback and naming/resource cleanup 2015-06-25 13:25:52 -07:00
Ryan Nowak b3e92da7d8 Add an IAntiforgery interface and simplify API 2015-06-24 15:56:03 -07:00
Ryan Nowak 9eeb1de68f Use DI for all Antiforgery services
This change makes it possible to replace all of the various
IAntiforgery*** extensibility points via DI.

changes:
- Move functionality out of AntiforgeryWorker into Antiforgery
- Move services to DI (instead of constructed by Antiforgery)
- Cleanup how application/cookie-name is computed
- Merge IAntiforgeryTokenGenerator & IAntiforgeryTokenValidator
- Unseal classes
- Fix use of options in services
- Misc test cleanup
2015-06-23 12:13:01 -07:00
Ryan Nowak 3dc2663c35 Code dump of Antiforgery code 2015-06-10 12:13:30 -07:00
Ryan Nowak 2c3544c348 Add project structure 2015-06-07 16:57:21 -07:00