Table of Contents

Class ApiAuthenticationContextExtension

Namespace
Arc4u.OAuth2.Extensions
Assembly
Arc4u.OAuth2.dll
public static class ApiAuthenticationContextExtension
Inheritance
ApiAuthenticationContextExtension
Inherited Members

Methods

AddAuthenticationApiContext(IServiceCollection, IConfiguration, ApiExtraContextAuthenticationSectionOption?)

Registers the ApiExtraContextAuthenticationOption from configuration sections.

public static void AddAuthenticationApiContext(this IServiceCollection services, IConfiguration configuration, ApiExtraContextAuthenticationSectionOption? section = null)

Parameters

services IServiceCollection

The service collection.

configuration IConfiguration

The configuration.

section ApiExtraContextAuthenticationSectionOption

The paths of the sections holding the extra parameters. When null, the defaults of ApiExtraContextAuthenticationSectionOption are used.

Exceptions

ArgumentNullException

services or configuration is null.

AddAuthenticationApiContext(IServiceCollection, Action<ApiExtraContextAuthenticationOption>)

Registers the ApiExtraContextAuthenticationOption from code. Nothing is done when a configuration for this options type is already registered.

public static void AddAuthenticationApiContext(this IServiceCollection services, Action<ApiExtraContextAuthenticationOption> option)

Parameters

services IServiceCollection

The service collection.

option Action<ApiExtraContextAuthenticationOption>

The action that configures the options.

Exceptions

ArgumentNullException

services or option is null.