AuthorizationHandlerContext 构造函数

定义

创建 AuthorizationHandlerContext 的新实例。

public:
 AuthorizationHandlerContext(System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Authorization::IAuthorizationRequirement ^> ^ requirements, System::Security::Claims::ClaimsPrincipal ^ user, System::Object ^ resource);
public AuthorizationHandlerContext (System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> requirements, System.Security.Claims.ClaimsPrincipal user, object resource);
public AuthorizationHandlerContext (System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> requirements, System.Security.Claims.ClaimsPrincipal user, object? resource);
new Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext : seq<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> * System.Security.Claims.ClaimsPrincipal * obj -> Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext
Public Sub New (requirements As IEnumerable(Of IAuthorizationRequirement), user As ClaimsPrincipal, resource As Object)

参数

requirements
IEnumerable<IAuthorizationRequirement>

当前授权操作的所有 IAuthorizationRequirement 的集合。

user
ClaimsPrincipal

一个 ClaimsPrincipal,表示当前用户。

resource
Object

要对其进行评估的 requirements 可选资源。

适用于