Class CustomDomainsClient
- Namespace
- Auth0.ManagementApi
- Assembly
- Auth0.ManagementApi.dll
public class CustomDomainsClient : ICustomDomainsClient
- Inheritance
-
CustomDomainsClient
- Implements
- Inherited Members
- Extension Methods
Methods
CreateAsync(CreateCustomDomainRequestContent, RequestOptions?, CancellationToken)
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
public WithRawResponseTask<CreateCustomDomainResponseContent> CreateAsync(CreateCustomDomainRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
requestCreateCustomDomainRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.CustomDomains.CreateAsync(
new CreateCustomDomainRequestContent
{
Domain = "domain",
Type = CustomDomainProvisioningTypeEnum.Auth0ManagedCerts,
}
);
DeleteAsync(string, RequestOptions?, CancellationToken)
Delete a custom domain and stop serving requests for it.
public Task DeleteAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.CustomDomains.DeleteAsync("id");
GetAsync(string, RequestOptions?, CancellationToken)
Retrieve a custom domain configuration and status.
public WithRawResponseTask<GetCustomDomainResponseContent> GetAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.CustomDomains.GetAsync("id");
ListAsync(ListCustomDomainsRequestParameters, RequestOptions?, CancellationToken)
Retrieve details on custom domains.
public WithRawResponseTask<IEnumerable<CustomDomain>> ListAsync(ListCustomDomainsRequestParameters request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
requestListCustomDomainsRequestParametersoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.CustomDomains.ListAsync(
new ListCustomDomainsRequestParameters
{
Q = "q",
Fields = "fields",
IncludeFields = true,
Sort = "sort",
}
);
TestAsync(string, RequestOptions?, CancellationToken)
Run the test process on a custom domain.
public WithRawResponseTask<TestCustomDomainResponseContent> TestAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.CustomDomains.TestAsync("id");
UpdateAsync(string, UpdateCustomDomainRequestContent, RequestOptions?, CancellationToken)
Update a custom domain.
These are the attributes that can be updated:
- custom_client_ip_header
- tls_policy
<p>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</p>
To update the custom_client_ip_header for a domain, the body to
send should be:
<pre><code class="lang-csharp">{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>
<p>Updating TLS_POLICY for a custom domain</p>
To update the tls_policy for a domain, the body to send should be:
<pre><code class="lang-csharp">{ "tls_policy": "recommended" }</code></pre>
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 <code>compatible</code> TLS policy is no longer supported.
public WithRawResponseTask<UpdateCustomDomainResponseContent> UpdateAsync(string id, UpdateCustomDomainRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringrequestUpdateCustomDomainRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.CustomDomains.UpdateAsync("id", new UpdateCustomDomainRequestContent());
VerifyAsync(string, RequestOptions?, CancellationToken)
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.
public WithRawResponseTask<VerifyCustomDomainResponseContent> VerifyAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.CustomDomains.VerifyAsync("id");