AuthorizeAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies that access to a controller or action method is restricted to users who meet the authorization requirement.
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public class AuthorizeAttribute : System.Web.Mvc.FilterAttribute, System.Web.Mvc.IAuthorizationFilter
type AuthorizeAttribute = class
inherit FilterAttribute
interface IAuthorizationFilter
Public Class AuthorizeAttribute
Inherits FilterAttribute
Implements IAuthorizationFilter
- Inheritance
- Attributes
- Implements
Constructors
AuthorizeAttribute() |
Initializes a new instance of the AuthorizeAttribute class. |
Properties
AllowMultiple |
Gets or sets a value that indicates whether more than one instance of the filter attribute can be specified. (Inherited from FilterAttribute) |
Order |
Gets or sets the order in which the action filters are executed. (Inherited from FilterAttribute) |
Roles |
Gets or sets the user roles that are authorized to access the controller or action method. |
TypeId |
Gets the unique identifier for this attribute. |
Users |
Gets or sets the users that are authorized to access the controller or action method. |
Methods
AuthorizeCore(HttpContextBase) |
When overridden, provides an entry point for custom authorization checks. |
HandleUnauthorizedRequest(AuthorizationContext) |
Processes HTTP requests that fail authorization. |
OnAuthorization(AuthorizationContext) |
Called when a process requests authorization. |
OnCacheAuthorization(HttpContextBase) |
Called when the caching module requests authorization. |