-
Notifications
You must be signed in to change notification settings - Fork 9
Controllers attributes
All controllers attributes can be found in AcspNet.Attributes
namespace.
Available controllers attributes:
-
[Get("route expression")]
- attribute which indicates what controller handles only HTTP GET request with specified route expression; -
[Post("route expression")]
- attribute which indicates what controller handles only HTTP POST request with specified route expression; -
[Delete("route expression")]
- attribute which indicates what controller handles only HTTP DELETE request with specified route expression; -
[Put("route expression")]
- attribute which indicates what controller handles only HTTP PUT request with specified route expression.
-
[Http400]
- attribute which indicates what controller handles HTTP 400 errors (not implemented); -
[Http403]
- attribute which indicates what controller handles HTTP 403 errors (user is authenticated but does not have access rights); -
[Http404]
- attribute which indicates what controller handles HTTP 404 errors (page not found), for example, if user is calling page with specified route expression is not found, then controller with this attribute will be called. -
[Priority(1)]
- attribute which sets controller invoke priority, controllers will be sorted and invoked according to their priority number (controllers with lower number will be invoked before controllers with higher number), default controller priority is: 0. -
[Authorize]
- attribute which indicates what controller requires user to be authenticated, otherwise client will be redirected to login page; -
[Authorize("Role1, Role2")]
- authorize attribute with specifying user roles, only users with speicfied roles can access controller, otherwise HTTP 403 error will be returned (or controller with Http403 attribute will be called, if it is present).
- Getting Started
- Main Simplify.Web principles
- Simplify.Web controllers
- Simplify.Web views
- Simplify.Web templates
- Simplify.Web configuration
- Templates variables
- Static content
- Template factory
- Data collector
- String table
- File reader
- Web context
- Environment
- Language manager
- Redirector
- HTML