Table of Contents

Class ServiceCollectionExtensions

Namespace
Auth0.AspNetCore.Authentication.Api
Assembly
Auth0.AspNetCore.Authentication.Api.dll

Contains IServiceCollection extension(s) for registering Auth0.

public static class ServiceCollectionExtensions
Inheritance
ServiceCollectionExtensions
Inherited Members

Methods

AddAuth0ApiAuthentication(IServiceCollection, Action<Auth0ApiOptions>?)

Adds Auth0 API authentication to the specified IServiceCollection.

public static Auth0ApiAuthenticationBuilder AddAuth0ApiAuthentication(this IServiceCollection services, Action<Auth0ApiOptions>? configureOptions)

Parameters

services IServiceCollection

The service collection to add authentication to.

configureOptions Action<Auth0ApiOptions>

An action to configure the Auth0ApiOptions.

Returns

Auth0ApiAuthenticationBuilder

An Auth0ApiAuthenticationBuilder for further configuration.

Exceptions

ArgumentNullException

Thrown when services or configureOptions is null.

AddAuth0ApiAuthentication(IServiceCollection, string?, Action<Auth0ApiOptions>?)

Adds Auth0 API authentication to the specified IServiceCollection.

public static Auth0ApiAuthenticationBuilder AddAuth0ApiAuthentication(this IServiceCollection services, string? authenticationScheme, Action<Auth0ApiOptions>? configureOptions)

Parameters

services IServiceCollection

The service collection to add authentication to.

authenticationScheme string

The authentication scheme to use.

configureOptions Action<Auth0ApiOptions>

An action to configure the Auth0ApiOptions.

Returns

Auth0ApiAuthenticationBuilder

An Auth0ApiAuthenticationBuilder for further configuration.

Exceptions

ArgumentNullException

Thrown when services or configureOptions is null.

ArgumentException

Thrown when authenticationScheme is null or empty.