auth0-python 5.1.0__py3-none-any.whl → 5.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. auth0/authentication/base.py +8 -3
  2. auth0/authentication/rest.py +16 -5
  3. auth0/management/__init__.py +5 -0
  4. auth0/management/actions/client.py +4 -4
  5. auth0/management/actions/modules/raw_client.py +4 -4
  6. auth0/management/actions/modules/versions/raw_client.py +2 -2
  7. auth0/management/actions/raw_client.py +2 -2
  8. auth0/management/actions/triggers/bindings/client.py +4 -4
  9. auth0/management/actions/triggers/bindings/raw_client.py +2 -2
  10. auth0/management/actions/versions/raw_client.py +2 -2
  11. auth0/management/branding/phone/templates/client.py +2 -0
  12. auth0/management/branding/phone/templates/raw_client.py +2 -0
  13. auth0/management/client.py +11 -0
  14. auth0/management/client_grants/client.py +10 -12
  15. auth0/management/client_grants/raw_client.py +8 -8
  16. auth0/management/clients/client.py +198 -4
  17. auth0/management/clients/credentials/client.py +10 -0
  18. auth0/management/clients/credentials/raw_client.py +10 -0
  19. auth0/management/clients/raw_client.py +449 -6
  20. auth0/management/connections/client.py +20 -20
  21. auth0/management/connections/keys/client.py +90 -0
  22. auth0/management/connections/keys/raw_client.py +239 -0
  23. auth0/management/connections/raw_client.py +2 -2
  24. auth0/management/connections/scim_configuration/client.py +102 -0
  25. auth0/management/connections/scim_configuration/raw_client.py +213 -0
  26. auth0/management/core/__init__.py +13 -5
  27. auth0/management/core/client_wrapper.py +5 -0
  28. auth0/management/core/http_client.py +154 -41
  29. auth0/management/core/logging.py +107 -0
  30. auth0/management/core/pydantic_utilities.py +25 -8
  31. auth0/management/custom_domains/client.py +144 -2
  32. auth0/management/custom_domains/raw_client.py +280 -2
  33. auth0/management/device_credentials/raw_client.py +2 -2
  34. auth0/management/flows/raw_client.py +4 -4
  35. auth0/management/flows/vault/connections/raw_client.py +2 -2
  36. auth0/management/forms/raw_client.py +2 -2
  37. auth0/management/groups/client.py +68 -0
  38. auth0/management/groups/raw_client.py +148 -0
  39. auth0/management/hooks/client.py +2 -0
  40. auth0/management/hooks/raw_client.py +4 -2
  41. auth0/management/keys/encryption/raw_client.py +2 -2
  42. auth0/management/logs/raw_client.py +2 -2
  43. auth0/management/management_client.py +104 -1
  44. auth0/management/network_acls/client.py +20 -24
  45. auth0/management/network_acls/raw_client.py +18 -18
  46. auth0/management/organizations/__init__.py +3 -2
  47. auth0/management/organizations/client.py +19 -0
  48. auth0/management/organizations/client_grants/raw_client.py +2 -2
  49. auth0/management/organizations/connections/__init__.py +4 -0
  50. auth0/management/organizations/connections/client.py +647 -0
  51. auth0/management/organizations/connections/raw_client.py +1093 -0
  52. auth0/management/organizations/discovery_domains/client.py +6 -0
  53. auth0/management/organizations/discovery_domains/raw_client.py +6 -0
  54. auth0/management/organizations/enabled_connections/raw_client.py +2 -2
  55. auth0/management/organizations/invitations/raw_client.py +2 -2
  56. auth0/management/organizations/members/roles/raw_client.py +2 -2
  57. auth0/management/prompts/rendering/client.py +2 -0
  58. auth0/management/prompts/rendering/raw_client.py +12 -6
  59. auth0/management/refresh_tokens/client.py +160 -0
  60. auth0/management/refresh_tokens/raw_client.py +282 -0
  61. auth0/management/resource_servers/client.py +20 -0
  62. auth0/management/resource_servers/raw_client.py +22 -2
  63. auth0/management/roles/permissions/raw_client.py +2 -2
  64. auth0/management/roles/raw_client.py +2 -2
  65. auth0/management/rules/raw_client.py +2 -2
  66. auth0/management/self_service_profiles/client.py +4 -4
  67. auth0/management/self_service_profiles/raw_client.py +6 -6
  68. auth0/management/sessions/client.py +2 -0
  69. auth0/management/sessions/raw_client.py +2 -0
  70. auth0/management/tenants/settings/client.py +2 -0
  71. auth0/management/tenants/settings/raw_client.py +2 -0
  72. auth0/management/types/__init__.py +181 -108
  73. auth0/management/types/action_trigger_type_enum.py +21 -1
  74. auth0/management/types/acul_configs_item.py +5 -1
  75. auth0/management/types/acul_context_configuration.py +1 -1
  76. auth0/management/types/cimd_mapped_client_authentication_methods.py +26 -0
  77. auth0/management/types/cimd_mapped_client_authentication_methods_private_key_jwt.py +27 -0
  78. auth0/management/types/cimd_mapped_client_fields.py +69 -0
  79. auth0/management/types/cimd_mapped_private_key_jwt_credential.py +32 -0
  80. auth0/management/types/cimd_validation_result.py +36 -0
  81. auth0/management/types/client.py +13 -0
  82. auth0/management/types/client_async_approval_notifications_channels_api_patch_configuration.py +3 -1
  83. auth0/management/types/client_external_metadata_created_by_enum.py +5 -0
  84. auth0/management/types/client_external_metadata_type_enum.py +5 -0
  85. auth0/management/types/client_signing_keys.py +1 -1
  86. auth0/management/types/client_token_exchange_type_enum.py +3 -1
  87. auth0/management/types/connection_access_token_urlo_auth_1.py +5 -0
  88. auth0/management/types/connection_api_enable_groups.py +3 -0
  89. auth0/management/types/connection_api_enable_groups_google_apps.py +5 -0
  90. auth0/management/types/connection_client_id_linkedin.py +3 -0
  91. auth0/management/types/connection_client_id_o_auth_1.py +5 -0
  92. auth0/management/types/connection_client_secret_linkedin.py +3 -0
  93. auth0/management/types/connection_client_secret_o_auth_1.py +5 -0
  94. auth0/management/types/connection_dpop_signing_alg_values_supported.py +5 -0
  95. auth0/management/types/connection_freeform_scopes_linkedin.py +5 -0
  96. auth0/management/types/connection_id_token_signed_response_alg_enum.py +3 -1
  97. auth0/management/types/connection_identity_provider_enum.py +0 -7
  98. auth0/management/types/connection_options_adfs.py +2 -2
  99. auth0/management/types/connection_options_auth_0.py +2 -0
  100. auth0/management/types/connection_options_azure_ad.py +1 -1
  101. auth0/management/types/connection_options_common_oidc.py +5 -5
  102. auth0/management/types/connection_options_google_apps.py +2 -0
  103. auth0/management/types/connection_options_linkedin.py +37 -6
  104. auth0/management/types/connection_options_o_auth_1.py +37 -6
  105. auth0/management/types/connection_options_o_auth_2.py +6 -8
  106. auth0/management/types/connection_options_oidc_metadata.py +2 -0
  107. auth0/management/types/connection_password_options.py +30 -0
  108. auth0/management/types/connection_password_options_complexity.py +41 -0
  109. auth0/management/types/connection_password_options_dictionary.py +34 -0
  110. auth0/management/types/connection_password_options_history.py +31 -0
  111. auth0/management/types/connection_password_options_profile_data.py +31 -0
  112. auth0/management/types/connection_properties_options.py +7 -0
  113. auth0/management/types/connection_request_token_urlo_auth_1.py +5 -0
  114. auth0/management/types/connection_response_common.py +1 -1
  115. auth0/management/types/connection_scope_linkedin.py +5 -0
  116. auth0/management/types/connection_scripts_o_auth_1.py +32 -0
  117. auth0/management/types/connection_signature_method_o_auth_1.py +5 -0
  118. auth0/management/types/connection_strategy_enum.py +0 -7
  119. auth0/management/types/connection_token_endpoint_auth_signing_alg_enum.py +3 -1
  120. auth0/management/types/connection_user_authorization_urlo_auth_1.py +5 -0
  121. auth0/management/types/create_client_response_content.py +13 -0
  122. auth0/management/types/create_connection_common.py +14 -4
  123. auth0/management/types/create_directory_provisioning_request_content.py +3 -0
  124. auth0/management/types/create_directory_provisioning_response_content.py +2 -0
  125. auth0/management/types/create_organization_all_connection_response_content.py +52 -0
  126. auth0/management/types/create_resource_server_response_content.py +5 -0
  127. auth0/management/types/create_scim_configuration_response_content.py +12 -11
  128. auth0/management/types/create_self_service_profile_response_content.py +1 -1
  129. auth0/management/types/create_user_authentication_method_response_content.py +5 -1
  130. auth0/management/types/device_credential.py +5 -1
  131. auth0/management/types/directory_provisioning.py +2 -0
  132. auth0/management/types/event_stream_webhook_authorization_response.py +4 -1
  133. auth0/management/types/event_stream_webhook_custom_header_auth.py +28 -0
  134. auth0/management/types/event_stream_webhook_custom_header_auth_method_enum.py +5 -0
  135. auth0/management/types/get_acul_response_content.py +5 -1
  136. auth0/management/types/get_client_response_content.py +13 -0
  137. auth0/management/types/{connection_options_aol.py → get_default_canonical_domain_response_content.py} +4 -4
  138. auth0/management/types/get_default_custom_domain_response_content.py +67 -0
  139. auth0/management/types/get_default_domain_response_content.py +10 -0
  140. auth0/management/types/get_directory_provisioning_response_content.py +2 -0
  141. auth0/management/types/get_group_response_content.py +1 -7
  142. auth0/management/types/get_organization_all_connection_response_content.py +52 -0
  143. auth0/management/types/get_refresh_tokens_paginated_response_content.py +24 -0
  144. auth0/management/types/get_resource_server_response_content.py +5 -0
  145. auth0/management/types/get_scim_configuration_response_content.py +12 -11
  146. auth0/management/types/get_self_service_profile_response_content.py +1 -1
  147. auth0/management/types/group.py +1 -7
  148. auth0/management/types/identity_provider_enum.py +0 -7
  149. auth0/management/types/list_aculs_response_content_item.py +5 -1
  150. auth0/management/types/list_organization_all_connections_offset_paginated_response_content.py +23 -0
  151. auth0/management/types/list_scim_configurations_response_content.py +28 -0
  152. auth0/management/types/network_acl_match.py +16 -0
  153. auth0/management/types/network_acl_match_connecting_ipv_4_cidr.py +3 -0
  154. auth0/management/types/network_acl_match_connecting_ipv_6_cidr.py +3 -0
  155. auth0/management/types/oauth_scope.py +1 -0
  156. auth0/management/types/organization_access_level_enum.py +5 -0
  157. auth0/management/types/organization_access_level_enum_with_null.py +5 -0
  158. auth0/management/types/organization_all_connection_post.py +52 -0
  159. auth0/management/types/password_character_type_enum.py +5 -0
  160. auth0/management/types/password_character_type_rule_policy_enum.py +5 -0
  161. auth0/management/types/password_default_dictionaries_enum.py +5 -0
  162. auth0/management/types/password_identical_characters_policy_enum.py +5 -0
  163. auth0/management/types/password_max_length_exceeded_policy_enum.py +5 -0
  164. auth0/management/types/password_sequential_characters_policy_enum.py +5 -0
  165. auth0/management/types/post_connection_keys_alg_enum.py +7 -0
  166. auth0/management/types/{connection_options_miicard.py → post_connection_keys_request_content.py} +4 -6
  167. auth0/management/types/post_connections_keys_response_content.py +7 -0
  168. auth0/management/types/post_connections_keys_response_content_item.py +66 -0
  169. auth0/management/types/preview_cimd_metadata_response_content.py +32 -0
  170. auth0/management/types/prompt_language_enum.py +1 -0
  171. auth0/management/types/public_key_credential.py +5 -0
  172. auth0/management/types/register_cimd_client_response_content.py +31 -0
  173. auth0/management/types/resource_server.py +5 -0
  174. auth0/management/types/resource_server_proof_of_possession_required_for_enum.py +1 -1
  175. auth0/management/types/rotate_client_secret_response_content.py +13 -0
  176. auth0/management/types/rotate_connection_keys_signing_alg_enum.py +3 -1
  177. auth0/management/types/scim_configuration.py +59 -0
  178. auth0/management/types/self_service_profile.py +1 -1
  179. auth0/management/types/self_service_profile_sso_ticket_provisioning_scope_enum.py +13 -1
  180. auth0/management/types/set_user_authentication_method_response_content.py +5 -1
  181. auth0/management/types/supported_locales.py +1 -0
  182. auth0/management/types/synchronize_groups_enum.py +5 -0
  183. auth0/management/types/tenant_settings_supported_locales_enum.py +1 -0
  184. auth0/management/types/update_acul_response_content.py +5 -1
  185. auth0/management/types/update_client_response_content.py +13 -0
  186. auth0/management/types/update_connection_options.py +7 -0
  187. auth0/management/types/{connection_options_flickr.py → update_default_canonical_domain_response_content.py} +4 -4
  188. auth0/management/types/update_default_custom_domain_response_content.py +67 -0
  189. auth0/management/types/update_default_domain_response_content.py +10 -0
  190. auth0/management/types/update_directory_provisioning_request_content.py +3 -0
  191. auth0/management/types/update_directory_provisioning_response_content.py +2 -0
  192. auth0/management/types/update_organization_all_connection_response_content.py +52 -0
  193. auth0/management/types/update_resource_server_response_content.py +5 -0
  194. auth0/management/types/update_scim_configuration_response_content.py +12 -11
  195. auth0/management/types/update_self_service_profile_response_content.py +1 -1
  196. auth0/management/types/user_attribute_profile_strategy_overrides_mapping.py +5 -1
  197. auth0/management/types/user_attribute_profile_user_attribute_additional_properties.py +5 -1
  198. auth0/management/types/user_identity.py +5 -1
  199. auth0/management/types/user_identity_provider_enum.py +0 -7
  200. auth0/management/user_grants/raw_client.py +2 -2
  201. auth0/management/users/authentication_methods/client.py +2 -0
  202. auth0/management/users/authentication_methods/raw_client.py +4 -2
  203. auth0/management/users/client.py +6 -2
  204. auth0/management/users/identities/client.py +2 -0
  205. auth0/management/users/identities/raw_client.py +2 -0
  206. auth0/management/users/logs/raw_client.py +2 -2
  207. auth0/management/users/organizations/raw_client.py +2 -2
  208. auth0/management/users/permissions/raw_client.py +2 -2
  209. auth0/management/users/raw_client.py +8 -4
  210. auth0/management/users/roles/raw_client.py +2 -2
  211. {auth0_python-5.1.0.dist-info → auth0_python-5.3.0.dist-info}/METADATA +45 -8
  212. {auth0_python-5.1.0.dist-info → auth0_python-5.3.0.dist-info}/RECORD +214 -188
  213. auth0/management/core/custom_pagination.py +0 -152
  214. auth0/management/types/connection_authorization_endpoint_o_auth_2.py +0 -5
  215. auth0/management/types/connection_end_session_endpoint_o_auth_2.py +0 -5
  216. auth0/management/types/connection_options_renren.py +0 -22
  217. auth0/management/types/connection_options_yammer.py +0 -22
  218. auth0/management/types/connection_response_content_aol.py +0 -28
  219. auth0/management/types/connection_response_content_aol_strategy.py +0 -5
  220. auth0/management/types/connection_response_content_flickr.py +0 -28
  221. auth0/management/types/connection_response_content_flickr_strategy.py +0 -5
  222. auth0/management/types/connection_response_content_miicard.py +0 -28
  223. auth0/management/types/connection_response_content_miicard_strategy.py +0 -5
  224. auth0/management/types/connection_response_content_renren.py +0 -28
  225. auth0/management/types/connection_response_content_renren_strategy.py +0 -5
  226. auth0/management/types/connection_response_content_yammer.py +0 -28
  227. auth0/management/types/connection_response_content_yammer_strategy.py +0 -5
  228. auth0/management/types/connection_token_endpoint_o_auth_2.py +0 -5
  229. auth0/management/types/connection_token_endpoint_oidc.py +0 -5
  230. auth0/management/types/connection_upstream_params_adfs.py +0 -7
  231. auth0/management/types/connection_userinfo_endpoint_oidc.py +0 -5
  232. auth0/management/types/create_connection_request_content_aol.py +0 -27
  233. auth0/management/types/create_connection_request_content_aol_strategy.py +0 -5
  234. auth0/management/types/create_connection_request_content_flickr.py +0 -27
  235. auth0/management/types/create_connection_request_content_flickr_strategy.py +0 -5
  236. auth0/management/types/create_connection_request_content_miicard.py +0 -27
  237. auth0/management/types/create_connection_request_content_miicard_strategy.py +0 -5
  238. auth0/management/types/create_connection_request_content_renren.py +0 -27
  239. auth0/management/types/create_connection_request_content_renren_strategy.py +0 -5
  240. auth0/management/types/create_connection_request_content_yammer.py +0 -27
  241. auth0/management/types/create_connection_request_content_yammer_strategy.py +0 -5
  242. auth0/management/types/update_connection_request_content_aol.py +0 -25
  243. auth0/management/types/update_connection_request_content_flickr.py +0 -25
  244. auth0/management/types/update_connection_request_content_miicard.py +0 -25
  245. auth0/management/types/update_connection_request_content_renren.py +0 -25
  246. auth0/management/types/update_connection_request_content_yammer.py +0 -25
  247. {auth0_python-5.1.0.dist-info → auth0_python-5.3.0.dist-info}/WHEEL +0 -0
  248. {auth0_python-5.1.0.dist-info → auth0_python-5.3.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,11 +2,10 @@ from __future__ import annotations
2
2
 
3
3
  from typing import Any
4
4
 
5
+ from .client_authentication import add_client_authentication
5
6
  from .rest import RestClient, RestClientOptions
6
7
  from .types import RequestData, TimeoutType
7
8
 
8
- from .client_authentication import add_client_authentication
9
-
10
9
  UNKNOWN_ERROR = "a0.sdk.internal.unknown"
11
10
 
12
11
 
@@ -22,6 +21,9 @@ class AuthenticationBase:
22
21
  telemetry (bool, optional): Enable or disable telemetry (defaults to True)
23
22
  timeout (float or tuple, optional): Change the requests connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)
24
23
  protocol (str, optional): Useful for testing. (defaults to 'https')
24
+ client_info (dict, optional): Custom telemetry data for the Auth0-Client header.
25
+ When provided, overrides the default SDK telemetry. Useful for wrapper
26
+ SDKs that need to identify themselves. Ignored when telemetry is False.
25
27
  """
26
28
 
27
29
  def __init__(
@@ -34,6 +36,7 @@ class AuthenticationBase:
34
36
  telemetry: bool = True,
35
37
  timeout: TimeoutType = 5.0,
36
38
  protocol: str = "https",
39
+ client_info: dict[str, Any] | None = None,
37
40
  ) -> None:
38
41
  self.domain = domain
39
42
  self.client_id = client_id
@@ -43,7 +46,9 @@ class AuthenticationBase:
43
46
  self.protocol = protocol
44
47
  self.client = RestClient(
45
48
  None,
46
- options=RestClientOptions(telemetry=telemetry, timeout=timeout, retries=0),
49
+ options=RestClientOptions(
50
+ telemetry=telemetry, timeout=timeout, retries=0, client_info=client_info
51
+ ),
47
52
  )
48
53
 
49
54
  def _add_client_authentication(self, payload: dict[str, Any]) -> dict[str, Any]:
@@ -10,7 +10,6 @@ from typing import TYPE_CHECKING, Any, Mapping
10
10
  from urllib.parse import urlencode
11
11
 
12
12
  import requests
13
-
14
13
  from .exceptions import Auth0Error, RateLimitError
15
14
  from .types import RequestData, TimeoutType
16
15
 
@@ -38,6 +37,13 @@ class RestClientOptions:
38
37
  times using an exponential backoff strategy, before
39
38
  raising a RateLimitError exception. 10 retries max.
40
39
  (defaults to 3)
40
+ client_info (dict, optional): Custom telemetry data to send
41
+ in the Auth0-Client header instead of the default SDK
42
+ info. Useful for wrapper SDKs that need to identify
43
+ themselves. When provided, this dict is JSON-encoded
44
+ and base64-encoded as the header value. Ignored when
45
+ telemetry is False.
46
+ (defaults to None)
41
47
  """
42
48
 
43
49
  def __init__(
@@ -45,10 +51,12 @@ class RestClientOptions:
45
51
  telemetry: bool = True,
46
52
  timeout: TimeoutType = 5.0,
47
53
  retries: int = 3,
54
+ client_info: dict[str, Any] | None = None,
48
55
  ) -> None:
49
56
  self.telemetry = telemetry
50
57
  self.timeout = timeout
51
58
  self.retries = retries
59
+ self.client_info = client_info
52
60
 
53
61
 
54
62
  class RestClient:
@@ -94,17 +102,20 @@ class RestClient:
94
102
 
95
103
  if options.telemetry:
96
104
  py_version = platform.python_version()
97
- version = sys.modules["auth0"].__version__
98
105
 
99
- auth0_client = dumps(
100
- {
106
+ if options.client_info is not None:
107
+ auth0_client_dict = options.client_info
108
+ else:
109
+ version = sys.modules["auth0"].__version__
110
+ auth0_client_dict = {
101
111
  "name": "auth0-python",
102
112
  "version": version,
103
113
  "env": {
104
114
  "python": py_version,
105
115
  },
106
116
  }
107
- ).encode("utf-8")
117
+
118
+ auth0_client = dumps(auth0_client_dict).encode("utf-8")
108
119
 
109
120
  self.base_headers.update(
110
121
  {
@@ -1215,6 +1215,7 @@ if typing.TYPE_CHECKING:
1215
1215
  from .client import AsyncAuth0, Auth0
1216
1216
  from .environment import Auth0Environment
1217
1217
  from .event_streams import EventStreamsCreateRequest
1218
+ from .management_client import AsyncManagementClient, CustomDomainHeader, ManagementClient
1218
1219
  from .version import __version__
1219
1220
  _dynamic_imports: typing.Dict[str, str] = {
1220
1221
  "Action": ".types",
@@ -1457,6 +1458,7 @@ _dynamic_imports: typing.Dict[str, str] = {
1457
1458
  "CreatedAuthenticationMethodTypeEnum": ".types",
1458
1459
  "CreatedUserAuthenticationMethodTypeEnum": ".types",
1459
1460
  "CredentialId": ".types",
1461
+ "CustomDomainHeader": ".management_client",
1460
1462
  "CustomDomain": ".types",
1461
1463
  "CustomDomainCustomClientIpHeader": ".types",
1462
1464
  "CustomDomainCustomClientIpHeaderEnum": ".types",
@@ -2689,6 +2691,7 @@ __all__ = [
2689
2691
  "CreatedUserAuthenticationMethodTypeEnum",
2690
2692
  "CredentialId",
2691
2693
  "CustomDomain",
2694
+ "CustomDomainHeader",
2692
2695
  "CustomDomainCustomClientIpHeader",
2693
2696
  "CustomDomainCustomClientIpHeaderEnum",
2694
2697
  "CustomDomainProvisioningTypeEnum",
@@ -3340,6 +3343,8 @@ __all__ = [
3340
3343
  "LogStreamSumoEnum",
3341
3344
  "LogStreamSumoResponseSchema",
3342
3345
  "LogStreamSumoSink",
3346
+ "ManagementClient",
3347
+ "AsyncManagementClient",
3343
3348
  "MdlPresentationProperties",
3344
3349
  "MdlPresentationRequest",
3345
3350
  "MdlPresentationRequestProperties",
@@ -101,7 +101,7 @@ class ActionsClient:
101
101
  token="YOUR_TOKEN",
102
102
  )
103
103
  response = client.actions.list(
104
- trigger_id="triggerId",
104
+ trigger_id="post-login",
105
105
  action_name="actionName",
106
106
  deployed=True,
107
107
  page=1,
@@ -185,7 +185,7 @@ class ActionsClient:
185
185
  name="name",
186
186
  supported_triggers=[
187
187
  ActionTrigger(
188
- id="id",
188
+ id="post-login",
189
189
  )
190
190
  ],
191
191
  )
@@ -521,7 +521,7 @@ class AsyncActionsClient:
521
521
 
522
522
  async def main() -> None:
523
523
  response = await client.actions.list(
524
- trigger_id="triggerId",
524
+ trigger_id="post-login",
525
525
  action_name="actionName",
526
526
  deployed=True,
527
527
  page=1,
@@ -614,7 +614,7 @@ class AsyncActionsClient:
614
614
  name="name",
615
615
  supported_triggers=[
616
616
  ActionTrigger(
617
- id="id",
617
+ id="post-login",
618
618
  )
619
619
  ],
620
620
  )
@@ -86,7 +86,7 @@ class RawModulesClient:
86
86
  _items = _parsed_response.modules
87
87
  _has_next = True
88
88
  _get_next = lambda: self.list(
89
- page=page + len(_items or []),
89
+ page=page + 1,
90
90
  per_page=per_page,
91
91
  request_options=request_options,
92
92
  )
@@ -649,7 +649,7 @@ class RawModulesClient:
649
649
  _has_next = True
650
650
  _get_next = lambda: self.list_actions(
651
651
  id,
652
- page=page + len(_items or []),
652
+ page=page + 1,
653
653
  per_page=per_page,
654
654
  request_options=request_options,
655
655
  )
@@ -885,7 +885,7 @@ class AsyncRawModulesClient:
885
885
 
886
886
  async def _get_next():
887
887
  return await self.list(
888
- page=page + len(_items or []),
888
+ page=page + 1,
889
889
  per_page=per_page,
890
890
  request_options=request_options,
891
891
  )
@@ -1453,7 +1453,7 @@ class AsyncRawModulesClient:
1453
1453
  async def _get_next():
1454
1454
  return await self.list_actions(
1455
1455
  id,
1456
- page=page + len(_items or []),
1456
+ page=page + 1,
1457
1457
  per_page=per_page,
1458
1458
  request_options=request_options,
1459
1459
  )
@@ -81,7 +81,7 @@ class RawVersionsClient:
81
81
  _has_next = True
82
82
  _get_next = lambda: self.list(
83
83
  id,
84
- page=page + len(_items or []),
84
+ page=page + 1,
85
85
  per_page=per_page,
86
86
  request_options=request_options,
87
87
  )
@@ -409,7 +409,7 @@ class AsyncRawVersionsClient:
409
409
  async def _get_next():
410
410
  return await self.list(
411
411
  id,
412
- page=page + len(_items or []),
412
+ page=page + 1,
413
413
  per_page=per_page,
414
414
  request_options=request_options,
415
415
  )
@@ -110,7 +110,7 @@ class RawActionsClient:
110
110
  trigger_id=trigger_id,
111
111
  action_name=action_name,
112
112
  deployed=deployed,
113
- page=page + len(_items or []),
113
+ page=page + 1,
114
114
  per_page=per_page,
115
115
  installed=installed,
116
116
  request_options=request_options,
@@ -887,7 +887,7 @@ class AsyncRawActionsClient:
887
887
  trigger_id=trigger_id,
888
888
  action_name=action_name,
889
889
  deployed=deployed,
890
- page=page + len(_items or []),
890
+ page=page + 1,
891
891
  per_page=per_page,
892
892
  installed=installed,
893
893
  request_options=request_options,
@@ -69,7 +69,7 @@ class BindingsClient:
69
69
  token="YOUR_TOKEN",
70
70
  )
71
71
  response = client.actions.triggers.bindings.list(
72
- trigger_id="triggerId",
72
+ trigger_id="post-login",
73
73
  page=1,
74
74
  per_page=1,
75
75
  )
@@ -115,7 +115,7 @@ class BindingsClient:
115
115
  token="YOUR_TOKEN",
116
116
  )
117
117
  client.actions.triggers.bindings.update_many(
118
- trigger_id="triggerId",
118
+ trigger_id="post-login",
119
119
  )
120
120
  """
121
121
  _response = self._raw_client.update_many(trigger_id, bindings=bindings, request_options=request_options)
@@ -180,7 +180,7 @@ class AsyncBindingsClient:
180
180
 
181
181
  async def main() -> None:
182
182
  response = await client.actions.triggers.bindings.list(
183
- trigger_id="triggerId",
183
+ trigger_id="post-login",
184
184
  page=1,
185
185
  per_page=1,
186
186
  )
@@ -235,7 +235,7 @@ class AsyncBindingsClient:
235
235
 
236
236
  async def main() -> None:
237
237
  await client.actions.triggers.bindings.update_many(
238
- trigger_id="triggerId",
238
+ trigger_id="post-login",
239
239
  )
240
240
 
241
241
 
@@ -83,7 +83,7 @@ class RawBindingsClient:
83
83
  _has_next = True
84
84
  _get_next = lambda: self.list(
85
85
  trigger_id,
86
- page=page + len(_items or []),
86
+ page=page + 1,
87
87
  per_page=per_page,
88
88
  request_options=request_options,
89
89
  )
@@ -297,7 +297,7 @@ class AsyncRawBindingsClient:
297
297
  async def _get_next():
298
298
  return await self.list(
299
299
  trigger_id,
300
- page=page + len(_items or []),
300
+ page=page + 1,
301
301
  per_page=per_page,
302
302
  request_options=request_options,
303
303
  )
@@ -84,7 +84,7 @@ class RawVersionsClient:
84
84
  _has_next = True
85
85
  _get_next = lambda: self.list(
86
86
  action_id,
87
- page=page + len(_items or []),
87
+ page=page + 1,
88
88
  per_page=per_page,
89
89
  request_options=request_options,
90
90
  )
@@ -396,7 +396,7 @@ class AsyncRawVersionsClient:
396
396
  async def _get_next():
397
397
  return await self.list(
398
398
  action_id,
399
- page=page + len(_items or []),
399
+ page=page + 1,
400
400
  per_page=per_page,
401
401
  request_options=request_options,
402
402
  )
@@ -260,6 +260,7 @@ class TemplatesClient:
260
260
  Destination of the testing phone notification
261
261
 
262
262
  delivery_method : typing.Optional[PhoneProviderDeliveryMethodEnum]
263
+ Medium to use to send the notification
263
264
 
264
265
  request_options : typing.Optional[RequestOptions]
265
266
  Request-specific configuration.
@@ -572,6 +573,7 @@ class AsyncTemplatesClient:
572
573
  Destination of the testing phone notification
573
574
 
574
575
  delivery_method : typing.Optional[PhoneProviderDeliveryMethodEnum]
576
+ Medium to use to send the notification
575
577
 
576
578
  request_options : typing.Optional[RequestOptions]
577
579
  Request-specific configuration.
@@ -625,6 +625,7 @@ class RawTemplatesClient:
625
625
  Destination of the testing phone notification
626
626
 
627
627
  delivery_method : typing.Optional[PhoneProviderDeliveryMethodEnum]
628
+ Medium to use to send the notification
628
629
 
629
630
  request_options : typing.Optional[RequestOptions]
630
631
  Request-specific configuration.
@@ -1311,6 +1312,7 @@ class AsyncRawTemplatesClient:
1311
1312
  Destination of the testing phone notification
1312
1313
 
1313
1314
  delivery_method : typing.Optional[PhoneProviderDeliveryMethodEnum]
1315
+ Medium to use to send the notification
1314
1316
 
1315
1317
  request_options : typing.Optional[RequestOptions]
1316
1318
  Request-specific configuration.
@@ -6,6 +6,7 @@ import typing
6
6
 
7
7
  import httpx
8
8
  from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
+ from .core.logging import LogConfig, Logger
9
10
  from .environment import Auth0Environment
10
11
 
11
12
  if typing.TYPE_CHECKING:
@@ -88,6 +89,9 @@ class Auth0:
88
89
  httpx_client : typing.Optional[httpx.Client]
89
90
  The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
90
91
 
92
+ logging : typing.Optional[typing.Union[LogConfig, Logger]]
93
+ Configure logging for the SDK. Accepts a LogConfig dict with 'level' (debug/info/warn/error), 'logger' (custom logger implementation), and 'silent' (boolean, defaults to True) fields. You can also pass a pre-configured Logger instance.
94
+
91
95
  Examples
92
96
  --------
93
97
  from auth0 import Auth0
@@ -108,6 +112,7 @@ class Auth0:
108
112
  timeout: typing.Optional[float] = None,
109
113
  follow_redirects: typing.Optional[bool] = True,
110
114
  httpx_client: typing.Optional[httpx.Client] = None,
115
+ logging: typing.Optional[typing.Union[LogConfig, Logger]] = None,
111
116
  ):
112
117
  _defaulted_timeout = (
113
118
  timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
@@ -125,6 +130,7 @@ class Auth0:
125
130
  if follow_redirects is not None
126
131
  else httpx.Client(timeout=_defaulted_timeout),
127
132
  timeout=_defaulted_timeout,
133
+ logging=logging,
128
134
  )
129
135
  self._actions: typing.Optional[ActionsClient] = None
130
136
  self._branding: typing.Optional[BrandingClient] = None
@@ -549,6 +555,9 @@ class AsyncAuth0:
549
555
  httpx_client : typing.Optional[httpx.AsyncClient]
550
556
  The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
551
557
 
558
+ logging : typing.Optional[typing.Union[LogConfig, Logger]]
559
+ Configure logging for the SDK. Accepts a LogConfig dict with 'level' (debug/info/warn/error), 'logger' (custom logger implementation), and 'silent' (boolean, defaults to True) fields. You can also pass a pre-configured Logger instance.
560
+
552
561
  Examples
553
562
  --------
554
563
  from auth0 import AsyncAuth0
@@ -569,6 +578,7 @@ class AsyncAuth0:
569
578
  timeout: typing.Optional[float] = None,
570
579
  follow_redirects: typing.Optional[bool] = True,
571
580
  httpx_client: typing.Optional[httpx.AsyncClient] = None,
581
+ logging: typing.Optional[typing.Union[LogConfig, Logger]] = None,
572
582
  ):
573
583
  _defaulted_timeout = (
574
584
  timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
@@ -586,6 +596,7 @@ class AsyncAuth0:
586
596
  if follow_redirects is not None
587
597
  else httpx.AsyncClient(timeout=_defaulted_timeout),
588
598
  timeout=_defaulted_timeout,
599
+ logging=logging,
589
600
  )
590
601
  self._actions: typing.Optional[AsyncActionsClient] = None
591
602
  self._branding: typing.Optional[AsyncBrandingClient] = None
@@ -117,8 +117,8 @@ class ClientGrantsClient:
117
117
  def create(
118
118
  self,
119
119
  *,
120
- client_id: str,
121
120
  audience: str,
121
+ client_id: typing.Optional[str] = OMIT,
122
122
  organization_usage: typing.Optional[ClientGrantOrganizationUsageEnum] = OMIT,
123
123
  allow_any_organization: typing.Optional[bool] = OMIT,
124
124
  scope: typing.Optional[typing.Sequence[str]] = OMIT,
@@ -132,12 +132,12 @@ class ClientGrantsClient:
132
132
 
133
133
  Parameters
134
134
  ----------
135
- client_id : str
136
- ID of the client.
137
-
138
135
  audience : str
139
136
  The audience (API identifier) of this client grant
140
137
 
138
+ client_id : typing.Optional[str]
139
+ ID of the client.
140
+
141
141
  organization_usage : typing.Optional[ClientGrantOrganizationUsageEnum]
142
142
 
143
143
  allow_any_organization : typing.Optional[bool]
@@ -170,13 +170,12 @@ class ClientGrantsClient:
170
170
  token="YOUR_TOKEN",
171
171
  )
172
172
  client.client_grants.create(
173
- client_id="client_id",
174
173
  audience="audience",
175
174
  )
176
175
  """
177
176
  _response = self._raw_client.create(
178
- client_id=client_id,
179
177
  audience=audience,
178
+ client_id=client_id,
180
179
  organization_usage=organization_usage,
181
180
  allow_any_organization=allow_any_organization,
182
181
  scope=scope,
@@ -423,8 +422,8 @@ class AsyncClientGrantsClient:
423
422
  async def create(
424
423
  self,
425
424
  *,
426
- client_id: str,
427
425
  audience: str,
426
+ client_id: typing.Optional[str] = OMIT,
428
427
  organization_usage: typing.Optional[ClientGrantOrganizationUsageEnum] = OMIT,
429
428
  allow_any_organization: typing.Optional[bool] = OMIT,
430
429
  scope: typing.Optional[typing.Sequence[str]] = OMIT,
@@ -438,12 +437,12 @@ class AsyncClientGrantsClient:
438
437
 
439
438
  Parameters
440
439
  ----------
441
- client_id : str
442
- ID of the client.
443
-
444
440
  audience : str
445
441
  The audience (API identifier) of this client grant
446
442
 
443
+ client_id : typing.Optional[str]
444
+ ID of the client.
445
+
447
446
  organization_usage : typing.Optional[ClientGrantOrganizationUsageEnum]
448
447
 
449
448
  allow_any_organization : typing.Optional[bool]
@@ -481,7 +480,6 @@ class AsyncClientGrantsClient:
481
480
 
482
481
  async def main() -> None:
483
482
  await client.client_grants.create(
484
- client_id="client_id",
485
483
  audience="audience",
486
484
  )
487
485
 
@@ -489,8 +487,8 @@ class AsyncClientGrantsClient:
489
487
  asyncio.run(main())
490
488
  """
491
489
  _response = await self._raw_client.create(
492
- client_id=client_id,
493
490
  audience=audience,
491
+ client_id=client_id,
494
492
  organization_usage=organization_usage,
495
493
  allow_any_organization=allow_any_organization,
496
494
  scope=scope,
@@ -152,8 +152,8 @@ class RawClientGrantsClient:
152
152
  def create(
153
153
  self,
154
154
  *,
155
- client_id: str,
156
155
  audience: str,
156
+ client_id: typing.Optional[str] = OMIT,
157
157
  organization_usage: typing.Optional[ClientGrantOrganizationUsageEnum] = OMIT,
158
158
  allow_any_organization: typing.Optional[bool] = OMIT,
159
159
  scope: typing.Optional[typing.Sequence[str]] = OMIT,
@@ -167,12 +167,12 @@ class RawClientGrantsClient:
167
167
 
168
168
  Parameters
169
169
  ----------
170
- client_id : str
171
- ID of the client.
172
-
173
170
  audience : str
174
171
  The audience (API identifier) of this client grant
175
172
 
173
+ client_id : typing.Optional[str]
174
+ ID of the client.
175
+
176
176
  organization_usage : typing.Optional[ClientGrantOrganizationUsageEnum]
177
177
 
178
178
  allow_any_organization : typing.Optional[bool]
@@ -707,8 +707,8 @@ class AsyncRawClientGrantsClient:
707
707
  async def create(
708
708
  self,
709
709
  *,
710
- client_id: str,
711
710
  audience: str,
711
+ client_id: typing.Optional[str] = OMIT,
712
712
  organization_usage: typing.Optional[ClientGrantOrganizationUsageEnum] = OMIT,
713
713
  allow_any_organization: typing.Optional[bool] = OMIT,
714
714
  scope: typing.Optional[typing.Sequence[str]] = OMIT,
@@ -722,12 +722,12 @@ class AsyncRawClientGrantsClient:
722
722
 
723
723
  Parameters
724
724
  ----------
725
- client_id : str
726
- ID of the client.
727
-
728
725
  audience : str
729
726
  The audience (API identifier) of this client grant
730
727
 
728
+ client_id : typing.Optional[str]
729
+ ID of the client.
730
+
731
731
  organization_usage : typing.Optional[ClientGrantOrganizationUsageEnum]
732
732
 
733
733
  allow_any_organization : typing.Optional[bool]