Back to Node Auth0

Class CustomDomainsClient

docs/classes/management.SDK.CustomDomainsClient.html

5.9.115.5 KB
Original Source

Class CustomDomainsClient

Index

Constructors

constructor

Methods

listcreategetDefaultsetDefaultgetdeleteupdatetestverify

Properties

_options

Constructors

constructor

new CustomDomainsClient(options: BaseClientOptions): CustomDomainsClient

Parameters

Returns CustomDomainsClient

Methods

list

list(
request?: ListCustomDomainsRequestParameters,
requestOptions?: CustomDomainsClient.RequestOptions,
): HttpResponsePromise<ListCustomDomainsResponseContent>

Retrieve details on custom domains.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<ListCustomDomainsResponseContent>

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.customDomains.list({ q: "q", fields: "fields", include_fields: true, sort: "sort" })Copy

create

create(
request: CreateCustomDomainRequestContent,
requestOptions?: CustomDomainsClient.RequestOptions,
): HttpResponsePromise<CreateCustomDomainResponseContent>

Create a new custom domain.

Note: The custom domain will need to be verified before it will accept requests.

Optional attributes that can be updated:

  • custom_client_ip_header
  • tls_policy

TLS Policies:

  • recommended - for modern usage this includes TLS 1.2 only

Parameters

Request-specific configuration.

Returns HttpResponsePromise<CreateCustomDomainResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.customDomains.create({ domain: "domain", type: "auth0_managed_certs" })Copy

getDefault

getDefault(
requestOptions?: CustomDomainsClient.RequestOptions,
): HttpResponsePromise<GetDefaultDomainResponseContent>

Retrieve the tenant's default domain.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<GetDefaultDomainResponseContent>

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.customDomains.getDefault()Copy

setDefault

setDefault(
request: SetDefaultCustomDomainRequestContent,
requestOptions?: CustomDomainsClient.RequestOptions,
): HttpResponsePromise<UpdateDefaultDomainResponseContent>

Set the default custom domain for the tenant.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<UpdateDefaultDomainResponseContent>

Throws

Management.BadRequestError

Throws

Management.ForbiddenError

Example

await client.customDomains.setDefault({ domain: "domain" })Copy

get

get(
id: string,
requestOptions?: CustomDomainsClient.RequestOptions,
): HttpResponsePromise<GetCustomDomainResponseContent>

Retrieve a custom domain configuration and status.

Parameters

  • id: string

ID of the custom domain to retrieve.

Request-specific configuration.

Returns HttpResponsePromise<GetCustomDomainResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.customDomains.get("id")Copy

delete

delete(
id: string,
requestOptions?: CustomDomainsClient.RequestOptions,
): HttpResponsePromise<void>

Delete a custom domain and stop serving requests for it.

Parameters

  • id: string

ID of the custom domain to delete.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.customDomains.delete("id")Copy

update

update(
id: string,
request?: UpdateCustomDomainRequestContent,
requestOptions?: CustomDomainsClient.RequestOptions,
): HttpResponsePromise<UpdateCustomDomainResponseContent>

Update a custom domain.

These are the attributes that can be updated:

  • custom_client_ip_header
  • tls_policy
Updating CUSTOM_CLIENT_IP_HEADER for a custom domain

To update the custom_client_ip_header for a domain, the body to send should be:

{ "custom_client_ip_header": "cf-connecting-ip" }
Updating TLS_POLICY for a custom domain

To update the tls_policy for a domain, the body to send should be:

{ "tls_policy": "recommended" }

TLS Policies:

  • recommended - for modern usage this includes TLS 1.2 only

Some considerations:

  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • The compatible TLS policy is no longer supported.

Parameters

  • id: string

The id of the custom domain to update

Request-specific configuration.

Returns HttpResponsePromise<UpdateCustomDomainResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.customDomains.update("id")Copy

test

test(
id: string,
requestOptions?: CustomDomainsClient.RequestOptions,
): HttpResponsePromise<TestCustomDomainResponseContent>

Run the test process on a custom domain.

Parameters

  • id: string

ID of the custom domain to test.

Request-specific configuration.

Returns HttpResponsePromise<TestCustomDomainResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.ConflictError

Example

await client.customDomains.test("id")Copy

verify

verify(
id: string,
requestOptions?: CustomDomainsClient.RequestOptions,
): HttpResponsePromise<VerifyCustomDomainResponseContent>

Run the verification process on a custom domain.

Note: Check the status field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.

For self_managed_certs, when the custom domain is verified for the first time, the response will also include the cname_api_key which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests.

Learn more about verifying custom domains that use Auth0 Managed certificates. Learn more about verifying custom domains that use Self Managed certificates.

Parameters

  • id: string

ID of the custom domain to verify.

Request-specific configuration.

Returns HttpResponsePromise<VerifyCustomDomainResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.customDomains.verify("id")Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Constructors constructor Methods listcreategetDefaultsetDefaultgetdeleteupdatetestverify Properties _options