ClaimsAuthorizationRequirement(String, IEnumerable<String>) 构造函数

定义

创建 ClaimsAuthorizationRequirement 的新实例。

public:
 ClaimsAuthorizationRequirement(System::String ^ claimType, System::Collections::Generic::IEnumerable<System::String ^> ^ allowedValues);
public ClaimsAuthorizationRequirement (string claimType, System.Collections.Generic.IEnumerable<string> allowedValues);
public ClaimsAuthorizationRequirement (string claimType, System.Collections.Generic.IEnumerable<string>? allowedValues);
new Microsoft.AspNetCore.Authorization.Infrastructure.ClaimsAuthorizationRequirement : string * seq<string> -> Microsoft.AspNetCore.Authorization.Infrastructure.ClaimsAuthorizationRequirement
Public Sub New (claimType As String, allowedValues As IEnumerable(Of String))

参数

claimType
String

必须存在的声明类型。

allowedValues
IEnumerable<String>

声明值的可选列表。 如果指定,则声明必须与其中一个或多个值匹配。

适用于