Debian Codegraph @

src/auth0/management/clients/client.py

raw symbols SCIP
1 # This file was auto-generated by Fern from our API Definition.
2
3 from __future__ import annotations
4
5 import typing
6
7 from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8 from ..core.pagination import AsyncPager, SyncPager
9 from ..core.request_options import RequestOptions
10 from ..types.client import Client
11 from ..types.client_addons import ClientAddons
12 from ..types.client_app_type_enum import ClientAppTypeEnum
13 from ..types.client_async_approval_notifications_channels_api_patch_configuration import (
14 ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration,
15 )
16 from ..types.client_async_approval_notifications_channels_api_post_configuration import (
17 ClientAsyncApprovalNotificationsChannelsApiPostConfiguration,
18 )
19 from ..types.client_authentication_method import ClientAuthenticationMethod
20 from ..types.client_compliance_level_enum import ClientComplianceLevelEnum
21 from ..types.client_create_authentication_method import ClientCreateAuthenticationMethod
22 from ..types.client_default_organization import ClientDefaultOrganization
23 from ..types.client_encryption_key import ClientEncryptionKey
24 from ..types.client_jwt_configuration import ClientJwtConfiguration
25 from ..types.client_metadata import ClientMetadata
26 from ..types.client_mobile import ClientMobile
27 from ..types.client_my_organization_patch_configuration import ClientMyOrganizationPatchConfiguration
28 from ..types.client_my_organization_post_configuration import ClientMyOrganizationPostConfiguration
29 from ..types.client_oidc_backchannel_logout_settings import ClientOidcBackchannelLogoutSettings
30 from ..types.client_organization_discovery_enum import ClientOrganizationDiscoveryEnum
31 from ..types.client_organization_require_behavior_enum import ClientOrganizationRequireBehaviorEnum
32 from ..types.client_organization_require_behavior_patch_enum import ClientOrganizationRequireBehaviorPatchEnum
33 from ..types.client_organization_usage_enum import ClientOrganizationUsageEnum
34 from ..types.client_organization_usage_patch_enum import ClientOrganizationUsagePatchEnum
35 from ..types.client_redirection_policy_enum import ClientRedirectionPolicyEnum
36 from ..types.client_refresh_token_configuration import ClientRefreshTokenConfiguration
37 from ..types.client_session_transfer_configuration import ClientSessionTransferConfiguration
38 from ..types.client_signed_request_object_with_credential_id import ClientSignedRequestObjectWithCredentialId
39 from ..types.client_signed_request_object_with_public_key import ClientSignedRequestObjectWithPublicKey
40 from ..types.client_third_party_security_mode_enum import ClientThirdPartySecurityModeEnum
41 from ..types.client_token_endpoint_auth_method_enum import ClientTokenEndpointAuthMethodEnum
42 from ..types.client_token_endpoint_auth_method_or_null_enum import ClientTokenEndpointAuthMethodOrNullEnum
43 from ..types.client_token_exchange_configuration import ClientTokenExchangeConfiguration
44 from ..types.client_token_exchange_configuration_or_null import ClientTokenExchangeConfigurationOrNull
45 from ..types.client_token_vault_privileged_access_with_credential_id import (
46 ClientTokenVaultPrivilegedAccessWithCredentialId,
47 )
48 from ..types.client_token_vault_privileged_access_with_public_key import ClientTokenVaultPrivilegedAccessWithPublicKey
49 from ..types.create_client_response_content import CreateClientResponseContent
50 from ..types.create_identity_assertion_authorization_grant import CreateIdentityAssertionAuthorizationGrant
51 from ..types.create_token_quota import CreateTokenQuota
52 from ..types.express_configuration import ExpressConfiguration
53 from ..types.express_configuration_or_null import ExpressConfigurationOrNull
54 from ..types.fed_cm_login import FedCmLogin
55 from ..types.fed_cm_login_patch import FedCmLoginPatch
56 from ..types.get_client_response_content import GetClientResponseContent
57 from ..types.list_clients_offset_paginated_response_content import ListClientsOffsetPaginatedResponseContent
58 from ..types.native_social_login import NativeSocialLogin
59 from ..types.native_social_login_patch import NativeSocialLoginPatch
60 from ..types.preview_cimd_metadata_response_content import PreviewCimdMetadataResponseContent
61 from ..types.register_cimd_client_response_content import RegisterCimdClientResponseContent
62 from ..types.rotate_client_secret_response_content import RotateClientSecretResponseContent
63 from ..types.update_client_response_content import UpdateClientResponseContent
64 from ..types.update_identity_assertion_authorization_grant import UpdateIdentityAssertionAuthorizationGrant
65 from ..types.update_token_quota import UpdateTokenQuota
66 from .raw_client import AsyncRawClientsClient, RawClientsClient
67
68 if typing.TYPE_CHECKING:
69 from .connections.client import AsyncConnectionsClient, ConnectionsClient
70 from .credentials.client import AsyncCredentialsClient, CredentialsClient
71 # this is used as the default value for optional parameters
72 OMIT = typing.cast(typing.Any, ...)
73
74
75 class ClientsClient:
76 def __init__(self, *, client_wrapper: SyncClientWrapper):
77 self._raw_client = RawClientsClient(client_wrapper=client_wrapper)
78 self._client_wrapper = client_wrapper
79 self._credentials: typing.Optional[CredentialsClient] = None
80 self._connections: typing.Optional[ConnectionsClient] = None
81
82 @property
83 def with_raw_response(self) -> RawClientsClient:
84 """
85 Retrieves a raw implementation of this client that returns raw responses.
86
87 Returns
88 -------
89 RawClientsClient
90 """
91 return self._raw_client
92
93 def list(
94 self,
95 *,
96 fields: typing.Optional[str] = None,
97 include_fields: typing.Optional[bool] = None,
98 page: typing.Optional[int] = 0,
99 per_page: typing.Optional[int] = 50,
100 include_totals: typing.Optional[bool] = True,
101 is_global: typing.Optional[bool] = None,
102 is_first_party: typing.Optional[bool] = None,
103 app_type: typing.Optional[str] = None,
104 external_client_id: typing.Optional[str] = None,
105 q: typing.Optional[str] = None,
106 request_options: typing.Optional[RequestOptions] = None,
107 ) -> SyncPager[Client, ListClientsOffsetPaginatedResponseContent]:
108 """
109 Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified.
110 For more information, read [Applications in Auth0](https://www.auth0.com/docs/get-started/applications) and [Single Sign-On](https://www.auth0.com/docs/authenticate/single-sign-on).
111
112 - The following can be retrieved with any scope:
113 `client_id`, `app_type`, `name`, and `description`.
114 - The following properties can only be retrieved with the `read:clients` or
115 `read:client_keys` scope:
116 `callbacks`, `oidc_logout`, `allowed_origins`,
117 `web_origins`, `tenant`, `global`, `config_route`,
118 `callback_url_template`, `jwt_configuration`,
119 `jwt_configuration.lifetime_in_seconds`, `jwt_configuration.secret_encoded`,
120 `jwt_configuration.scopes`, `jwt_configuration.alg`, `api_type`,
121 `logo_uri`, `allowed_clients`, `owners`, `custom_login_page`,
122 `custom_login_page_off`, `sso`, `addons`, `form_template`,
123 `custom_login_page_codeview`, `resource_servers`, `client_metadata`,
124 `mobile`, `mobile.android`, `mobile.ios`, `allowed_logout_urls`,
125 `token_endpoint_auth_method`, `is_first_party`, `oidc_conformant`,
126 `is_token_endpoint_ip_header_trusted`, `initiate_login_uri`, `grant_types`,
127 `refresh_token`, `refresh_token.rotation_type`, `refresh_token.expiration_type`,
128 `refresh_token.leeway`, `refresh_token.token_lifetime`, `refresh_token.policies`, `organization_usage`,
129 `organization_require_behavior`.
130 - The following properties can only be retrieved with the
131 `read:client_keys` or `read:client_credentials` scope:
132 `encryption_key`, `encryption_key.pub`, `encryption_key.cert`,
133 `client_secret`, `client_authentication_methods` and `signing_key`.
134
135 Parameters
136 ----------
137 fields : typing.Optional[str]
138 Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.
139
140 include_fields : typing.Optional[bool]
141 Whether specified fields are to be included (true) or excluded (false).
142
143 page : typing.Optional[int]
144 Page index of the results to return. First page is 0.
145
146 per_page : typing.Optional[int]
147 Number of results per page. Default value is 50, maximum value is 100
148
149 include_totals : typing.Optional[bool]
150 Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).
151
152 is_global : typing.Optional[bool]
153 Optional filter on the global client parameter.
154
155 is_first_party : typing.Optional[bool]
156 Optional filter on whether or not a client is a first-party client.
157
158 app_type : typing.Optional[str]
159 Optional filter by a comma-separated list of application types.
160
161 external_client_id : typing.Optional[str]
162 Optional filter by the <a href="https://drafts.oauth.net/draft-ietf-oauth-client-id-metadata-document/draft-ietf-oauth-client-id-metadata-document.html">Client ID Metadata Document</a> URI for CIMD-registered clients.
163
164 q : typing.Optional[str]
165 Advanced Query in <a href="https://lucene.apache.org/core/2_9_4/queryparsersyntax.html">Lucene</a> syntax.<br /><b>Permitted Queries</b>:<br /><ul><li><i>client_grant.organization_id:{organization_id}</i></li><li><i>client_grant.allow_any_organization:true</i></li></ul><b>Additional Restrictions</b>:<br /><ul><li>Cannot be used in combination with other filters</li><li>Requires use of the <i>from</i> and <i>take</i> paging parameters (checkpoint paginatinon)</li><li>Reduced rate limits apply. See <a href="https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy/rate-limit-configurations/enterprise-public">Rate Limit Configurations</a></li></ul><i><b>Note</b>: Recent updates may not be immediately reflected in query results</i>
166
167 request_options : typing.Optional[RequestOptions]
168 Request-specific configuration.
169
170 Returns
171 -------
172 SyncPager[Client, ListClientsOffsetPaginatedResponseContent]
173 Clients successfully retrieved.
174
175 Examples
176 --------
177 from auth0 import Auth0
178
179 client = Auth0(
180 token="YOUR_TOKEN",
181 )
182 response = client.clients.list(
183 fields="fields",
184 include_fields=True,
185 page=1,
186 per_page=1,
187 include_totals=True,
188 is_global=True,
189 is_first_party=True,
190 app_type="app_type",
191 external_client_id="external_client_id",
192 q="q",
193 )
194 for item in response:
195 yield item
196 # alternatively, you can paginate page-by-page
197 for page in response.iter_pages():
198 yield page
199 """
200 return self._raw_client.list(
201 fields=fields,
202 include_fields=include_fields,
203 page=page,
204 per_page=per_page,
205 include_totals=include_totals,
206 is_global=is_global,
207 is_first_party=is_first_party,
208 app_type=app_type,
209 external_client_id=external_client_id,
210 q=q,
211 request_options=request_options,
212 )
213
214 def create(
215 self,
216 *,
217 name: str,
218 description: typing.Optional[str] = OMIT,
219 logo_uri: typing.Optional[str] = OMIT,
220 callbacks: typing.Optional[typing.Sequence[str]] = OMIT,
221 oidc_logout: typing.Optional[ClientOidcBackchannelLogoutSettings] = OMIT,
222 oidc_backchannel_logout: typing.Optional[ClientOidcBackchannelLogoutSettings] = OMIT,
223 session_transfer: typing.Optional[ClientSessionTransferConfiguration] = OMIT,
224 allowed_origins: typing.Optional[typing.Sequence[str]] = OMIT,
225 web_origins: typing.Optional[typing.Sequence[str]] = OMIT,
226 client_aliases: typing.Optional[typing.Sequence[str]] = OMIT,
227 allowed_clients: typing.Optional[typing.Sequence[str]] = OMIT,
228 allowed_logout_urls: typing.Optional[typing.Sequence[str]] = OMIT,
229 grant_types: typing.Optional[typing.Sequence[str]] = OMIT,
230 token_endpoint_auth_method: typing.Optional[ClientTokenEndpointAuthMethodEnum] = OMIT,
231 is_token_endpoint_ip_header_trusted: typing.Optional[bool] = OMIT,
232 app_type: typing.Optional[ClientAppTypeEnum] = OMIT,
233 is_first_party: typing.Optional[bool] = OMIT,
234 oidc_conformant: typing.Optional[bool] = OMIT,
235 jwt_configuration: typing.Optional[ClientJwtConfiguration] = OMIT,
236 encryption_key: typing.Optional[ClientEncryptionKey] = OMIT,
237 sso: typing.Optional[bool] = OMIT,
238 cross_origin_authentication: typing.Optional[bool] = OMIT,
239 cross_origin_loc: typing.Optional[str] = OMIT,
240 sso_disabled: typing.Optional[bool] = OMIT,
241 custom_login_page_on: typing.Optional[bool] = OMIT,
242 custom_login_page: typing.Optional[str] = OMIT,
243 custom_login_page_preview: typing.Optional[str] = OMIT,
244 form_template: typing.Optional[str] = OMIT,
245 addons: typing.Optional[ClientAddons] = OMIT,
246 client_metadata: typing.Optional[ClientMetadata] = OMIT,
247 mobile: typing.Optional[ClientMobile] = OMIT,
248 initiate_login_uri: typing.Optional[str] = OMIT,
249 native_social_login: typing.Optional[NativeSocialLogin] = OMIT,
250 fedcm_login: typing.Optional[FedCmLogin] = OMIT,
251 refresh_token: typing.Optional[ClientRefreshTokenConfiguration] = OMIT,
252 default_organization: typing.Optional[ClientDefaultOrganization] = OMIT,
253 organization_usage: typing.Optional[ClientOrganizationUsageEnum] = OMIT,
254 organization_require_behavior: typing.Optional[ClientOrganizationRequireBehaviorEnum] = OMIT,
255 organization_discovery_methods: typing.Optional[typing.Sequence[ClientOrganizationDiscoveryEnum]] = OMIT,
256 client_authentication_methods: typing.Optional[ClientCreateAuthenticationMethod] = OMIT,
257 require_pushed_authorization_requests: typing.Optional[bool] = OMIT,
258 require_proof_of_possession: typing.Optional[bool] = OMIT,
259 signed_request_object: typing.Optional[ClientSignedRequestObjectWithPublicKey] = OMIT,
260 token_vault_privileged_access: typing.Optional[ClientTokenVaultPrivilegedAccessWithPublicKey] = OMIT,
261 compliance_level: typing.Optional[ClientComplianceLevelEnum] = OMIT,
262 skip_non_verifiable_callback_uri_confirmation_prompt: typing.Optional[bool] = OMIT,
263 token_exchange: typing.Optional[ClientTokenExchangeConfiguration] = OMIT,
264 par_request_expiry: typing.Optional[int] = OMIT,
265 token_quota: typing.Optional[CreateTokenQuota] = OMIT,
266 resource_server_identifier: typing.Optional[str] = OMIT,
267 identity_assertion_authorization_grant: typing.Optional[CreateIdentityAssertionAuthorizationGrant] = OMIT,
268 third_party_security_mode: typing.Optional[ClientThirdPartySecurityModeEnum] = OMIT,
269 redirection_policy: typing.Optional[ClientRedirectionPolicyEnum] = OMIT,
270 express_configuration: typing.Optional[ExpressConfiguration] = OMIT,
271 my_organization_configuration: typing.Optional[ClientMyOrganizationPostConfiguration] = OMIT,
272 async_approval_notification_channels: typing.Optional[
273 ClientAsyncApprovalNotificationsChannelsApiPostConfiguration
274 ] = OMIT,
275 request_options: typing.Optional[RequestOptions] = None,
276 ) -> CreateClientResponseContent:
277 """
278 Create a new client (application or SSO integration). For more information, read [Create Applications](https://www.auth0.com/docs/get-started/auth0-overview/create-applications)
279 [API Endpoints for Single Sign-On](https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on).
280
281 Notes:
282 - We recommend leaving the `client_secret` parameter unspecified to allow the generation of a safe secret.
283 - The `client_authentication_methods` and `token_endpoint_auth_method` properties are mutually exclusive. Use
284 `client_authentication_methods` to configure the client with Private Key JWT authentication method. Otherwise, use `token_endpoint_auth_method`
285 to configure the client with client secret (basic or post) or with no authentication method (none).
286 - When using `client_authentication_methods` to configure the client with Private Key JWT authentication method, specify fully defined credentials.
287 These credentials will be automatically enabled for Private Key JWT authentication on the client.
288 - To configure `client_authentication_methods`, the `create:client_credentials` scope is required.
289 - To configure `client_authentication_methods`, the property `jwt_configuration.alg` must be set to RS256.
290
291 SSO Integrations created via this endpoint will accept login requests and share user profile information.
292
293 Parameters
294 ----------
295 name : str
296 Name of this client (min length: 1 character, does not allow `<` or `>`).
297
298 description : typing.Optional[str]
299 Free text description of this client (max length: 140 characters).
300
301 logo_uri : typing.Optional[str]
302 URL of the logo to display for this client. Recommended size is 150x150 pixels.
303
304 callbacks : typing.Optional[typing.Sequence[str]]
305 Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication.
306
307 oidc_logout : typing.Optional[ClientOidcBackchannelLogoutSettings]
308
309 oidc_backchannel_logout : typing.Optional[ClientOidcBackchannelLogoutSettings]
310 Configuration for OIDC backchannel logout (deprecated, in favor of oidc_logout)
311
312 session_transfer : typing.Optional[ClientSessionTransferConfiguration]
313
314 allowed_origins : typing.Optional[typing.Sequence[str]]
315 Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs.
316
317 web_origins : typing.Optional[typing.Sequence[str]]
318 Comma-separated list of allowed origins for use with <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>.
319
320 client_aliases : typing.Optional[typing.Sequence[str]]
321 List of audiences/realms for SAML protocol. Used by the wsfed addon.
322
323 allowed_clients : typing.Optional[typing.Sequence[str]]
324 List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed.
325
326 allowed_logout_urls : typing.Optional[typing.Sequence[str]]
327 Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.
328
329 grant_types : typing.Optional[typing.Sequence[str]]
330 List of grant types supported for this application. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`.
331
332 token_endpoint_auth_method : typing.Optional[ClientTokenEndpointAuthMethodEnum]
333
334 is_token_endpoint_ip_header_trusted : typing.Optional[bool]
335 If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint.
336
337 app_type : typing.Optional[ClientAppTypeEnum]
338
339 is_first_party : typing.Optional[bool]
340 Whether this client a first party client or not
341
342 oidc_conformant : typing.Optional[bool]
343 Whether this client conforms to <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (true) or uses legacy features (false).
344
345 jwt_configuration : typing.Optional[ClientJwtConfiguration]
346
347 encryption_key : typing.Optional[ClientEncryptionKey]
348
349 sso : typing.Optional[bool]
350 Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false).
351
352 cross_origin_authentication : typing.Optional[bool]
353 Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false).
354
355 cross_origin_loc : typing.Optional[str]
356 URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page.
357
358 sso_disabled : typing.Optional[bool]
359 <code>true</code> to disable Single Sign On, <code>false</code> otherwise (default: <code>false</code>)
360
361 custom_login_page_on : typing.Optional[bool]
362 <code>true</code> if the custom login page is to be used, <code>false</code> otherwise. Defaults to <code>true</code>
363
364 custom_login_page : typing.Optional[str]
365 The content (HTML, CSS, JS) of the custom login page.
366
367 custom_login_page_preview : typing.Optional[str]
368 The content (HTML, CSS, JS) of the custom login page. (Used on Previews)
369
370 form_template : typing.Optional[str]
371 HTML form template to be used for WS-Federation.
372
373 addons : typing.Optional[ClientAddons]
374
375 client_metadata : typing.Optional[ClientMetadata]
376
377 mobile : typing.Optional[ClientMobile]
378
379 initiate_login_uri : typing.Optional[str]
380 Initiate login uri, must be https
381
382 native_social_login : typing.Optional[NativeSocialLogin]
383
384 fedcm_login : typing.Optional[FedCmLogin]
385
386 refresh_token : typing.Optional[ClientRefreshTokenConfiguration]
387
388 default_organization : typing.Optional[ClientDefaultOrganization]
389
390 organization_usage : typing.Optional[ClientOrganizationUsageEnum]
391
392 organization_require_behavior : typing.Optional[ClientOrganizationRequireBehaviorEnum]
393
394 organization_discovery_methods : typing.Optional[typing.Sequence[ClientOrganizationDiscoveryEnum]]
395 Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both.
396
397 client_authentication_methods : typing.Optional[ClientCreateAuthenticationMethod]
398
399 require_pushed_authorization_requests : typing.Optional[bool]
400 Makes the use of Pushed Authorization Requests mandatory for this client
401
402 require_proof_of_possession : typing.Optional[bool]
403 Makes the use of Proof-of-Possession mandatory for this client
404
405 signed_request_object : typing.Optional[ClientSignedRequestObjectWithPublicKey]
406
407 token_vault_privileged_access : typing.Optional[ClientTokenVaultPrivilegedAccessWithPublicKey]
408
409 compliance_level : typing.Optional[ClientComplianceLevelEnum]
410
411 skip_non_verifiable_callback_uri_confirmation_prompt : typing.Optional[bool]
412 Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`).
413 If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps.
414 See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information.
415
416 token_exchange : typing.Optional[ClientTokenExchangeConfiguration]
417
418 par_request_expiry : typing.Optional[int]
419 Specifies how long, in seconds, a Pushed Authorization Request URI remains valid
420
421 token_quota : typing.Optional[CreateTokenQuota]
422
423 resource_server_identifier : typing.Optional[str]
424 The identifier of the resource server that this client is linked to.
425
426 identity_assertion_authorization_grant : typing.Optional[CreateIdentityAssertionAuthorizationGrant]
427
428 third_party_security_mode : typing.Optional[ClientThirdPartySecurityModeEnum]
429
430 redirection_policy : typing.Optional[ClientRedirectionPolicyEnum]
431
432 express_configuration : typing.Optional[ExpressConfiguration]
433
434 my_organization_configuration : typing.Optional[ClientMyOrganizationPostConfiguration]
435
436 async_approval_notification_channels : typing.Optional[ClientAsyncApprovalNotificationsChannelsApiPostConfiguration]
437
438 request_options : typing.Optional[RequestOptions]
439 Request-specific configuration.
440
441 Returns
442 -------
443 CreateClientResponseContent
444 Client successfully created.
445
446 Examples
447 --------
448 from auth0 import Auth0
449
450 client = Auth0(
451 token="YOUR_TOKEN",
452 )
453 client.clients.create(
454 name="name",
455 )
456 """
457 _response = self._raw_client.create(
458 name=name,
459 description=description,
460 logo_uri=logo_uri,
461 callbacks=callbacks,
462 oidc_logout=oidc_logout,
463 oidc_backchannel_logout=oidc_backchannel_logout,
464 session_transfer=session_transfer,
465 allowed_origins=allowed_origins,
466 web_origins=web_origins,
467 client_aliases=client_aliases,
468 allowed_clients=allowed_clients,
469 allowed_logout_urls=allowed_logout_urls,
470 grant_types=grant_types,
471 token_endpoint_auth_method=token_endpoint_auth_method,
472 is_token_endpoint_ip_header_trusted=is_token_endpoint_ip_header_trusted,
473 app_type=app_type,
474 is_first_party=is_first_party,
475 oidc_conformant=oidc_conformant,
476 jwt_configuration=jwt_configuration,
477 encryption_key=encryption_key,
478 sso=sso,
479 cross_origin_authentication=cross_origin_authentication,
480 cross_origin_loc=cross_origin_loc,
481 sso_disabled=sso_disabled,
482 custom_login_page_on=custom_login_page_on,
483 custom_login_page=custom_login_page,
484 custom_login_page_preview=custom_login_page_preview,
485 form_template=form_template,
486 addons=addons,
487 client_metadata=client_metadata,
488 mobile=mobile,
489 initiate_login_uri=initiate_login_uri,
490 native_social_login=native_social_login,
491 fedcm_login=fedcm_login,
492 refresh_token=refresh_token,
493 default_organization=default_organization,
494 organization_usage=organization_usage,
495 organization_require_behavior=organization_require_behavior,
496 organization_discovery_methods=organization_discovery_methods,
497 client_authentication_methods=client_authentication_methods,
498 require_pushed_authorization_requests=require_pushed_authorization_requests,
499 require_proof_of_possession=require_proof_of_possession,
500 signed_request_object=signed_request_object,
501 token_vault_privileged_access=token_vault_privileged_access,
502 compliance_level=compliance_level,
503 skip_non_verifiable_callback_uri_confirmation_prompt=skip_non_verifiable_callback_uri_confirmation_prompt,
504 token_exchange=token_exchange,
505 par_request_expiry=par_request_expiry,
506 token_quota=token_quota,
507 resource_server_identifier=resource_server_identifier,
508 identity_assertion_authorization_grant=identity_assertion_authorization_grant,
509 third_party_security_mode=third_party_security_mode,
510 redirection_policy=redirection_policy,
511 express_configuration=express_configuration,
512 my_organization_configuration=my_organization_configuration,
513 async_approval_notification_channels=async_approval_notification_channels,
514 request_options=request_options,
515 )
516 return _response.data
517
518 def preview_cimd_metadata(
519 self, *, external_client_id: str, request_options: typing.Optional[RequestOptions] = None
520 ) -> PreviewCimdMetadataResponseContent:
521 """
522
523 Fetches and validates a Client ID Metadata Document without creating a client.
524 Returns the raw metadata and how it would be mapped to Auth0 client fields.
525 This endpoint is useful for testing metadata URIs before creating CIMD clients.
526
527
528 Parameters
529 ----------
530 external_client_id : str
531 URL to the Client ID Metadata Document
532
533 request_options : typing.Optional[RequestOptions]
534 Request-specific configuration.
535
536 Returns
537 -------
538 PreviewCimdMetadataResponseContent
539 Metadata successfully fetched and validated, or retrieval error returned with errors array.
540
541 Examples
542 --------
543 from auth0 import Auth0
544
545 client = Auth0(
546 token="YOUR_TOKEN",
547 )
548 client.clients.preview_cimd_metadata(
549 external_client_id="external_client_id",
550 )
551 """
552 _response = self._raw_client.preview_cimd_metadata(
553 external_client_id=external_client_id, request_options=request_options
554 )
555 return _response.data
556
557 def register_cimd_client(
558 self, *, external_client_id: str, request_options: typing.Optional[RequestOptions] = None
559 ) -> RegisterCimdClientResponseContent:
560 """
561 Idempotent registration for Client ID Metadata Document (CIMD) clients.
562 Uses external_client_id as the unique identifier for upsert operations.
563
564 **Create:** Returns 201 when a new client is created (requires `create:clients` scope).
565 **Update:** Returns 200 when an existing client is updated (requires `update:clients` scope).
566
567 This endpoint automatically:
568 - Fetches and validates the metadata document
569 - Maps CIMD fields to Auth0 client configuration
570 - Creates/rotates credentials from the JWKS
571 - Enforces CIMD security policies (HTTPS-only, no shared secrets)
572
573 Parameters
574 ----------
575 external_client_id : str
576 URL to the Client ID Metadata Document. Acts as the unique identifier for upsert operations.
577
578 request_options : typing.Optional[RequestOptions]
579 Request-specific configuration.
580
581 Returns
582 -------
583 RegisterCimdClientResponseContent
584 CIMD client successfully updated (idempotent).
585
586 Examples
587 --------
588 from auth0 import Auth0
589
590 client = Auth0(
591 token="YOUR_TOKEN",
592 )
593 client.clients.register_cimd_client(
594 external_client_id="external_client_id",
595 )
596 """
597 _response = self._raw_client.register_cimd_client(
598 external_client_id=external_client_id, request_options=request_options
599 )
600 return _response.data
601
602 def get(
603 self,
604 id: str,
605 *,
606 fields: typing.Optional[str] = None,
607 include_fields: typing.Optional[bool] = None,
608 request_options: typing.Optional[RequestOptions] = None,
609 ) -> GetClientResponseContent:
610 """
611 Retrieve client details by ID. Clients are SSO connections or Applications linked with your Auth0 tenant. A list of fields to include or exclude may also be specified.
612 For more information, read [Applications in Auth0](https://www.auth0.com/docs/get-started/applications) and [Single Sign-On](https://www.auth0.com/docs/authenticate/single-sign-on).
613
614 - The following properties can be retrieved with any of the scopes:
615 `client_id`, `app_type`, `name`, and `description`.
616 - The following properties can only be retrieved with the `read:clients` or
617 `read:client_keys` scopes:
618 `callbacks`, `oidc_logout`, `allowed_origins`,
619 `web_origins`, `tenant`, `global`, `config_route`,
620 `callback_url_template`, `jwt_configuration`,
621 `jwt_configuration.lifetime_in_seconds`, `jwt_configuration.secret_encoded`,
622 `jwt_configuration.scopes`, `jwt_configuration.alg`, `api_type`,
623 `logo_uri`, `allowed_clients`, `owners`, `custom_login_page`,
624 `custom_login_page_off`, `sso`, `addons`, `form_template`,
625 `custom_login_page_codeview`, `resource_servers`, `client_metadata`,
626 `mobile`, `mobile.android`, `mobile.ios`, `allowed_logout_urls`,
627 `token_endpoint_auth_method`, `is_first_party`, `oidc_conformant`,
628 `is_token_endpoint_ip_header_trusted`, `initiate_login_uri`, `grant_types`,
629 `refresh_token`, `refresh_token.rotation_type`, `refresh_token.expiration_type`,
630 `refresh_token.leeway`, `refresh_token.token_lifetime`, `refresh_token.policies`, `organization_usage`,
631 `organization_require_behavior`.
632 - The following properties can only be retrieved with the `read:client_keys` or `read:client_credentials` scopes:
633 `encryption_key`, `encryption_key.pub`, `encryption_key.cert`,
634 `client_secret`, `client_authentication_methods` and `signing_key`.
635
636 Parameters
637 ----------
638 id : str
639 ID of the client to retrieve.
640
641 fields : typing.Optional[str]
642 Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.
643
644 include_fields : typing.Optional[bool]
645 Whether specified fields are to be included (true) or excluded (false).
646
647 request_options : typing.Optional[RequestOptions]
648 Request-specific configuration.
649
650 Returns
651 -------
652 GetClientResponseContent
653 Client successfully retrieved.
654
655 Examples
656 --------
657 from auth0 import Auth0
658
659 client = Auth0(
660 token="YOUR_TOKEN",
661 )
662 client.clients.get(
663 id="id",
664 fields="fields",
665 include_fields=True,
666 )
667 """
668 _response = self._raw_client.get(
669 id, fields=fields, include_fields=include_fields, request_options=request_options
670 )
671 return _response.data
672
673 def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
674 """
675 Delete a client and related configuration (rules, connections, etc).
676
677 Parameters
678 ----------
679 id : str
680 ID of the client to delete.
681
682 request_options : typing.Optional[RequestOptions]
683 Request-specific configuration.
684
685 Returns
686 -------
687 None
688
689 Examples
690 --------
691 from auth0 import Auth0
692
693 client = Auth0(
694 token="YOUR_TOKEN",
695 )
696 client.clients.delete(
697 id="id",
698 )
699 """
700 _response = self._raw_client.delete(id, request_options=request_options)
701 return _response.data
702
703 def update(
704 self,
705 id: str,
706 *,
707 name: typing.Optional[str] = OMIT,
708 description: typing.Optional[str] = OMIT,
709 client_secret: typing.Optional[str] = OMIT,
710 logo_uri: typing.Optional[str] = OMIT,
711 callbacks: typing.Optional[typing.Sequence[str]] = OMIT,
712 oidc_logout: typing.Optional[ClientOidcBackchannelLogoutSettings] = OMIT,
713 oidc_backchannel_logout: typing.Optional[ClientOidcBackchannelLogoutSettings] = OMIT,
714 session_transfer: typing.Optional[ClientSessionTransferConfiguration] = OMIT,
715 allowed_origins: typing.Optional[typing.Sequence[str]] = OMIT,
716 web_origins: typing.Optional[typing.Sequence[str]] = OMIT,
717 grant_types: typing.Optional[typing.Sequence[str]] = OMIT,
718 client_aliases: typing.Optional[typing.Sequence[str]] = OMIT,
719 allowed_clients: typing.Optional[typing.Sequence[str]] = OMIT,
720 allowed_logout_urls: typing.Optional[typing.Sequence[str]] = OMIT,
721 jwt_configuration: typing.Optional[ClientJwtConfiguration] = OMIT,
722 encryption_key: typing.Optional[ClientEncryptionKey] = OMIT,
723 sso: typing.Optional[bool] = OMIT,
724 cross_origin_authentication: typing.Optional[bool] = OMIT,
725 cross_origin_loc: typing.Optional[str] = OMIT,
726 sso_disabled: typing.Optional[bool] = OMIT,
727 custom_login_page_on: typing.Optional[bool] = OMIT,
728 token_endpoint_auth_method: typing.Optional[ClientTokenEndpointAuthMethodOrNullEnum] = OMIT,
729 is_token_endpoint_ip_header_trusted: typing.Optional[bool] = OMIT,
730 app_type: typing.Optional[ClientAppTypeEnum] = OMIT,
731 is_first_party: typing.Optional[bool] = OMIT,
732 oidc_conformant: typing.Optional[bool] = OMIT,
733 custom_login_page: typing.Optional[str] = OMIT,
734 custom_login_page_preview: typing.Optional[str] = OMIT,
735 token_quota: typing.Optional[UpdateTokenQuota] = OMIT,
736 identity_assertion_authorization_grant: typing.Optional[UpdateIdentityAssertionAuthorizationGrant] = OMIT,
737 form_template: typing.Optional[str] = OMIT,
738 addons: typing.Optional[ClientAddons] = OMIT,
739 client_metadata: typing.Optional[ClientMetadata] = OMIT,
740 mobile: typing.Optional[ClientMobile] = OMIT,
741 initiate_login_uri: typing.Optional[str] = OMIT,
742 native_social_login: typing.Optional[NativeSocialLoginPatch] = OMIT,
743 fedcm_login: typing.Optional[FedCmLoginPatch] = OMIT,
744 refresh_token: typing.Optional[ClientRefreshTokenConfiguration] = OMIT,
745 default_organization: typing.Optional[ClientDefaultOrganization] = OMIT,
746 organization_usage: typing.Optional[ClientOrganizationUsagePatchEnum] = OMIT,
747 organization_require_behavior: typing.Optional[ClientOrganizationRequireBehaviorPatchEnum] = OMIT,
748 organization_discovery_methods: typing.Optional[typing.Sequence[ClientOrganizationDiscoveryEnum]] = OMIT,
749 client_authentication_methods: typing.Optional[ClientAuthenticationMethod] = OMIT,
750 require_pushed_authorization_requests: typing.Optional[bool] = OMIT,
751 require_proof_of_possession: typing.Optional[bool] = OMIT,
752 signed_request_object: typing.Optional[ClientSignedRequestObjectWithCredentialId] = OMIT,
753 token_vault_privileged_access: typing.Optional[ClientTokenVaultPrivilegedAccessWithCredentialId] = OMIT,
754 compliance_level: typing.Optional[ClientComplianceLevelEnum] = OMIT,
755 skip_non_verifiable_callback_uri_confirmation_prompt: typing.Optional[bool] = OMIT,
756 token_exchange: typing.Optional[ClientTokenExchangeConfigurationOrNull] = OMIT,
757 par_request_expiry: typing.Optional[int] = OMIT,
758 express_configuration: typing.Optional[ExpressConfigurationOrNull] = OMIT,
759 my_organization_configuration: typing.Optional[ClientMyOrganizationPatchConfiguration] = OMIT,
760 async_approval_notification_channels: typing.Optional[
761 ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration
762 ] = OMIT,
763 third_party_security_mode: typing.Optional[ClientThirdPartySecurityModeEnum] = OMIT,
764 redirection_policy: typing.Optional[ClientRedirectionPolicyEnum] = OMIT,
765 request_options: typing.Optional[RequestOptions] = None,
766 ) -> UpdateClientResponseContent:
767 """
768 Updates a client's settings. For more information, read [Applications in Auth0](https://www.auth0.com/docs/get-started/applications) and [Single Sign-On](https://www.auth0.com/docs/authenticate/single-sign-on).
769
770 Notes:
771 - The `client_secret` and `signing_key` attributes can only be updated with the `update:client_keys` scope.
772 - The `client_authentication_methods` and `token_endpoint_auth_method` properties are mutually exclusive. Use `client_authentication_methods` to configure the client with Private Key JWT authentication method. Otherwise, use `token_endpoint_auth_method` to configure the client with client secret (basic or post) or with no authentication method (none).
773 - When using `client_authentication_methods` to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
774 - To configure `client_authentication_methods`, the `update:client_credentials` scope is required.
775 - To configure `client_authentication_methods`, the property `jwt_configuration.alg` must be set to RS256.
776 - To change a client's `is_first_party` property to `false`, the `organization_usage` and `organization_require_behavior` properties must be unset.
777
778 Parameters
779 ----------
780 id : str
781 ID of the client to update.
782
783 name : typing.Optional[str]
784 The name of the client. Must contain at least one character. Does not allow '<' or '>'.
785
786 description : typing.Optional[str]
787 Free text description of the purpose of the Client. (Max character length: <code>140</code>)
788
789 client_secret : typing.Optional[str]
790 The secret used to sign tokens for the client
791
792 logo_uri : typing.Optional[str]
793 The URL of the client logo (recommended size: 150x150)
794
795 callbacks : typing.Optional[typing.Sequence[str]]
796 A set of URLs that are valid to call back from Auth0 when authenticating users
797
798 oidc_logout : typing.Optional[ClientOidcBackchannelLogoutSettings]
799
800 oidc_backchannel_logout : typing.Optional[ClientOidcBackchannelLogoutSettings]
801 Configuration for OIDC backchannel logout (deprecated, in favor of oidc_logout)
802
803 session_transfer : typing.Optional[ClientSessionTransferConfiguration]
804
805 allowed_origins : typing.Optional[typing.Sequence[str]]
806 A set of URLs that represents valid origins for CORS
807
808 web_origins : typing.Optional[typing.Sequence[str]]
809 A set of URLs that represents valid web origins for use with web message response mode
810
811 grant_types : typing.Optional[typing.Sequence[str]]
812 A set of grant types that the client is authorized to use. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`.
813
814 client_aliases : typing.Optional[typing.Sequence[str]]
815 List of audiences for SAML protocol
816
817 allowed_clients : typing.Optional[typing.Sequence[str]]
818 Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients
819
820 allowed_logout_urls : typing.Optional[typing.Sequence[str]]
821 URLs that are valid to redirect to after logout from Auth0
822
823 jwt_configuration : typing.Optional[ClientJwtConfiguration]
824 An object that holds settings related to how JWTs are created
825
826 encryption_key : typing.Optional[ClientEncryptionKey]
827 The client's encryption key
828
829 sso : typing.Optional[bool]
830 <code>true</code> to use Auth0 instead of the IdP to do Single Sign On, <code>false</code> otherwise (default: <code>false</code>)
831
832 cross_origin_authentication : typing.Optional[bool]
833 <code>true</code> if this client can be used to make cross-origin authentication requests, <code>false</code> otherwise if cross origin is disabled
834
835 cross_origin_loc : typing.Optional[str]
836 URL for the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page.
837
838 sso_disabled : typing.Optional[bool]
839 <code>true</code> to disable Single Sign On, <code>false</code> otherwise (default: <code>false</code>)
840
841 custom_login_page_on : typing.Optional[bool]
842 <code>true</code> if the custom login page is to be used, <code>false</code> otherwise.
843
844 token_endpoint_auth_method : typing.Optional[ClientTokenEndpointAuthMethodOrNullEnum]
845
846 is_token_endpoint_ip_header_trusted : typing.Optional[bool]
847 If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint.
848
849 app_type : typing.Optional[ClientAppTypeEnum]
850
851 is_first_party : typing.Optional[bool]
852 Whether this client a first party client or not
853
854 oidc_conformant : typing.Optional[bool]
855 Whether this client will conform to strict OIDC specifications
856
857 custom_login_page : typing.Optional[str]
858 The content (HTML, CSS, JS) of the custom login page
859
860 custom_login_page_preview : typing.Optional[str]
861
862 token_quota : typing.Optional[UpdateTokenQuota]
863
864 identity_assertion_authorization_grant : typing.Optional[UpdateIdentityAssertionAuthorizationGrant]
865
866 form_template : typing.Optional[str]
867 Form template for WS-Federation protocol
868
869 addons : typing.Optional[ClientAddons]
870
871 client_metadata : typing.Optional[ClientMetadata]
872
873 mobile : typing.Optional[ClientMobile]
874 Configuration related to native mobile apps
875
876 initiate_login_uri : typing.Optional[str]
877 Initiate login uri, must be https
878
879 native_social_login : typing.Optional[NativeSocialLoginPatch]
880
881 fedcm_login : typing.Optional[FedCmLoginPatch]
882
883 refresh_token : typing.Optional[ClientRefreshTokenConfiguration]
884
885 default_organization : typing.Optional[ClientDefaultOrganization]
886
887 organization_usage : typing.Optional[ClientOrganizationUsagePatchEnum]
888
889 organization_require_behavior : typing.Optional[ClientOrganizationRequireBehaviorPatchEnum]
890
891 organization_discovery_methods : typing.Optional[typing.Sequence[ClientOrganizationDiscoveryEnum]]
892 Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both.
893
894 client_authentication_methods : typing.Optional[ClientAuthenticationMethod]
895
896 require_pushed_authorization_requests : typing.Optional[bool]
897 Makes the use of Pushed Authorization Requests mandatory for this client
898
899 require_proof_of_possession : typing.Optional[bool]
900 Makes the use of Proof-of-Possession mandatory for this client
901
902 signed_request_object : typing.Optional[ClientSignedRequestObjectWithCredentialId]
903
904 token_vault_privileged_access : typing.Optional[ClientTokenVaultPrivilegedAccessWithCredentialId]
905
906 compliance_level : typing.Optional[ClientComplianceLevelEnum]
907
908 skip_non_verifiable_callback_uri_confirmation_prompt : typing.Optional[bool]
909 Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`).
910 If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps.
911 See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information.
912
913 token_exchange : typing.Optional[ClientTokenExchangeConfigurationOrNull]
914
915 par_request_expiry : typing.Optional[int]
916 Specifies how long, in seconds, a Pushed Authorization Request URI remains valid
917
918 express_configuration : typing.Optional[ExpressConfigurationOrNull]
919
920 my_organization_configuration : typing.Optional[ClientMyOrganizationPatchConfiguration]
921
922 async_approval_notification_channels : typing.Optional[ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration]
923
924 third_party_security_mode : typing.Optional[ClientThirdPartySecurityModeEnum]
925
926 redirection_policy : typing.Optional[ClientRedirectionPolicyEnum]
927
928 request_options : typing.Optional[RequestOptions]
929 Request-specific configuration.
930
931 Returns
932 -------
933 UpdateClientResponseContent
934 Client successfully updated.
935
936 Examples
937 --------
938 from auth0 import Auth0
939
940 client = Auth0(
941 token="YOUR_TOKEN",
942 )
943 client.clients.update(
944 id="id",
945 )
946 """
947 _response = self._raw_client.update(
948 id,
949 name=name,
950 description=description,
951 client_secret=client_secret,
952 logo_uri=logo_uri,
953 callbacks=callbacks,
954 oidc_logout=oidc_logout,
955 oidc_backchannel_logout=oidc_backchannel_logout,
956 session_transfer=session_transfer,
957 allowed_origins=allowed_origins,
958 web_origins=web_origins,
959 grant_types=grant_types,
960 client_aliases=client_aliases,
961 allowed_clients=allowed_clients,
962 allowed_logout_urls=allowed_logout_urls,
963 jwt_configuration=jwt_configuration,
964 encryption_key=encryption_key,
965 sso=sso,
966 cross_origin_authentication=cross_origin_authentication,
967 cross_origin_loc=cross_origin_loc,
968 sso_disabled=sso_disabled,
969 custom_login_page_on=custom_login_page_on,
970 token_endpoint_auth_method=token_endpoint_auth_method,
971 is_token_endpoint_ip_header_trusted=is_token_endpoint_ip_header_trusted,
972 app_type=app_type,
973 is_first_party=is_first_party,
974 oidc_conformant=oidc_conformant,
975 custom_login_page=custom_login_page,
976 custom_login_page_preview=custom_login_page_preview,
977 token_quota=token_quota,
978 identity_assertion_authorization_grant=identity_assertion_authorization_grant,
979 form_template=form_template,
980 addons=addons,
981 client_metadata=client_metadata,
982 mobile=mobile,
983 initiate_login_uri=initiate_login_uri,
984 native_social_login=native_social_login,
985 fedcm_login=fedcm_login,
986 refresh_token=refresh_token,
987 default_organization=default_organization,
988 organization_usage=organization_usage,
989 organization_require_behavior=organization_require_behavior,
990 organization_discovery_methods=organization_discovery_methods,
991 client_authentication_methods=client_authentication_methods,
992 require_pushed_authorization_requests=require_pushed_authorization_requests,
993 require_proof_of_possession=require_proof_of_possession,
994 signed_request_object=signed_request_object,
995 token_vault_privileged_access=token_vault_privileged_access,
996 compliance_level=compliance_level,
997 skip_non_verifiable_callback_uri_confirmation_prompt=skip_non_verifiable_callback_uri_confirmation_prompt,
998 token_exchange=token_exchange,
999 par_request_expiry=par_request_expiry,
1000 express_configuration=express_configuration,
1001 my_organization_configuration=my_organization_configuration,
1002 async_approval_notification_channels=async_approval_notification_channels,
1003 third_party_security_mode=third_party_security_mode,
1004 redirection_policy=redirection_policy,
1005 request_options=request_options,
1006 )
1007 return _response.data
1008
1009 def rotate_secret(
1010 self, id: str, *, request_options: typing.Optional[RequestOptions] = None
1011 ) -> RotateClientSecretResponseContent:
1012 """
1013 Rotate a client secret.
1014
1015 This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.
1016
1017 For more information, read [Rotate Client Secrets](https://www.auth0.com/docs/get-started/applications/rotate-client-secret).
1018
1019 Parameters
1020 ----------
1021 id : str
1022 ID of the client that will rotate secrets.
1023
1024 request_options : typing.Optional[RequestOptions]
1025 Request-specific configuration.
1026
1027 Returns
1028 -------
1029 RotateClientSecretResponseContent
1030 Secret successfully rotated.
1031
1032 Examples
1033 --------
1034 from auth0 import Auth0
1035
1036 client = Auth0(
1037 token="YOUR_TOKEN",
1038 )
1039 client.clients.rotate_secret(
1040 id="id",
1041 )
1042 """
1043 _response = self._raw_client.rotate_secret(id, request_options=request_options)
1044 return _response.data
1045
1046 @property
1047 def credentials(self):
1048 if self._credentials is None:
1049 from .credentials.client import CredentialsClient # noqa: E402
1050
1051 self._credentials = CredentialsClient(client_wrapper=self._client_wrapper)
1052 return self._credentials
1053
1054 @property
1055 def connections(self):
1056 if self._connections is None:
1057 from .connections.client import ConnectionsClient # noqa: E402
1058
1059 self._connections = ConnectionsClient(client_wrapper=self._client_wrapper)
1060 return self._connections
1061
1062
1063 class AsyncClientsClient:
1064 def __init__(self, *, client_wrapper: AsyncClientWrapper):
1065 self._raw_client = AsyncRawClientsClient(client_wrapper=client_wrapper)
1066 self._client_wrapper = client_wrapper
1067 self._credentials: typing.Optional[AsyncCredentialsClient] = None
1068 self._connections: typing.Optional[AsyncConnectionsClient] = None
1069
1070 @property
1071 def with_raw_response(self) -> AsyncRawClientsClient:
1072 """
1073 Retrieves a raw implementation of this client that returns raw responses.
1074
1075 Returns
1076 -------
1077 AsyncRawClientsClient
1078 """
1079 return self._raw_client
1080
1081 async def list(
1082 self,
1083 *,
1084 fields: typing.Optional[str] = None,
1085 include_fields: typing.Optional[bool] = None,
1086 page: typing.Optional[int] = 0,
1087 per_page: typing.Optional[int] = 50,
1088 include_totals: typing.Optional[bool] = True,
1089 is_global: typing.Optional[bool] = None,
1090 is_first_party: typing.Optional[bool] = None,
1091 app_type: typing.Optional[str] = None,
1092 external_client_id: typing.Optional[str] = None,
1093 q: typing.Optional[str] = None,
1094 request_options: typing.Optional[RequestOptions] = None,
1095 ) -> AsyncPager[Client, ListClientsOffsetPaginatedResponseContent]:
1096 """
1097 Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified.
1098 For more information, read [Applications in Auth0](https://www.auth0.com/docs/get-started/applications) and [Single Sign-On](https://www.auth0.com/docs/authenticate/single-sign-on).
1099
1100 - The following can be retrieved with any scope:
1101 `client_id`, `app_type`, `name`, and `description`.
1102 - The following properties can only be retrieved with the `read:clients` or
1103 `read:client_keys` scope:
1104 `callbacks`, `oidc_logout`, `allowed_origins`,
1105 `web_origins`, `tenant`, `global`, `config_route`,
1106 `callback_url_template`, `jwt_configuration`,
1107 `jwt_configuration.lifetime_in_seconds`, `jwt_configuration.secret_encoded`,
1108 `jwt_configuration.scopes`, `jwt_configuration.alg`, `api_type`,
1109 `logo_uri`, `allowed_clients`, `owners`, `custom_login_page`,
1110 `custom_login_page_off`, `sso`, `addons`, `form_template`,
1111 `custom_login_page_codeview`, `resource_servers`, `client_metadata`,
1112 `mobile`, `mobile.android`, `mobile.ios`, `allowed_logout_urls`,
1113 `token_endpoint_auth_method`, `is_first_party`, `oidc_conformant`,
1114 `is_token_endpoint_ip_header_trusted`, `initiate_login_uri`, `grant_types`,
1115 `refresh_token`, `refresh_token.rotation_type`, `refresh_token.expiration_type`,
1116 `refresh_token.leeway`, `refresh_token.token_lifetime`, `refresh_token.policies`, `organization_usage`,
1117 `organization_require_behavior`.
1118 - The following properties can only be retrieved with the
1119 `read:client_keys` or `read:client_credentials` scope:
1120 `encryption_key`, `encryption_key.pub`, `encryption_key.cert`,
1121 `client_secret`, `client_authentication_methods` and `signing_key`.
1122
1123 Parameters
1124 ----------
1125 fields : typing.Optional[str]
1126 Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.
1127
1128 include_fields : typing.Optional[bool]
1129 Whether specified fields are to be included (true) or excluded (false).
1130
1131 page : typing.Optional[int]
1132 Page index of the results to return. First page is 0.
1133
1134 per_page : typing.Optional[int]
1135 Number of results per page. Default value is 50, maximum value is 100
1136
1137 include_totals : typing.Optional[bool]
1138 Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).
1139
1140 is_global : typing.Optional[bool]
1141 Optional filter on the global client parameter.
1142
1143 is_first_party : typing.Optional[bool]
1144 Optional filter on whether or not a client is a first-party client.
1145
1146 app_type : typing.Optional[str]
1147 Optional filter by a comma-separated list of application types.
1148
1149 external_client_id : typing.Optional[str]
1150 Optional filter by the <a href="https://drafts.oauth.net/draft-ietf-oauth-client-id-metadata-document/draft-ietf-oauth-client-id-metadata-document.html">Client ID Metadata Document</a> URI for CIMD-registered clients.
1151
1152 q : typing.Optional[str]
1153 Advanced Query in <a href="https://lucene.apache.org/core/2_9_4/queryparsersyntax.html">Lucene</a> syntax.<br /><b>Permitted Queries</b>:<br /><ul><li><i>client_grant.organization_id:{organization_id}</i></li><li><i>client_grant.allow_any_organization:true</i></li></ul><b>Additional Restrictions</b>:<br /><ul><li>Cannot be used in combination with other filters</li><li>Requires use of the <i>from</i> and <i>take</i> paging parameters (checkpoint paginatinon)</li><li>Reduced rate limits apply. See <a href="https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy/rate-limit-configurations/enterprise-public">Rate Limit Configurations</a></li></ul><i><b>Note</b>: Recent updates may not be immediately reflected in query results</i>
1154
1155 request_options : typing.Optional[RequestOptions]
1156 Request-specific configuration.
1157
1158 Returns
1159 -------
1160 AsyncPager[Client, ListClientsOffsetPaginatedResponseContent]
1161 Clients successfully retrieved.
1162
1163 Examples
1164 --------
1165 import asyncio
1166
1167 from auth0 import AsyncAuth0
1168
1169 client = AsyncAuth0(
1170 token="YOUR_TOKEN",
1171 )
1172
1173
1174 async def main() -> None:
1175 response = await client.clients.list(
1176 fields="fields",
1177 include_fields=True,
1178 page=1,
1179 per_page=1,
1180 include_totals=True,
1181 is_global=True,
1182 is_first_party=True,
1183 app_type="app_type",
1184 external_client_id="external_client_id",
1185 q="q",
1186 )
1187 async for item in response:
1188 yield item
1189
1190 # alternatively, you can paginate page-by-page
1191 async for page in response.iter_pages():
1192 yield page
1193
1194
1195 asyncio.run(main())
1196 """
1197 return await self._raw_client.list(
1198 fields=fields,
1199 include_fields=include_fields,
1200 page=page,
1201 per_page=per_page,
1202 include_totals=include_totals,
1203 is_global=is_global,
1204 is_first_party=is_first_party,
1205 app_type=app_type,
1206 external_client_id=external_client_id,
1207 q=q,
1208 request_options=request_options,
1209 )
1210
1211 async def create(
1212 self,
1213 *,
1214 name: str,
1215 description: typing.Optional[str] = OMIT,
1216 logo_uri: typing.Optional[str] = OMIT,
1217 callbacks: typing.Optional[typing.Sequence[str]] = OMIT,
1218 oidc_logout: typing.Optional[ClientOidcBackchannelLogoutSettings] = OMIT,
1219 oidc_backchannel_logout: typing.Optional[ClientOidcBackchannelLogoutSettings] = OMIT,
1220 session_transfer: typing.Optional[ClientSessionTransferConfiguration] = OMIT,
1221 allowed_origins: typing.Optional[typing.Sequence[str]] = OMIT,
1222 web_origins: typing.Optional[typing.Sequence[str]] = OMIT,
1223 client_aliases: typing.Optional[typing.Sequence[str]] = OMIT,
1224 allowed_clients: typing.Optional[typing.Sequence[str]] = OMIT,
1225 allowed_logout_urls: typing.Optional[typing.Sequence[str]] = OMIT,
1226 grant_types: typing.Optional[typing.Sequence[str]] = OMIT,
1227 token_endpoint_auth_method: typing.Optional[ClientTokenEndpointAuthMethodEnum] = OMIT,
1228 is_token_endpoint_ip_header_trusted: typing.Optional[bool] = OMIT,
1229 app_type: typing.Optional[ClientAppTypeEnum] = OMIT,
1230 is_first_party: typing.Optional[bool] = OMIT,
1231 oidc_conformant: typing.Optional[bool] = OMIT,
1232 jwt_configuration: typing.Optional[ClientJwtConfiguration] = OMIT,
1233 encryption_key: typing.Optional[ClientEncryptionKey] = OMIT,
1234 sso: typing.Optional[bool] = OMIT,
1235 cross_origin_authentication: typing.Optional[bool] = OMIT,
1236 cross_origin_loc: typing.Optional[str] = OMIT,
1237 sso_disabled: typing.Optional[bool] = OMIT,
1238 custom_login_page_on: typing.Optional[bool] = OMIT,
1239 custom_login_page: typing.Optional[str] = OMIT,
1240 custom_login_page_preview: typing.Optional[str] = OMIT,
1241 form_template: typing.Optional[str] = OMIT,
1242 addons: typing.Optional[ClientAddons] = OMIT,
1243 client_metadata: typing.Optional[ClientMetadata] = OMIT,
1244 mobile: typing.Optional[ClientMobile] = OMIT,
1245 initiate_login_uri: typing.Optional[str] = OMIT,
1246 native_social_login: typing.Optional[NativeSocialLogin] = OMIT,
1247 fedcm_login: typing.Optional[FedCmLogin] = OMIT,
1248 refresh_token: typing.Optional[ClientRefreshTokenConfiguration] = OMIT,
1249 default_organization: typing.Optional[ClientDefaultOrganization] = OMIT,
1250 organization_usage: typing.Optional[ClientOrganizationUsageEnum] = OMIT,
1251 organization_require_behavior: typing.Optional[ClientOrganizationRequireBehaviorEnum] = OMIT,
1252 organization_discovery_methods: typing.Optional[typing.Sequence[ClientOrganizationDiscoveryEnum]] = OMIT,
1253 client_authentication_methods: typing.Optional[ClientCreateAuthenticationMethod] = OMIT,
1254 require_pushed_authorization_requests: typing.Optional[bool] = OMIT,
1255 require_proof_of_possession: typing.Optional[bool] = OMIT,
1256 signed_request_object: typing.Optional[ClientSignedRequestObjectWithPublicKey] = OMIT,
1257 token_vault_privileged_access: typing.Optional[ClientTokenVaultPrivilegedAccessWithPublicKey] = OMIT,
1258 compliance_level: typing.Optional[ClientComplianceLevelEnum] = OMIT,
1259 skip_non_verifiable_callback_uri_confirmation_prompt: typing.Optional[bool] = OMIT,
1260 token_exchange: typing.Optional[ClientTokenExchangeConfiguration] = OMIT,
1261 par_request_expiry: typing.Optional[int] = OMIT,
1262 token_quota: typing.Optional[CreateTokenQuota] = OMIT,
1263 resource_server_identifier: typing.Optional[str] = OMIT,
1264 identity_assertion_authorization_grant: typing.Optional[CreateIdentityAssertionAuthorizationGrant] = OMIT,
1265 third_party_security_mode: typing.Optional[ClientThirdPartySecurityModeEnum] = OMIT,
1266 redirection_policy: typing.Optional[ClientRedirectionPolicyEnum] = OMIT,
1267 express_configuration: typing.Optional[ExpressConfiguration] = OMIT,
1268 my_organization_configuration: typing.Optional[ClientMyOrganizationPostConfiguration] = OMIT,
1269 async_approval_notification_channels: typing.Optional[
1270 ClientAsyncApprovalNotificationsChannelsApiPostConfiguration
1271 ] = OMIT,
1272 request_options: typing.Optional[RequestOptions] = None,
1273 ) -> CreateClientResponseContent:
1274 """
1275 Create a new client (application or SSO integration). For more information, read [Create Applications](https://www.auth0.com/docs/get-started/auth0-overview/create-applications)
1276 [API Endpoints for Single Sign-On](https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on).
1277
1278 Notes:
1279 - We recommend leaving the `client_secret` parameter unspecified to allow the generation of a safe secret.
1280 - The `client_authentication_methods` and `token_endpoint_auth_method` properties are mutually exclusive. Use
1281 `client_authentication_methods` to configure the client with Private Key JWT authentication method. Otherwise, use `token_endpoint_auth_method`
1282 to configure the client with client secret (basic or post) or with no authentication method (none).
1283 - When using `client_authentication_methods` to configure the client with Private Key JWT authentication method, specify fully defined credentials.
1284 These credentials will be automatically enabled for Private Key JWT authentication on the client.
1285 - To configure `client_authentication_methods`, the `create:client_credentials` scope is required.
1286 - To configure `client_authentication_methods`, the property `jwt_configuration.alg` must be set to RS256.
1287
1288 SSO Integrations created via this endpoint will accept login requests and share user profile information.
1289
1290 Parameters
1291 ----------
1292 name : str
1293 Name of this client (min length: 1 character, does not allow `<` or `>`).
1294
1295 description : typing.Optional[str]
1296 Free text description of this client (max length: 140 characters).
1297
1298 logo_uri : typing.Optional[str]
1299 URL of the logo to display for this client. Recommended size is 150x150 pixels.
1300
1301 callbacks : typing.Optional[typing.Sequence[str]]
1302 Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication.
1303
1304 oidc_logout : typing.Optional[ClientOidcBackchannelLogoutSettings]
1305
1306 oidc_backchannel_logout : typing.Optional[ClientOidcBackchannelLogoutSettings]
1307 Configuration for OIDC backchannel logout (deprecated, in favor of oidc_logout)
1308
1309 session_transfer : typing.Optional[ClientSessionTransferConfiguration]
1310
1311 allowed_origins : typing.Optional[typing.Sequence[str]]
1312 Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs.
1313
1314 web_origins : typing.Optional[typing.Sequence[str]]
1315 Comma-separated list of allowed origins for use with <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>.
1316
1317 client_aliases : typing.Optional[typing.Sequence[str]]
1318 List of audiences/realms for SAML protocol. Used by the wsfed addon.
1319
1320 allowed_clients : typing.Optional[typing.Sequence[str]]
1321 List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed.
1322
1323 allowed_logout_urls : typing.Optional[typing.Sequence[str]]
1324 Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.
1325
1326 grant_types : typing.Optional[typing.Sequence[str]]
1327 List of grant types supported for this application. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`.
1328
1329 token_endpoint_auth_method : typing.Optional[ClientTokenEndpointAuthMethodEnum]
1330
1331 is_token_endpoint_ip_header_trusted : typing.Optional[bool]
1332 If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint.
1333
1334 app_type : typing.Optional[ClientAppTypeEnum]
1335
1336 is_first_party : typing.Optional[bool]
1337 Whether this client a first party client or not
1338
1339 oidc_conformant : typing.Optional[bool]
1340 Whether this client conforms to <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (true) or uses legacy features (false).
1341
1342 jwt_configuration : typing.Optional[ClientJwtConfiguration]
1343
1344 encryption_key : typing.Optional[ClientEncryptionKey]
1345
1346 sso : typing.Optional[bool]
1347 Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false).
1348
1349 cross_origin_authentication : typing.Optional[bool]
1350 Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false).
1351
1352 cross_origin_loc : typing.Optional[str]
1353 URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page.
1354
1355 sso_disabled : typing.Optional[bool]
1356 <code>true</code> to disable Single Sign On, <code>false</code> otherwise (default: <code>false</code>)
1357
1358 custom_login_page_on : typing.Optional[bool]
1359 <code>true</code> if the custom login page is to be used, <code>false</code> otherwise. Defaults to <code>true</code>
1360
1361 custom_login_page : typing.Optional[str]
1362 The content (HTML, CSS, JS) of the custom login page.
1363
1364 custom_login_page_preview : typing.Optional[str]
1365 The content (HTML, CSS, JS) of the custom login page. (Used on Previews)
1366
1367 form_template : typing.Optional[str]
1368 HTML form template to be used for WS-Federation.
1369
1370 addons : typing.Optional[ClientAddons]
1371
1372 client_metadata : typing.Optional[ClientMetadata]
1373
1374 mobile : typing.Optional[ClientMobile]
1375
1376 initiate_login_uri : typing.Optional[str]
1377 Initiate login uri, must be https
1378
1379 native_social_login : typing.Optional[NativeSocialLogin]
1380
1381 fedcm_login : typing.Optional[FedCmLogin]
1382
1383 refresh_token : typing.Optional[ClientRefreshTokenConfiguration]
1384
1385 default_organization : typing.Optional[ClientDefaultOrganization]
1386
1387 organization_usage : typing.Optional[ClientOrganizationUsageEnum]
1388
1389 organization_require_behavior : typing.Optional[ClientOrganizationRequireBehaviorEnum]
1390
1391 organization_discovery_methods : typing.Optional[typing.Sequence[ClientOrganizationDiscoveryEnum]]
1392 Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both.
1393
1394 client_authentication_methods : typing.Optional[ClientCreateAuthenticationMethod]
1395
1396 require_pushed_authorization_requests : typing.Optional[bool]
1397 Makes the use of Pushed Authorization Requests mandatory for this client
1398
1399 require_proof_of_possession : typing.Optional[bool]
1400 Makes the use of Proof-of-Possession mandatory for this client
1401
1402 signed_request_object : typing.Optional[ClientSignedRequestObjectWithPublicKey]
1403
1404 token_vault_privileged_access : typing.Optional[ClientTokenVaultPrivilegedAccessWithPublicKey]
1405
1406 compliance_level : typing.Optional[ClientComplianceLevelEnum]
1407
1408 skip_non_verifiable_callback_uri_confirmation_prompt : typing.Optional[bool]
1409 Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`).
1410 If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps.
1411 See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information.
1412
1413 token_exchange : typing.Optional[ClientTokenExchangeConfiguration]
1414
1415 par_request_expiry : typing.Optional[int]
1416 Specifies how long, in seconds, a Pushed Authorization Request URI remains valid
1417
1418 token_quota : typing.Optional[CreateTokenQuota]
1419
1420 resource_server_identifier : typing.Optional[str]
1421 The identifier of the resource server that this client is linked to.
1422
1423 identity_assertion_authorization_grant : typing.Optional[CreateIdentityAssertionAuthorizationGrant]
1424
1425 third_party_security_mode : typing.Optional[ClientThirdPartySecurityModeEnum]
1426
1427 redirection_policy : typing.Optional[ClientRedirectionPolicyEnum]
1428
1429 express_configuration : typing.Optional[ExpressConfiguration]
1430
1431 my_organization_configuration : typing.Optional[ClientMyOrganizationPostConfiguration]
1432
1433 async_approval_notification_channels : typing.Optional[ClientAsyncApprovalNotificationsChannelsApiPostConfiguration]
1434
1435 request_options : typing.Optional[RequestOptions]
1436 Request-specific configuration.
1437
1438 Returns
1439 -------
1440 CreateClientResponseContent
1441 Client successfully created.
1442
1443 Examples
1444 --------
1445 import asyncio
1446
1447 from auth0 import AsyncAuth0
1448
1449 client = AsyncAuth0(
1450 token="YOUR_TOKEN",
1451 )
1452
1453
1454 async def main() -> None:
1455 await client.clients.create(
1456 name="name",
1457 )
1458
1459
1460 asyncio.run(main())
1461 """
1462 _response = await self._raw_client.create(
1463 name=name,
1464 description=description,
1465 logo_uri=logo_uri,
1466 callbacks=callbacks,
1467 oidc_logout=oidc_logout,
1468 oidc_backchannel_logout=oidc_backchannel_logout,
1469 session_transfer=session_transfer,
1470 allowed_origins=allowed_origins,
1471 web_origins=web_origins,
1472 client_aliases=client_aliases,
1473 allowed_clients=allowed_clients,
1474 allowed_logout_urls=allowed_logout_urls,
1475 grant_types=grant_types,
1476 token_endpoint_auth_method=token_endpoint_auth_method,
1477 is_token_endpoint_ip_header_trusted=is_token_endpoint_ip_header_trusted,
1478 app_type=app_type,
1479 is_first_party=is_first_party,
1480 oidc_conformant=oidc_conformant,
1481 jwt_configuration=jwt_configuration,
1482 encryption_key=encryption_key,
1483 sso=sso,
1484 cross_origin_authentication=cross_origin_authentication,
1485 cross_origin_loc=cross_origin_loc,
1486 sso_disabled=sso_disabled,
1487 custom_login_page_on=custom_login_page_on,
1488 custom_login_page=custom_login_page,
1489 custom_login_page_preview=custom_login_page_preview,
1490 form_template=form_template,
1491 addons=addons,
1492 client_metadata=client_metadata,
1493 mobile=mobile,
1494 initiate_login_uri=initiate_login_uri,
1495 native_social_login=native_social_login,
1496 fedcm_login=fedcm_login,
1497 refresh_token=refresh_token,
1498 default_organization=default_organization,
1499 organization_usage=organization_usage,
1500 organization_require_behavior=organization_require_behavior,
1501 organization_discovery_methods=organization_discovery_methods,
1502 client_authentication_methods=client_authentication_methods,
1503 require_pushed_authorization_requests=require_pushed_authorization_requests,
1504 require_proof_of_possession=require_proof_of_possession,
1505 signed_request_object=signed_request_object,
1506 token_vault_privileged_access=token_vault_privileged_access,
1507 compliance_level=compliance_level,
1508 skip_non_verifiable_callback_uri_confirmation_prompt=skip_non_verifiable_callback_uri_confirmation_prompt,
1509 token_exchange=token_exchange,
1510 par_request_expiry=par_request_expiry,
1511 token_quota=token_quota,
1512 resource_server_identifier=resource_server_identifier,
1513 identity_assertion_authorization_grant=identity_assertion_authorization_grant,
1514 third_party_security_mode=third_party_security_mode,
1515 redirection_policy=redirection_policy,
1516 express_configuration=express_configuration,
1517 my_organization_configuration=my_organization_configuration,
1518 async_approval_notification_channels=async_approval_notification_channels,
1519 request_options=request_options,
1520 )
1521 return _response.data
1522
1523 async def preview_cimd_metadata(
1524 self, *, external_client_id: str, request_options: typing.Optional[RequestOptions] = None
1525 ) -> PreviewCimdMetadataResponseContent:
1526 """
1527
1528 Fetches and validates a Client ID Metadata Document without creating a client.
1529 Returns the raw metadata and how it would be mapped to Auth0 client fields.
1530 This endpoint is useful for testing metadata URIs before creating CIMD clients.
1531
1532
1533 Parameters
1534 ----------
1535 external_client_id : str
1536 URL to the Client ID Metadata Document
1537
1538 request_options : typing.Optional[RequestOptions]
1539 Request-specific configuration.
1540
1541 Returns
1542 -------
1543 PreviewCimdMetadataResponseContent
1544 Metadata successfully fetched and validated, or retrieval error returned with errors array.
1545
1546 Examples
1547 --------
1548 import asyncio
1549
1550 from auth0 import AsyncAuth0
1551
1552 client = AsyncAuth0(
1553 token="YOUR_TOKEN",
1554 )
1555
1556
1557 async def main() -> None:
1558 await client.clients.preview_cimd_metadata(
1559 external_client_id="external_client_id",
1560 )
1561
1562
1563 asyncio.run(main())
1564 """
1565 _response = await self._raw_client.preview_cimd_metadata(
1566 external_client_id=external_client_id, request_options=request_options
1567 )
1568 return _response.data
1569
1570 async def register_cimd_client(
1571 self, *, external_client_id: str, request_options: typing.Optional[RequestOptions] = None
1572 ) -> RegisterCimdClientResponseContent:
1573 """
1574 Idempotent registration for Client ID Metadata Document (CIMD) clients.
1575 Uses external_client_id as the unique identifier for upsert operations.
1576
1577 **Create:** Returns 201 when a new client is created (requires `create:clients` scope).
1578 **Update:** Returns 200 when an existing client is updated (requires `update:clients` scope).
1579
1580 This endpoint automatically:
1581 - Fetches and validates the metadata document
1582 - Maps CIMD fields to Auth0 client configuration
1583 - Creates/rotates credentials from the JWKS
1584 - Enforces CIMD security policies (HTTPS-only, no shared secrets)
1585
1586 Parameters
1587 ----------
1588 external_client_id : str
1589 URL to the Client ID Metadata Document. Acts as the unique identifier for upsert operations.
1590
1591 request_options : typing.Optional[RequestOptions]
1592 Request-specific configuration.
1593
1594 Returns
1595 -------
1596 RegisterCimdClientResponseContent
1597 CIMD client successfully updated (idempotent).
1598
1599 Examples
1600 --------
1601 import asyncio
1602
1603 from auth0 import AsyncAuth0
1604
1605 client = AsyncAuth0(
1606 token="YOUR_TOKEN",
1607 )
1608
1609
1610 async def main() -> None:
1611 await client.clients.register_cimd_client(
1612 external_client_id="external_client_id",
1613 )
1614
1615
1616 asyncio.run(main())
1617 """
1618 _response = await self._raw_client.register_cimd_client(
1619 external_client_id=external_client_id, request_options=request_options
1620 )
1621 return _response.data
1622
1623 async def get(
1624 self,
1625 id: str,
1626 *,
1627 fields: typing.Optional[str] = None,
1628 include_fields: typing.Optional[bool] = None,
1629 request_options: typing.Optional[RequestOptions] = None,
1630 ) -> GetClientResponseContent:
1631 """
1632 Retrieve client details by ID. Clients are SSO connections or Applications linked with your Auth0 tenant. A list of fields to include or exclude may also be specified.
1633 For more information, read [Applications in Auth0](https://www.auth0.com/docs/get-started/applications) and [Single Sign-On](https://www.auth0.com/docs/authenticate/single-sign-on).
1634
1635 - The following properties can be retrieved with any of the scopes:
1636 `client_id`, `app_type`, `name`, and `description`.
1637 - The following properties can only be retrieved with the `read:clients` or
1638 `read:client_keys` scopes:
1639 `callbacks`, `oidc_logout`, `allowed_origins`,
1640 `web_origins`, `tenant`, `global`, `config_route`,
1641 `callback_url_template`, `jwt_configuration`,
1642 `jwt_configuration.lifetime_in_seconds`, `jwt_configuration.secret_encoded`,
1643 `jwt_configuration.scopes`, `jwt_configuration.alg`, `api_type`,
1644 `logo_uri`, `allowed_clients`, `owners`, `custom_login_page`,
1645 `custom_login_page_off`, `sso`, `addons`, `form_template`,
1646 `custom_login_page_codeview`, `resource_servers`, `client_metadata`,
1647 `mobile`, `mobile.android`, `mobile.ios`, `allowed_logout_urls`,
1648 `token_endpoint_auth_method`, `is_first_party`, `oidc_conformant`,
1649 `is_token_endpoint_ip_header_trusted`, `initiate_login_uri`, `grant_types`,
1650 `refresh_token`, `refresh_token.rotation_type`, `refresh_token.expiration_type`,
1651 `refresh_token.leeway`, `refresh_token.token_lifetime`, `refresh_token.policies`, `organization_usage`,
1652 `organization_require_behavior`.
1653 - The following properties can only be retrieved with the `read:client_keys` or `read:client_credentials` scopes:
1654 `encryption_key`, `encryption_key.pub`, `encryption_key.cert`,
1655 `client_secret`, `client_authentication_methods` and `signing_key`.
1656
1657 Parameters
1658 ----------
1659 id : str
1660 ID of the client to retrieve.
1661
1662 fields : typing.Optional[str]
1663 Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.
1664
1665 include_fields : typing.Optional[bool]
1666 Whether specified fields are to be included (true) or excluded (false).
1667
1668 request_options : typing.Optional[RequestOptions]
1669 Request-specific configuration.
1670
1671 Returns
1672 -------
1673 GetClientResponseContent
1674 Client successfully retrieved.
1675
1676 Examples
1677 --------
1678 import asyncio
1679
1680 from auth0 import AsyncAuth0
1681
1682 client = AsyncAuth0(
1683 token="YOUR_TOKEN",
1684 )
1685
1686
1687 async def main() -> None:
1688 await client.clients.get(
1689 id="id",
1690 fields="fields",
1691 include_fields=True,
1692 )
1693
1694
1695 asyncio.run(main())
1696 """
1697 _response = await self._raw_client.get(
1698 id, fields=fields, include_fields=include_fields, request_options=request_options
1699 )
1700 return _response.data
1701
1702 async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
1703 """
1704 Delete a client and related configuration (rules, connections, etc).
1705
1706 Parameters
1707 ----------
1708 id : str
1709 ID of the client to delete.
1710
1711 request_options : typing.Optional[RequestOptions]
1712 Request-specific configuration.
1713
1714 Returns
1715 -------
1716 None
1717
1718 Examples
1719 --------
1720 import asyncio
1721
1722 from auth0 import AsyncAuth0
1723
1724 client = AsyncAuth0(
1725 token="YOUR_TOKEN",
1726 )
1727
1728
1729 async def main() -> None:
1730 await client.clients.delete(
1731 id="id",
1732 )
1733
1734
1735 asyncio.run(main())
1736 """
1737 _response = await self._raw_client.delete(id, request_options=request_options)
1738 return _response.data
1739
1740 async def update(
1741 self,
1742 id: str,
1743 *,
1744 name: typing.Optional[str] = OMIT,
1745 description: typing.Optional[str] = OMIT,
1746 client_secret: typing.Optional[str] = OMIT,
1747 logo_uri: typing.Optional[str] = OMIT,
1748 callbacks: typing.Optional[typing.Sequence[str]] = OMIT,
1749 oidc_logout: typing.Optional[ClientOidcBackchannelLogoutSettings] = OMIT,
1750 oidc_backchannel_logout: typing.Optional[ClientOidcBackchannelLogoutSettings] = OMIT,
1751 session_transfer: typing.Optional[ClientSessionTransferConfiguration] = OMIT,
1752 allowed_origins: typing.Optional[typing.Sequence[str]] = OMIT,
1753 web_origins: typing.Optional[typing.Sequence[str]] = OMIT,
1754 grant_types: typing.Optional[typing.Sequence[str]] = OMIT,
1755 client_aliases: typing.Optional[typing.Sequence[str]] = OMIT,
1756 allowed_clients: typing.Optional[typing.Sequence[str]] = OMIT,
1757 allowed_logout_urls: typing.Optional[typing.Sequence[str]] = OMIT,
1758 jwt_configuration: typing.Optional[ClientJwtConfiguration] = OMIT,
1759 encryption_key: typing.Optional[ClientEncryptionKey] = OMIT,
1760 sso: typing.Optional[bool] = OMIT,
1761 cross_origin_authentication: typing.Optional[bool] = OMIT,
1762 cross_origin_loc: typing.Optional[str] = OMIT,
1763 sso_disabled: typing.Optional[bool] = OMIT,
1764 custom_login_page_on: typing.Optional[bool] = OMIT,
1765 token_endpoint_auth_method: typing.Optional[ClientTokenEndpointAuthMethodOrNullEnum] = OMIT,
1766 is_token_endpoint_ip_header_trusted: typing.Optional[bool] = OMIT,
1767 app_type: typing.Optional[ClientAppTypeEnum] = OMIT,
1768 is_first_party: typing.Optional[bool] = OMIT,
1769 oidc_conformant: typing.Optional[bool] = OMIT,
1770 custom_login_page: typing.Optional[str] = OMIT,
1771 custom_login_page_preview: typing.Optional[str] = OMIT,
1772 token_quota: typing.Optional[UpdateTokenQuota] = OMIT,
1773 identity_assertion_authorization_grant: typing.Optional[UpdateIdentityAssertionAuthorizationGrant] = OMIT,
1774 form_template: typing.Optional[str] = OMIT,
1775 addons: typing.Optional[ClientAddons] = OMIT,
1776 client_metadata: typing.Optional[ClientMetadata] = OMIT,
1777 mobile: typing.Optional[ClientMobile] = OMIT,
1778 initiate_login_uri: typing.Optional[str] = OMIT,
1779 native_social_login: typing.Optional[NativeSocialLoginPatch] = OMIT,
1780 fedcm_login: typing.Optional[FedCmLoginPatch] = OMIT,
1781 refresh_token: typing.Optional[ClientRefreshTokenConfiguration] = OMIT,
1782 default_organization: typing.Optional[ClientDefaultOrganization] = OMIT,
1783 organization_usage: typing.Optional[ClientOrganizationUsagePatchEnum] = OMIT,
1784 organization_require_behavior: typing.Optional[ClientOrganizationRequireBehaviorPatchEnum] = OMIT,
1785 organization_discovery_methods: typing.Optional[typing.Sequence[ClientOrganizationDiscoveryEnum]] = OMIT,
1786 client_authentication_methods: typing.Optional[ClientAuthenticationMethod] = OMIT,
1787 require_pushed_authorization_requests: typing.Optional[bool] = OMIT,
1788 require_proof_of_possession: typing.Optional[bool] = OMIT,
1789 signed_request_object: typing.Optional[ClientSignedRequestObjectWithCredentialId] = OMIT,
1790 token_vault_privileged_access: typing.Optional[ClientTokenVaultPrivilegedAccessWithCredentialId] = OMIT,
1791 compliance_level: typing.Optional[ClientComplianceLevelEnum] = OMIT,
1792 skip_non_verifiable_callback_uri_confirmation_prompt: typing.Optional[bool] = OMIT,
1793 token_exchange: typing.Optional[ClientTokenExchangeConfigurationOrNull] = OMIT,
1794 par_request_expiry: typing.Optional[int] = OMIT,
1795 express_configuration: typing.Optional[ExpressConfigurationOrNull] = OMIT,
1796 my_organization_configuration: typing.Optional[ClientMyOrganizationPatchConfiguration] = OMIT,
1797 async_approval_notification_channels: typing.Optional[
1798 ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration
1799 ] = OMIT,
1800 third_party_security_mode: typing.Optional[ClientThirdPartySecurityModeEnum] = OMIT,
1801 redirection_policy: typing.Optional[ClientRedirectionPolicyEnum] = OMIT,
1802 request_options: typing.Optional[RequestOptions] = None,
1803 ) -> UpdateClientResponseContent:
1804 """
1805 Updates a client's settings. For more information, read [Applications in Auth0](https://www.auth0.com/docs/get-started/applications) and [Single Sign-On](https://www.auth0.com/docs/authenticate/single-sign-on).
1806
1807 Notes:
1808 - The `client_secret` and `signing_key` attributes can only be updated with the `update:client_keys` scope.
1809 - The `client_authentication_methods` and `token_endpoint_auth_method` properties are mutually exclusive. Use `client_authentication_methods` to configure the client with Private Key JWT authentication method. Otherwise, use `token_endpoint_auth_method` to configure the client with client secret (basic or post) or with no authentication method (none).
1810 - When using `client_authentication_methods` to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
1811 - To configure `client_authentication_methods`, the `update:client_credentials` scope is required.
1812 - To configure `client_authentication_methods`, the property `jwt_configuration.alg` must be set to RS256.
1813 - To change a client's `is_first_party` property to `false`, the `organization_usage` and `organization_require_behavior` properties must be unset.
1814
1815 Parameters
1816 ----------
1817 id : str
1818 ID of the client to update.
1819
1820 name : typing.Optional[str]
1821 The name of the client. Must contain at least one character. Does not allow '<' or '>'.
1822
1823 description : typing.Optional[str]
1824 Free text description of the purpose of the Client. (Max character length: <code>140</code>)
1825
1826 client_secret : typing.Optional[str]
1827 The secret used to sign tokens for the client
1828
1829 logo_uri : typing.Optional[str]
1830 The URL of the client logo (recommended size: 150x150)
1831
1832 callbacks : typing.Optional[typing.Sequence[str]]
1833 A set of URLs that are valid to call back from Auth0 when authenticating users
1834
1835 oidc_logout : typing.Optional[ClientOidcBackchannelLogoutSettings]
1836
1837 oidc_backchannel_logout : typing.Optional[ClientOidcBackchannelLogoutSettings]
1838 Configuration for OIDC backchannel logout (deprecated, in favor of oidc_logout)
1839
1840 session_transfer : typing.Optional[ClientSessionTransferConfiguration]
1841
1842 allowed_origins : typing.Optional[typing.Sequence[str]]
1843 A set of URLs that represents valid origins for CORS
1844
1845 web_origins : typing.Optional[typing.Sequence[str]]
1846 A set of URLs that represents valid web origins for use with web message response mode
1847
1848 grant_types : typing.Optional[typing.Sequence[str]]
1849 A set of grant types that the client is authorized to use. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`.
1850
1851 client_aliases : typing.Optional[typing.Sequence[str]]
1852 List of audiences for SAML protocol
1853
1854 allowed_clients : typing.Optional[typing.Sequence[str]]
1855 Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients
1856
1857 allowed_logout_urls : typing.Optional[typing.Sequence[str]]
1858 URLs that are valid to redirect to after logout from Auth0
1859
1860 jwt_configuration : typing.Optional[ClientJwtConfiguration]
1861 An object that holds settings related to how JWTs are created
1862
1863 encryption_key : typing.Optional[ClientEncryptionKey]
1864 The client's encryption key
1865
1866 sso : typing.Optional[bool]
1867 <code>true</code> to use Auth0 instead of the IdP to do Single Sign On, <code>false</code> otherwise (default: <code>false</code>)
1868
1869 cross_origin_authentication : typing.Optional[bool]
1870 <code>true</code> if this client can be used to make cross-origin authentication requests, <code>false</code> otherwise if cross origin is disabled
1871
1872 cross_origin_loc : typing.Optional[str]
1873 URL for the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page.
1874
1875 sso_disabled : typing.Optional[bool]
1876 <code>true</code> to disable Single Sign On, <code>false</code> otherwise (default: <code>false</code>)
1877
1878 custom_login_page_on : typing.Optional[bool]
1879 <code>true</code> if the custom login page is to be used, <code>false</code> otherwise.
1880
1881 token_endpoint_auth_method : typing.Optional[ClientTokenEndpointAuthMethodOrNullEnum]
1882
1883 is_token_endpoint_ip_header_trusted : typing.Optional[bool]
1884 If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint.
1885
1886 app_type : typing.Optional[ClientAppTypeEnum]
1887
1888 is_first_party : typing.Optional[bool]
1889 Whether this client a first party client or not
1890
1891 oidc_conformant : typing.Optional[bool]
1892 Whether this client will conform to strict OIDC specifications
1893
1894 custom_login_page : typing.Optional[str]
1895 The content (HTML, CSS, JS) of the custom login page
1896
1897 custom_login_page_preview : typing.Optional[str]
1898
1899 token_quota : typing.Optional[UpdateTokenQuota]
1900
1901 identity_assertion_authorization_grant : typing.Optional[UpdateIdentityAssertionAuthorizationGrant]
1902
1903 form_template : typing.Optional[str]
1904 Form template for WS-Federation protocol
1905
1906 addons : typing.Optional[ClientAddons]
1907
1908 client_metadata : typing.Optional[ClientMetadata]
1909
1910 mobile : typing.Optional[ClientMobile]
1911 Configuration related to native mobile apps
1912
1913 initiate_login_uri : typing.Optional[str]
1914 Initiate login uri, must be https
1915
1916 native_social_login : typing.Optional[NativeSocialLoginPatch]
1917
1918 fedcm_login : typing.Optional[FedCmLoginPatch]
1919
1920 refresh_token : typing.Optional[ClientRefreshTokenConfiguration]
1921
1922 default_organization : typing.Optional[ClientDefaultOrganization]
1923
1924 organization_usage : typing.Optional[ClientOrganizationUsagePatchEnum]
1925
1926 organization_require_behavior : typing.Optional[ClientOrganizationRequireBehaviorPatchEnum]
1927
1928 organization_discovery_methods : typing.Optional[typing.Sequence[ClientOrganizationDiscoveryEnum]]
1929 Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both.
1930
1931 client_authentication_methods : typing.Optional[ClientAuthenticationMethod]
1932
1933 require_pushed_authorization_requests : typing.Optional[bool]
1934 Makes the use of Pushed Authorization Requests mandatory for this client
1935
1936 require_proof_of_possession : typing.Optional[bool]
1937 Makes the use of Proof-of-Possession mandatory for this client
1938
1939 signed_request_object : typing.Optional[ClientSignedRequestObjectWithCredentialId]
1940
1941 token_vault_privileged_access : typing.Optional[ClientTokenVaultPrivilegedAccessWithCredentialId]
1942
1943 compliance_level : typing.Optional[ClientComplianceLevelEnum]
1944
1945 skip_non_verifiable_callback_uri_confirmation_prompt : typing.Optional[bool]
1946 Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`).
1947 If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps.
1948 See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information.
1949
1950 token_exchange : typing.Optional[ClientTokenExchangeConfigurationOrNull]
1951
1952 par_request_expiry : typing.Optional[int]
1953 Specifies how long, in seconds, a Pushed Authorization Request URI remains valid
1954
1955 express_configuration : typing.Optional[ExpressConfigurationOrNull]
1956
1957 my_organization_configuration : typing.Optional[ClientMyOrganizationPatchConfiguration]
1958
1959 async_approval_notification_channels : typing.Optional[ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration]
1960
1961 third_party_security_mode : typing.Optional[ClientThirdPartySecurityModeEnum]
1962
1963 redirection_policy : typing.Optional[ClientRedirectionPolicyEnum]
1964
1965 request_options : typing.Optional[RequestOptions]
1966 Request-specific configuration.
1967
1968 Returns
1969 -------
1970 UpdateClientResponseContent
1971 Client successfully updated.
1972
1973 Examples
1974 --------
1975 import asyncio
1976
1977 from auth0 import AsyncAuth0
1978
1979 client = AsyncAuth0(
1980 token="YOUR_TOKEN",
1981 )
1982
1983
1984 async def main() -> None:
1985 await client.clients.update(
1986 id="id",
1987 )
1988
1989
1990 asyncio.run(main())
1991 """
1992 _response = await self._raw_client.update(
1993 id,
1994 name=name,
1995 description=description,
1996 client_secret=client_secret,
1997 logo_uri=logo_uri,
1998 callbacks=callbacks,
1999 oidc_logout=oidc_logout,
2000 oidc_backchannel_logout=oidc_backchannel_logout,
2001 session_transfer=session_transfer,
2002 allowed_origins=allowed_origins,
2003 web_origins=web_origins,
2004 grant_types=grant_types,
2005 client_aliases=client_aliases,
2006 allowed_clients=allowed_clients,
2007 allowed_logout_urls=allowed_logout_urls,
2008 jwt_configuration=jwt_configuration,
2009 encryption_key=encryption_key,
2010 sso=sso,
2011 cross_origin_authentication=cross_origin_authentication,
2012 cross_origin_loc=cross_origin_loc,
2013 sso_disabled=sso_disabled,
2014 custom_login_page_on=custom_login_page_on,
2015 token_endpoint_auth_method=token_endpoint_auth_method,
2016 is_token_endpoint_ip_header_trusted=is_token_endpoint_ip_header_trusted,
2017 app_type=app_type,
2018 is_first_party=is_first_party,
2019 oidc_conformant=oidc_conformant,
2020 custom_login_page=custom_login_page,
2021 custom_login_page_preview=custom_login_page_preview,
2022 token_quota=token_quota,
2023 identity_assertion_authorization_grant=identity_assertion_authorization_grant,
2024 form_template=form_template,
2025 addons=addons,
2026 client_metadata=client_metadata,
2027 mobile=mobile,
2028 initiate_login_uri=initiate_login_uri,
2029 native_social_login=native_social_login,
2030 fedcm_login=fedcm_login,
2031 refresh_token=refresh_token,
2032 default_organization=default_organization,
2033 organization_usage=organization_usage,
2034 organization_require_behavior=organization_require_behavior,
2035 organization_discovery_methods=organization_discovery_methods,
2036 client_authentication_methods=client_authentication_methods,
2037 require_pushed_authorization_requests=require_pushed_authorization_requests,
2038 require_proof_of_possession=require_proof_of_possession,
2039 signed_request_object=signed_request_object,
2040 token_vault_privileged_access=token_vault_privileged_access,
2041 compliance_level=compliance_level,
2042 skip_non_verifiable_callback_uri_confirmation_prompt=skip_non_verifiable_callback_uri_confirmation_prompt,
2043 token_exchange=token_exchange,
2044 par_request_expiry=par_request_expiry,
2045 express_configuration=express_configuration,
2046 my_organization_configuration=my_organization_configuration,
2047 async_approval_notification_channels=async_approval_notification_channels,
2048 third_party_security_mode=third_party_security_mode,
2049 redirection_policy=redirection_policy,
2050 request_options=request_options,
2051 )
2052 return _response.data
2053
2054 async def rotate_secret(
2055 self, id: str, *, request_options: typing.Optional[RequestOptions] = None
2056 ) -> RotateClientSecretResponseContent:
2057 """
2058 Rotate a client secret.
2059
2060 This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.
2061
2062 For more information, read [Rotate Client Secrets](https://www.auth0.com/docs/get-started/applications/rotate-client-secret).
2063
2064 Parameters
2065 ----------
2066 id : str
2067 ID of the client that will rotate secrets.
2068
2069 request_options : typing.Optional[RequestOptions]
2070 Request-specific configuration.
2071
2072 Returns
2073 -------
2074 RotateClientSecretResponseContent
2075 Secret successfully rotated.
2076
2077 Examples
2078 --------
2079 import asyncio
2080
2081 from auth0 import AsyncAuth0
2082
2083 client = AsyncAuth0(
2084 token="YOUR_TOKEN",
2085 )
2086
2087
2088 async def main() -> None:
2089 await client.clients.rotate_secret(
2090 id="id",
2091 )
2092
2093
2094 asyncio.run(main())
2095 """
2096 _response = await self._raw_client.rotate_secret(id, request_options=request_options)
2097 return _response.data
2098
2099 @property
2100 def credentials(self):
2101 if self._credentials is None:
2102 from .credentials.client import AsyncCredentialsClient # noqa: E402
2103
2104 self._credentials = AsyncCredentialsClient(client_wrapper=self._client_wrapper)
2105 return self._credentials
2106
2107 @property
2108 def connections(self):
2109 if self._connections is None:
2110 from .connections.client import AsyncConnectionsClient # noqa: E402
2111
2112 self._connections = AsyncConnectionsClient(client_wrapper=self._client_wrapper)
2113 return self._connections