This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Big Rock: Filters for Razor Pages #6070
Closed
Description
Pages should use basically the same filter types as controllers, but should expose some unique functionality in place of action filters. In general a pages developer will want to accomplish the same kinds of things with filters as a controller/action developer.
This includes:
- authorization (authZ filters)
- middleware-like behavior (resource filters)
- scoped exception handling (exception filters)
- decorating the execution of results (result filters)
- manipulating action arguments (action filters)
We'll want to provide a little something extra for pages, likely to do with manipulating handler methods 👍
There's a lot more to do here, because designing a new filter type, we need to decide how filters get configured when you have a mix of pages/page-models/handler-methods/application-model.
Related items:
- Add a filter provider for TempDataAttribute to RazorPages #5979 Add a filter provider for TempDataAttribute to RazorPages
- Support Filters for RazorPages #6124 Support Filters for RazorPages
- Add a new filter type for pages #6331 Add a new filter type for pages
- Add logging and diagnostic source for page handlers #6332 Add logging and diagnostic source for page handlers
- Improve unit tests for PageActionInvoker #6333 Improve unit tests for PageActionInvoker
- Rationalize what happens when you have filter attributes on a page model or handler method #6334 Rationalize filters as attributes with Pages