AuthorizeFilter AuthorizeFilter AuthorizeFilter Class

Definition

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 class AuthorizeFilter : Microsoft.AspNetCore.Mvc.Filters.IAsyncAuthorizationFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory
type AuthorizeFilter = class
    interface IAsyncAuthorizationFilter
    interface IFilterMetadata
    interface IFilterFactory
Public Class AuthorizeFilter
Implements IAsyncAuthorizationFilter, IFilterFactory
Inheritance
AuthorizeFilterAuthorizeFilterAuthorizeFilter
Implements

Constructors

AuthorizeFilter() AuthorizeFilter() AuthorizeFilter()

Initializes a new AuthorizeFilter instance.

AuthorizeFilter(AuthorizationPolicy) AuthorizeFilter(AuthorizationPolicy) AuthorizeFilter(AuthorizationPolicy)

Initialize a new AuthorizeFilter instance.

AuthorizeFilter(IEnumerable<IAuthorizeData>) AuthorizeFilter(IEnumerable<IAuthorizeData>) AuthorizeFilter(IEnumerable<IAuthorizeData>)

Initializes a new instance of AuthorizeFilter.

AuthorizeFilter(String) AuthorizeFilter(String) AuthorizeFilter(String)

Initializes a new instance of AuthorizeFilter.

AuthorizeFilter(IAuthorizationPolicyProvider, IEnumerable<IAuthorizeData>) AuthorizeFilter(IAuthorizationPolicyProvider, IEnumerable<IAuthorizeData>) AuthorizeFilter(IAuthorizationPolicyProvider, IEnumerable<IAuthorizeData>)

Initialize a new AuthorizeFilter instance.

Properties

AuthorizeData AuthorizeData AuthorizeData

The IAuthorizeData to combine into an IAuthorizeData.

Policy Policy Policy

Gets the authorization policy to be used.

PolicyProvider PolicyProvider PolicyProvider

The IAuthorizationPolicyProvider to use to resolve policy names.

Methods

OnAuthorizationAsync(AuthorizationFilterContext) OnAuthorizationAsync(AuthorizationFilterContext) OnAuthorizationAsync(AuthorizationFilterContext)

Explicit Interface Implementations

IFilterFactory.CreateInstance(IServiceProvider) IFilterFactory.CreateInstance(IServiceProvider) IFilterFactory.CreateInstance(IServiceProvider)
IFilterFactory.IsReusable IFilterFactory.IsReusable IFilterFactory.IsReusable

Applies to