共用方式為


AuthorizationHandler<TRequirement>.HandleRequirementAsync 方法

定義

根據特定需求來決定是否允許授權。

protected:
 abstract System::Threading::Tasks::Task ^ HandleRequirementAsync(Microsoft::AspNetCore::Authorization::AuthorizationHandlerContext ^ context, TRequirement requirement);
protected abstract System.Threading.Tasks.Task HandleRequirementAsync (Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, TRequirement requirement);
abstract member HandleRequirementAsync : Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext * 'Requirement -> System.Threading.Tasks.Task
Protected MustOverride Function HandleRequirementAsync (context As AuthorizationHandlerContext, requirement As TRequirement) As Task

參數

context
AuthorizationHandlerContext

授權內容。

requirement
TRequirement

評估的需求。

傳回

適用於