Class ClaimsidentifierExtension
- Namespace
- Arc4u.OAuth2.Extensions
- Assembly
- Arc4u.OAuth2.dll
Registers the ClaimsIdentifierOption, the claim types used to identify a user.
public static class ClaimsidentifierExtension
- Inheritance
-
ClaimsidentifierExtension
- Inherited Members
Methods
AddClaimsIdentifier(IServiceCollection, IConfiguration, string)
Registers the claim types used to identify a user from a configuration section (an array of claim types).
public static void AddClaimsIdentifier(this IServiceCollection services, IConfiguration configuration, string sectionName = "Authentication:ClaimsIdentifier")
Parameters
servicesIServiceCollectionThe service collection.
configurationIConfigurationThe configuration.
sectionNamestringThe section holding the array. The default is
Authentication:ClaimsIdentifier. When the section is missing, the object identifier claim types (ObjectIdentifierandOIDofClaimTypes) are used.
AddClaimsIdentifier(IServiceCollection, Action<ClaimsIdentifierOption>)
Registers the claim types used to identify a user from code.
public static void AddClaimsIdentifier(this IServiceCollection services, Action<ClaimsIdentifierOption> options)
Parameters
servicesIServiceCollectionThe service collection.
optionsAction<ClaimsIdentifierOption>The action that configures the claim types.
PrepareAction(IConfiguration, string)
Builds the action that fills a ClaimsIdentifierOption from a configuration section.
public static Action<ClaimsIdentifierOption> PrepareAction(IConfiguration configuration, string sectionName)
Parameters
configurationIConfigurationThe configuration.
sectionNamestringThe section holding the array of claim types.
Returns
- Action<ClaimsIdentifierOption>
An action that adds the claim types of the section, or the default object identifier claim types when the section does not exist.