Table of Contents

Class Auth0CustomDomainsOptions

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

Configuration options for Auth0 custom domains token validation.

public class Auth0CustomDomainsOptions
Inheritance
Auth0CustomDomainsOptions
Inherited Members

Properties

AutomaticRefreshInterval

Gets or sets the TimeSpan that controls how often an automatic metadata refresh should occur.

public TimeSpan AutomaticRefreshInterval { get; set; }

Property Value

TimeSpan

Remarks

Defaults to 12 hours

BackchannelHttpHandler

Custom HTTP message handler for backchannel requests.

public HttpMessageHandler? BackchannelHttpHandler { get; set; }

Property Value

HttpMessageHandler

BackchannelTimeout

Timeout for backchannel HTTP requests (discovery and JWKS).
Default: 60 seconds

public TimeSpan BackchannelTimeout { get; set; }

Property Value

TimeSpan

ConfigurationManagerCache

The cache implementation for ConfigurationManager instances.
Defaults to MemoryConfigurationManagerCache with a max size of 100 entries.
Set to NullConfigurationManagerCache to disable caching.

public IConfigurationManagerCache? ConfigurationManagerCache { get; set; }

Property Value

IConfigurationManagerCache

Domains

List of Auth0 domains for multi-domain scenarios. Each domain should be in the format: tenant.auth0.com (without https://).

public IReadOnlyList<string>? Domains { get; set; }

Property Value

IReadOnlyList<string>

Remarks

Use this for scenarios where a fixed set of issuers is known at configuration time. Mutually exclusive with DomainsResolver.

DomainsResolver

Delegate for dynamically resolving allowed domains at runtime.

public Func<HttpContext, CancellationToken, Task<IReadOnlyList<string>>>? DomainsResolver { get; set; }

Property Value

Func<HttpContext, CancellationToken, Task<IReadOnlyList<string>>>

Remarks

Use this for fully multi-domain APIs where domains are determined dynamically based on request context, database queries, or external APIs. Mutually exclusive with Domains. The delegate receives the full HttpContext.

RefreshInterval

The minimum time between retrievals, in the event that a retrieval failed, or that a refresh was explicitly requested.

public TimeSpan RefreshInterval { get; set; }

Property Value

TimeSpan

Remarks

Defaults to 5 minutes