Dela via


AssertionRequirement Class

Definition

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

public ref class AssertionRequirement : Microsoft::AspNetCore::Authorization::IAuthorizationHandler, Microsoft::AspNetCore::Authorization::IAuthorizationRequirement
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
AssertionRequirement
Implements

Constructors

AssertionRequirement(Func<AuthorizationHandlerContext,Boolean>)

Creates a new instance of AssertionRequirement.

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

Creates a new instance of AssertionRequirement.

Properties

Handler

Function that is called to handle this requirement.

Methods

HandleAsync(AuthorizationHandlerContext)

Calls Handler to see if authorization is allowed.

ToString()

Returns a string that represents the current object.

Applies to