Table of Contents

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

services IServiceCollection

The service collection.

configuration IConfiguration

The configuration.

sectionName string

The section holding the array. The default is Authentication:ClaimsIdentifier. When the section is missing, the object identifier claim types (ObjectIdentifier and OID of ClaimTypes) 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

services IServiceCollection

The service collection.

options Action<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

configuration IConfiguration

The configuration.

sectionName string

The 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.