ClaimActionCollectionMapExtensions.MapCustomJson Method

Definition

Overloads

MapCustomJson(ClaimActionCollection, String, Func<JObject,String>)

Run the given resolver to select a value from the json user data to add as a claim. This no-ops if the returned value is empty.

MapCustomJson(ClaimActionCollection, String, Func<JsonElement,String>)

Run the given resolver to select a value from the json user data to add as a claim. This no-ops if the returned value is empty.

MapCustomJson(ClaimActionCollection, String, String, Func<JObject,String>)

Run the given resolver to select a value from the json user data to add as a claim. This no-ops if the returned value is empty.

MapCustomJson(ClaimActionCollection, String, String, Func<JsonElement,String>)

Run the given resolver to select a value from the json user data to add as a claim. This no-ops if the returned value is empty.

MapCustomJson(ClaimActionCollection, String, Func<JObject,String>)

Source:
ClaimActionCollectionMapExtensions.cs
Source:
ClaimActionCollectionMapExtensions.cs

Run the given resolver to select a value from the json user data to add as a claim. This no-ops if the returned value is empty.

C#
public static void MapCustomJson (this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, Func<Newtonsoft.Json.Linq.JObject,string> resolver);

Parameters

claimType
String

The value to use for Claim.Type when creating a Claim.

resolver
Func<Newtonsoft.Json.Linq.JObject,String>

The Func that will be called to select value from the given json user data.

Applies to

ASP.NET Core 2.2 en andere versies
Product Versies
ASP.NET Core 2.0, 2.1, 2.2

MapCustomJson(ClaimActionCollection, String, Func<JsonElement,String>)

Source:
ClaimActionCollectionMapExtensions.cs

Run the given resolver to select a value from the json user data to add as a claim. This no-ops if the returned value is empty.

C#
public static void MapCustomJson (this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, Func<System.Text.Json.JsonElement,string> resolver);
C#
public static void MapCustomJson (this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, Func<System.Text.Json.JsonElement,string?> resolver);

Parameters

claimType
String

The value to use for Claim.Type when creating a Claim.

resolver
Func<JsonElement,String>

The Func that will be called to select value from the given json user data.

Applies to

ASP.NET Core 9.0 en andere versies
Product Versies
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

MapCustomJson(ClaimActionCollection, String, String, Func<JObject,String>)

Source:
ClaimActionCollectionMapExtensions.cs
Source:
ClaimActionCollectionMapExtensions.cs

Run the given resolver to select a value from the json user data to add as a claim. This no-ops if the returned value is empty.

C#
public static void MapCustomJson (this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string valueType, Func<Newtonsoft.Json.Linq.JObject,string> resolver);

Parameters

claimType
String

The value to use for Claim.Type when creating a Claim.

valueType
String

The value to use for Claim.ValueType when creating a Claim.

resolver
Func<Newtonsoft.Json.Linq.JObject,String>

The Func that will be called to select value from the given json user data.

Applies to

ASP.NET Core 2.2 en andere versies
Product Versies
ASP.NET Core 2.0, 2.1, 2.2

MapCustomJson(ClaimActionCollection, String, String, Func<JsonElement,String>)

Source:
ClaimActionCollectionMapExtensions.cs

Run the given resolver to select a value from the json user data to add as a claim. This no-ops if the returned value is empty.

C#
public static void MapCustomJson (this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string valueType, Func<System.Text.Json.JsonElement,string> resolver);
C#
public static void MapCustomJson (this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string valueType, Func<System.Text.Json.JsonElement,string?> resolver);

Parameters

claimType
String

The value to use for Claim.Type when creating a Claim.

valueType
String

The value to use for Claim.ValueType when creating a Claim.

resolver
Func<JsonElement,String>

The Func that will be called to select value from the given json user data.

Applies to

ASP.NET Core 9.0 en andere versies
Product Versies
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0