Class CustomDomainInterceptor
- Namespace
- Auth0.ManagementApi.Core
- Assembly
- Auth0.ManagementApi.dll
A DelegatingHandler that enforces the Auth0-Custom-Domain header whitelist.
The Auth0-Custom-Domain header is only meaningful for specific Management API endpoints
that generate user-facing links (email verification, password reset, invitations, etc.).
This handler strips the header from requests to any path not on the whitelist, preventing
it from leaking to unrelated endpoints.
Whitelisted paths:
POST /tickets/email-verificationPOST /tickets/password-changePOST /organizations/{id}/invitationsPOST /guardian/enrollments/ticketPOST /jobs/verification-emailPOST /jobs/users-importsPOST /usersandPATCH /users/{id}POST /self-service-profiles/{id}/sso-ticket
public class CustomDomainInterceptor : DelegatingHandler, IDisposable
- Inheritance
-
CustomDomainInterceptor
- Implements
- Inherited Members
- Extension Methods
Constructors
CustomDomainInterceptor()
Initializes a new instance of CustomDomainInterceptor with a default HttpClientHandler as the inner handler.
public CustomDomainInterceptor()
CustomDomainInterceptor(HttpMessageHandler)
Initializes a new instance of CustomDomainInterceptor wrapping the specified inner handler.
public CustomDomainInterceptor(HttpMessageHandler innerHandler)
Parameters
innerHandlerHttpMessageHandlerThe inner HttpMessageHandler to delegate to.
Exceptions
- ArgumentNullException
Thrown when
innerHandleris null.
Fields
HeaderName
The name of the custom domain header.
public const string HeaderName = "Auth0-Custom-Domain"
Field Value
Methods
SendAsync(HttpRequestMessage, CancellationToken)
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
requestHttpRequestMessagecancellationTokenCancellationToken