Skip to content

Commit 79c9ec4

Browse files
authored
fix: expose CustomDomainHeader in __all__ and fix return type annotation (#862)
## Changes: - add `"CustomDomainHeader"` to `__all__` - change `CustomDomainHeader` return type annotation from `Dict[str, Any]` to `RequestOptions` Closes #861
2 parents befdd99 + 1a7370f commit 79c9ec4

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/auth0/management/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6667,6 +6667,7 @@ def __dir__():
66676667
"CspReportingEndpoints",
66686668
"CspReportingInfrastructure",
66696669
"CustomDomain",
6670+
"CustomDomainHeader",
66706671
"CustomDomainCustomClientIpHeader",
66716672
"CustomDomainCustomClientIpHeaderEnum",
66726673
"CustomDomainProvisioningTypeEnum",

src/auth0/management/management_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from json import dumps
66
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
77

8+
from .core.request_options import RequestOptions
9+
810
import httpx
911
from .client import AsyncAuth0, Auth0
1012
from .token_provider import TokenProvider
@@ -36,7 +38,7 @@ def _enforce_custom_domain_whitelist(request: httpx.Request) -> None:
3638
del request.headers[CUSTOM_DOMAIN_HEADER]
3739

3840

39-
def CustomDomainHeader(domain: str) -> Dict[str, Any]:
41+
def CustomDomainHeader(domain: str) -> RequestOptions:
4042
"""Create request options that set the Auth0-Custom-Domain header for a single request.
4143
4244
When both a global custom_domain (set at client init) and a per-request

0 commit comments

Comments
 (0)