AuthorizeFilter 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.
An implementation of IAsyncAuthorizationFilter which applies a specific AuthorizationPolicy. MVC recognizes the AuthorizeAttribute and adds an instance of this filter to the associated action or controller.
public ref class AuthorizeFilter : Microsoft::AspNetCore::Mvc::Filters::IAsyncAuthorizationFilter
public ref class AuthorizeFilter : Microsoft::AspNetCore::Mvc::Filters::IAsyncAuthorizationFilter, Microsoft::AspNetCore::Mvc::Filters::IFilterFactory
public class AuthorizeFilter : Microsoft.AspNetCore.Mvc.Filters.IAsyncAuthorizationFilter
public class AuthorizeFilter : Microsoft.AspNetCore.Mvc.Filters.IAsyncAuthorizationFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory
type AuthorizeFilter = class
interface IAsyncAuthorizationFilter
interface IFilterMetadata
type AuthorizeFilter = class
interface IAsyncAuthorizationFilter
interface IFilterMetadata
interface IFilterFactory
Public Class AuthorizeFilter
Implements IAsyncAuthorizationFilter
Public Class AuthorizeFilter
Implements IAsyncAuthorizationFilter, IFilterFactory
- Inheritance
-
AuthorizeFilter
- Implements
Remarks
An authorize filter is not meant to be used in combination with FallbackPolicy. The fallback policy takes precedence over an authorize filter.
Constructors
AuthorizeFilter() |
Initializes a new AuthorizeFilter instance. |
AuthorizeFilter(AuthorizationPolicy) |
Initialize a new AuthorizeFilter instance. |
AuthorizeFilter(IAuthorizationPolicyProvider, IEnumerable<IAuthorizeData>) |
Initialize a new AuthorizeFilter instance. |
AuthorizeFilter(IEnumerable<IAuthorizeData>) |
Initializes a new instance of AuthorizeFilter. |
AuthorizeFilter(String) |
Initializes a new instance of AuthorizeFilter. |
Properties
AuthorizeData |
The IAuthorizeData to combine into an IAuthorizeData. |
Policy |
Gets the authorization policy to be used. |
PolicyProvider |
The IAuthorizationPolicyProvider to use to resolve policy names. |
Methods
OnAuthorizationAsync(AuthorizationFilterContext) |
Called early in the filter pipeline to confirm request is authorized. |
Explicit Interface Implementations
IFilterFactory.CreateInstance(IServiceProvider) | |
IFilterFactory.IsReusable |