共用方式為


NameAuthorizationRequirement.HandleRequirementAsync 方法

定義

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

protected:
 override System::Threading::Tasks::Task ^ HandleRequirementAsync(Microsoft::AspNetCore::Authorization::AuthorizationHandlerContext ^ context, Microsoft::AspNetCore::Authorization::Infrastructure::NameAuthorizationRequirement ^ requirement);
protected override System.Threading.Tasks.Task HandleRequirementAsync (Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, Microsoft.AspNetCore.Authorization.Infrastructure.NameAuthorizationRequirement requirement);
override this.HandleRequirementAsync : Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext * Microsoft.AspNetCore.Authorization.Infrastructure.NameAuthorizationRequirement -> System.Threading.Tasks.Task
Protected Overrides Function HandleRequirementAsync (context As AuthorizationHandlerContext, requirement As NameAuthorizationRequirement) As Task

參數

context
AuthorizationHandlerContext

授權內容。

requirement
NameAuthorizationRequirement

評估的需求。

傳回

適用於