Microsoft.AspNetCore.Authentication.OAuth.Claims Namespace

Contains types that make it easier to customize claim mappings with OAuth based authentication.

Classes

ClaimAction

Infrastructure for mapping user data from a json structure to claims on the ClaimsIdentity.

ClaimActionCollection

A collection of ClaimActions used when mapping user data to Claims.

CustomJsonClaimAction

A ClaimAction that selects the value from the JSON user data by running the given Func resolver.

DeleteClaimAction

A ClaimAction that deletes all claims from the given ClaimsIdentity with the given ClaimType.

JsonKeyClaimAction

A ClaimAction that selects a top level value from the json user data with the given key name and adds it as a Claim. This no-ops if the key is not found or the value is empty.

JsonSubKeyClaimAction

A ClaimAction that selects a second level value from the json user data with the given top level key name and second level sub key name and add it as a Claim. This no-ops if the keys are not found or the value is empty.

MapAllClaimsAction

A ClaimAction that selects all top level values from the json user data and adds them as Claims. This excludes duplicate sets of names and values.

Remarks

For more information about using claims with OAuth, see Persist additional claims and tokens from external providers in ASP.NET Core.