ClaimActionCollectionMapExtensions.MapJsonSubKey 方法

定义

重载

MapJsonSubKey(ClaimActionCollection, String, String, String)

使用给定的顶级密钥名称和二级子键名称从 json 用户数据中选择第二级值,并将其添加为声明。 如果找不到密钥或值为空,则此不操作。

MapJsonSubKey(ClaimActionCollection, String, String, String, String)

使用给定的顶级密钥名称和二级子键名称从 json 用户数据中选择第二级值,并将其添加为声明。 如果找不到密钥或值为空,则此不操作。

MapJsonSubKey(ClaimActionCollection, String, String, String)

Source:
ClaimActionCollectionMapExtensions.cs
Source:
ClaimActionCollectionMapExtensions.cs
Source:
ClaimActionCollectionMapExtensions.cs

使用给定的顶级密钥名称和二级子键名称从 json 用户数据中选择第二级值,并将其添加为声明。 如果找不到密钥或值为空,则此不操作。

public static void MapJsonSubKey (this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string jsonKey, string subKey);

参数

claimType
String

创建声明时要用于 Claim.Type 的值。

jsonKey
String

要在 json 用户数据中查找的顶级键。

subKey
String

要在 json 用户数据中查找的第二级键。

适用于

ASP.NET Core 9.0 和其他版本
产品 版本
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

MapJsonSubKey(ClaimActionCollection, String, String, String, String)

Source:
ClaimActionCollectionMapExtensions.cs
Source:
ClaimActionCollectionMapExtensions.cs
Source:
ClaimActionCollectionMapExtensions.cs

使用给定的顶级密钥名称和二级子键名称从 json 用户数据中选择第二级值,并将其添加为声明。 如果找不到密钥或值为空,则此不操作。

public static void MapJsonSubKey (this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string jsonKey, string subKey, string valueType);

参数

claimType
String

创建声明时要用于 Claim.Type 的值。

jsonKey
String

要在 json 用户数据中查找的顶级键。

subKey
String

要在 json 用户数据中查找的第二级键。

valueType
String

创建声明时要用于 Claim.ValueType 的值。

适用于

ASP.NET Core 9.0 和其他版本
产品 版本
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0