共用方式為


AuthorizationHandler<TRequirement,TResource> 類別

定義

需要針對特定需求和資源類型呼叫之授權處理常式的基類。

generic <typename TRequirement, typename TResource>
 where TRequirement : IAuthorizationRequirementpublic ref class AuthorizationHandler abstract : Microsoft::AspNetCore::Authorization::IAuthorizationHandler
public abstract class AuthorizationHandler<TRequirement,TResource> : Microsoft.AspNetCore.Authorization.IAuthorizationHandler where TRequirement : IAuthorizationRequirement
type AuthorizationHandler<'Requirement, 'Resource (requires 'Requirement :> IAuthorizationRequirement)> = class
    interface IAuthorizationHandler
Public MustInherit Class AuthorizationHandler(Of TRequirement, TResource)
Implements IAuthorizationHandler

類型參數

TRequirement

要評估的需求類型。

TResource

要評估的資源類型。

繼承
AuthorizationHandler<TRequirement,TResource>
實作

建構函式

AuthorizationHandler<TRequirement,TResource>()

需要針對特定需求和資源類型呼叫之授權處理常式的基類。

方法

HandleAsync(AuthorizationHandlerContext)

如果允許授權,請做出決定。

HandleRequirementAsync(AuthorizationHandlerContext, TRequirement, TResource)

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

適用於