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)

根据特定要求和资源决定是否允许授权。

适用于