AssertionRequirement AssertionRequirement AssertionRequirement Class

Definition

Implements an IAuthorizationHandler and IAuthorizationRequirement that takes a user specified assertion.

public class AssertionRequirement : Microsoft.AspNetCore.Authorization.IAuthorizationHandler, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement
type AssertionRequirement = class
    interface IAuthorizationHandler
    interface IAuthorizationRequirement
Public Class AssertionRequirement
Implements IAuthorizationHandler, IAuthorizationRequirement
Inheritance
AssertionRequirementAssertionRequirementAssertionRequirement
Implements

Constructors

AssertionRequirement(Func<AuthorizationHandlerContext,Boolean>) AssertionRequirement(Func<AuthorizationHandlerContext,Boolean>) AssertionRequirement(Func<AuthorizationHandlerContext,Boolean>)

Creates a new instance of AssertionRequirement.

AssertionRequirement(Func<AuthorizationHandlerContext,Task<Boolean>>) AssertionRequirement(Func<AuthorizationHandlerContext,Task<Boolean>>) AssertionRequirement(Func<AuthorizationHandlerContext,Task<Boolean>>)

Creates a new instance of AssertionRequirement.

Properties

Handler Handler Handler

Function that is called to handle this requirement.

Methods

HandleAsync(AuthorizationHandlerContext) HandleAsync(AuthorizationHandlerContext) HandleAsync(AuthorizationHandlerContext)

Calls Handler to see if authorization is allowed.

Applies to