Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ClaimActionCollectionMapExtensions.MapCustomJson Method

Definition

Namespace:
Microsoft.AspNetCore.Authentication
Assembly:
Microsoft.AspNetCore.Authentication.OAuth.dll
Package:
Microsoft.AspNetCore.Authentication.OAuth v2.0.0
Package:
Microsoft.AspNetCore.Authentication.OAuth v2.1.0
Package:
Microsoft.AspNetCore.Authentication.OAuth v2.2.0
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.App.Ref v3.0.1
Package:
Microsoft.AspNetCore.App.Ref v3.1.10
Package:
Microsoft.AspNetCore.App.Ref v5.0.0
Package:
Microsoft.AspNetCore.App.Ref v6.0.36
Package:
Microsoft.AspNetCore.App.Ref v7.0.5
Package:
Microsoft.AspNetCore.App.Ref v8.0.19
Package:
Microsoft.AspNetCore.App.Ref v9.0.8

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Name Description
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.

public:
[System::Runtime::CompilerServices::Extension]
 static void MapCustomJson(Microsoft::AspNetCore::Authentication::OAuth::Claims::ClaimActionCollection ^ collection, System::String ^ claimType, Func<Newtonsoft::Json::Linq::JObject ^, System::String ^> ^ resolver);
public static void MapCustomJson(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, Func<Newtonsoft.Json.Linq.JObject,string> resolver);
static member MapCustomJson : Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection * string * Func<Newtonsoft.Json.Linq.JObject, string> -> unit
<Extension()>
Public Sub MapCustomJson (collection As ClaimActionCollection, claimType As String, resolver As Func(Of JObject, String))

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

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.

public:
[System::Runtime::CompilerServices::Extension]
 static void MapCustomJson(Microsoft::AspNetCore::Authentication::OAuth::Claims::ClaimActionCollection ^ collection, System::String ^ claimType, Func<System::Text::Json::JsonElement, System::String ^> ^ resolver);
public static void MapCustomJson(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, Func<System.Text.Json.JsonElement,string?> resolver);
public static void MapCustomJson(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, Func<System.Text.Json.JsonElement,string> resolver);
static member MapCustomJson : Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection * string * Func<System.Text.Json.JsonElement, string> -> unit
<Extension()>
Public Sub MapCustomJson (collection As ClaimActionCollection, claimType As String, resolver As Func(Of JsonElement, String))

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

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.

public:
[System::Runtime::CompilerServices::Extension]
 static void MapCustomJson(Microsoft::AspNetCore::Authentication::OAuth::Claims::ClaimActionCollection ^ collection, System::String ^ claimType, System::String ^ valueType, Func<Newtonsoft::Json::Linq::JObject ^, System::String ^> ^ resolver);
public static void MapCustomJson(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string valueType, Func<Newtonsoft.Json.Linq.JObject,string> resolver);
static member MapCustomJson : Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection * string * string * Func<Newtonsoft.Json.Linq.JObject, string> -> unit
<Extension()>
Public Sub MapCustomJson (collection As ClaimActionCollection, claimType As String, valueType As String, resolver As Func(Of JObject, String))

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

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.

public:
[System::Runtime::CompilerServices::Extension]
 static void MapCustomJson(Microsoft::AspNetCore::Authentication::OAuth::Claims::ClaimActionCollection ^ collection, System::String ^ claimType, System::String ^ valueType, Func<System::Text::Json::JsonElement, System::String ^> ^ resolver);
public static void MapCustomJson(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string valueType, Func<System.Text.Json.JsonElement,string?> resolver);
public static void MapCustomJson(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string valueType, Func<System.Text.Json.JsonElement,string> resolver);
static member MapCustomJson : Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection * string * string * Func<System.Text.Json.JsonElement, string> -> unit
<Extension()>
Public Sub MapCustomJson (collection As ClaimActionCollection, claimType As String, valueType As String, resolver As Func(Of JsonElement, String))

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


Feedback

Was this page helpful?