共用方式為


ClaimsAuthorizationRequirement.HandleRequirementAsync 方法

定義

根據指定的宣告需求,決定是否允許授權。

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

參數

context
AuthorizationHandlerContext

授權內容。

requirement
ClaimsAuthorizationRequirement

評估的需求。

傳回

適用於