Table of Contents

Class CustomDomainsClient

Namespace
Auth0.ManagementApi.Clients
Assembly
Auth0.ManagementApi.dll

Contains methods to access the /custom-domains endpoints.

public class CustomDomainsClient : BaseClient, ICustomDomainsClient
Inheritance
CustomDomainsClient
Implements
Inherited Members

Constructors

CustomDomainsClient(IManagementConnection, Uri, IDictionary<string, string>)

Initializes a new instance of CustomDomainsClient.

public CustomDomainsClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)

Parameters

connection IManagementConnection

IManagementConnection used to make all API calls.

baseUri Uri

Uri of the endpoint to use in making API calls.

defaultHeaders IDictionary<string, string>

Dictionary containing default headers included with every request this client makes.

Methods

CreateAsync(CustomDomainCreateRequest, CancellationToken)

Creates a new custom domain and returns it.

public Task<CustomDomain> CreateAsync(CustomDomainCreateRequest request, CancellationToken cancellationToken = default)

Parameters

request CustomDomainCreateRequest

A CustomDomainCreateRequest representing the new domain.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<CustomDomain>

The CustomDomain containing the newly created custom domain.

Remarks

The custom domain will need to be verified before it starts accepting requests.

DeleteAsync(string, CancellationToken)

Deletes a custom domain by its ID.

public Task DeleteAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the domain to delete.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asyncronous delete operation.

Remarks

When deleted, Auth0 will stop serving requests for this domain.

GetAllAsync(CancellationToken)

Retrieves the status of every custom domain.

public Task<IList<CustomDomain>> GetAllAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<IList<CustomDomain>>

A IList<T> containing the details of every custom domain.

GetAsync(string, CancellationToken)

Retrieves a custom domain status by its ID

public Task<CustomDomain> GetAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the domain to retrieve.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<CustomDomain>

The CustomDomain that was requested.

VerifyAsync(string, CancellationToken)

Run the verification process for the custom domain.

public Task<CustomDomainVerificationResponse> VerifyAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the domain to verify.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<CustomDomainVerificationResponse>

The CustomDomainVerification that was requested.