ClaimActionCollectionMapExtensions.MapJsonKey 方法

定义

重载

MapJsonKey(ClaimActionCollection, String, String)

从具有给定键名称的 json 用户数据中选择顶级值,并将其添加为声明。 如果未找到键或值为空,则此无操作。

MapJsonKey(ClaimActionCollection, String, String, String)

从具有给定键名称的 json 用户数据中选择顶级值,并将其添加为声明。 如果未找到键或值为空,则此无操作。

MapJsonKey(ClaimActionCollection, String, String)

从具有给定键名称的 json 用户数据中选择顶级值,并将其添加为声明。 如果未找到键或值为空,则此无操作。

public:
[System::Runtime::CompilerServices::Extension]
 static void MapJsonKey(Microsoft::AspNetCore::Authentication::OAuth::Claims::ClaimActionCollection ^ collection, System::String ^ claimType, System::String ^ jsonKey);
public static void MapJsonKey (this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string jsonKey);
static member MapJsonKey : Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection * string * string -> unit
<Extension()>
Public Sub MapJsonKey (collection As ClaimActionCollection, claimType As String, jsonKey As String)

参数

claimType
String

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

jsonKey
String

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

适用于

MapJsonKey(ClaimActionCollection, String, String, String)

从具有给定键名称的 json 用户数据中选择顶级值,并将其添加为声明。 如果未找到键或值为空,则此无操作。

public:
[System::Runtime::CompilerServices::Extension]
 static void MapJsonKey(Microsoft::AspNetCore::Authentication::OAuth::Claims::ClaimActionCollection ^ collection, System::String ^ claimType, System::String ^ jsonKey, System::String ^ valueType);
public static void MapJsonKey (this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string jsonKey, string valueType);
static member MapJsonKey : Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection * string * string * string -> unit
<Extension()>
Public Sub MapJsonKey (collection As ClaimActionCollection, claimType As String, jsonKey As String, valueType As String)

参数

claimType
String

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

jsonKey
String

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

valueType
String

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

适用于