Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
863 changes: 841 additions & 22 deletions reference.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/auth0/management/actions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def list(
token="YOUR_TOKEN",
)
response = client.actions.list(
trigger_id="triggerId",
trigger_id="post-login",
action_name="actionName",
deployed=True,
page=1,
Expand Down Expand Up @@ -185,7 +185,7 @@ def create(
name="name",
supported_triggers=[
ActionTrigger(
id="id",
id="post-login",
)
],
)
Expand Down Expand Up @@ -521,7 +521,7 @@ async def list(

async def main() -> None:
response = await client.actions.list(
trigger_id="triggerId",
trigger_id="post-login",
action_name="actionName",
deployed=True,
page=1,
Expand Down Expand Up @@ -614,7 +614,7 @@ async def main() -> None:
name="name",
supported_triggers=[
ActionTrigger(
id="id",
id="post-login",
)
],
)
Expand Down
8 changes: 4 additions & 4 deletions src/auth0/management/actions/triggers/bindings/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def list(
token="YOUR_TOKEN",
)
response = client.actions.triggers.bindings.list(
trigger_id="triggerId",
trigger_id="post-login",
page=1,
per_page=1,
)
Expand Down Expand Up @@ -115,7 +115,7 @@ def update_many(
token="YOUR_TOKEN",
)
client.actions.triggers.bindings.update_many(
trigger_id="triggerId",
trigger_id="post-login",
)
"""
_response = self._raw_client.update_many(trigger_id, bindings=bindings, request_options=request_options)
Expand Down Expand Up @@ -180,7 +180,7 @@ async def list(

async def main() -> None:
response = await client.actions.triggers.bindings.list(
trigger_id="triggerId",
trigger_id="post-login",
page=1,
per_page=1,
)
Expand Down Expand Up @@ -235,7 +235,7 @@ async def update_many(

async def main() -> None:
await client.actions.triggers.bindings.update_many(
trigger_id="triggerId",
trigger_id="post-login",
)


Expand Down
184 changes: 184 additions & 0 deletions src/auth0/management/clients/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
from ..types.get_client_response_content import GetClientResponseContent
from ..types.list_clients_offset_paginated_response_content import ListClientsOffsetPaginatedResponseContent
from ..types.native_social_login import NativeSocialLogin
from ..types.preview_cimd_metadata_response_content import PreviewCimdMetadataResponseContent
from ..types.register_cimd_client_response_content import RegisterCimdClientResponseContent
from ..types.rotate_client_secret_response_content import RotateClientSecretResponseContent
from ..types.update_client_response_content import UpdateClientResponseContent
from ..types.update_token_quota import UpdateTokenQuota
Expand Down Expand Up @@ -86,6 +88,7 @@ def list(
is_global: typing.Optional[bool] = None,
is_first_party: typing.Optional[bool] = None,
app_type: typing.Optional[str] = None,
external_client_id: typing.Optional[str] = None,
q: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> SyncPager[Client, ListClientsOffsetPaginatedResponseContent]:
Expand Down Expand Up @@ -150,6 +153,9 @@ def list(
app_type : typing.Optional[str]
Optional filter by a comma-separated list of application types.

external_client_id : typing.Optional[str]
Optional filter by the <a href="https://www.ietf.org/archive/id/draft-ietf-oauth-client-id-metadata-document-04.html">Client ID Metadata Document</a> URI for CIMD-registered clients.

q : typing.Optional[str]
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>

Expand Down Expand Up @@ -177,6 +183,7 @@ def list(
is_global=True,
is_first_party=True,
app_type="app_type",
external_client_id="external_client_id",
q="q",
)
for item in response:
Expand All @@ -194,6 +201,7 @@ def list(
is_global=is_global,
is_first_party=is_first_party,
app_type=app_type,
external_client_id=external_client_id,
q=q,
request_options=request_options,
)
Expand Down Expand Up @@ -478,6 +486,83 @@ def create(
)
return _response.data

def preview_cimd_metadata(
self, *, external_client_id: str, request_options: typing.Optional[RequestOptions] = None
) -> PreviewCimdMetadataResponseContent:
"""

Fetches and validates a Client ID Metadata Document without creating a client.
Returns the raw metadata and how it would be mapped to Auth0 client fields.
This endpoint is useful for testing metadata URIs before creating CIMD clients.


Parameters
----------
external_client_id : str
URL to the Client ID Metadata Document

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Returns
-------
PreviewCimdMetadataResponseContent
Metadata successfully fetched and validated, or retrieval error returned with errors array.

Examples
--------
from auth0 import Auth0

client = Auth0(
token="YOUR_TOKEN",
)
client.clients.preview_cimd_metadata(
external_client_id="external_client_id",
)
"""
_response = self._raw_client.preview_cimd_metadata(
external_client_id=external_client_id, request_options=request_options
)
return _response.data

def register_cimd_client(
self, *, external_client_id: str, request_options: typing.Optional[RequestOptions] = None
) -> RegisterCimdClientResponseContent:
"""

Idempotent registration for Client ID Metadata Document (CIMD) clients.
Uses external_client_id as the unique identifier for upsert operations.
**Create:** Returns 201 when a new client is created (requires \\

Parameters
----------
external_client_id : str
URL to the Client ID Metadata Document. Acts as the unique identifier for upsert operations.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Returns
-------
RegisterCimdClientResponseContent
CIMD client successfully updated (idempotent).

Examples
--------
from auth0 import Auth0

client = Auth0(
token="YOUR_TOKEN",
)
client.clients.register_cimd_client(
external_client_id="external_client_id",
)
"""
_response = self._raw_client.register_cimd_client(
external_client_id=external_client_id, request_options=request_options
)
return _response.data

def get(
self,
id: str,
Expand Down Expand Up @@ -951,6 +1036,7 @@ async def list(
is_global: typing.Optional[bool] = None,
is_first_party: typing.Optional[bool] = None,
app_type: typing.Optional[str] = None,
external_client_id: typing.Optional[str] = None,
q: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncPager[Client, ListClientsOffsetPaginatedResponseContent]:
Expand Down Expand Up @@ -1015,6 +1101,9 @@ async def list(
app_type : typing.Optional[str]
Optional filter by a comma-separated list of application types.

external_client_id : typing.Optional[str]
Optional filter by the <a href="https://www.ietf.org/archive/id/draft-ietf-oauth-client-id-metadata-document-04.html">Client ID Metadata Document</a> URI for CIMD-registered clients.

q : typing.Optional[str]
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>

Expand Down Expand Up @@ -1047,6 +1136,7 @@ async def main() -> None:
is_global=True,
is_first_party=True,
app_type="app_type",
external_client_id="external_client_id",
q="q",
)
async for item in response:
Expand All @@ -1068,6 +1158,7 @@ async def main() -> None:
is_global=is_global,
is_first_party=is_first_party,
app_type=app_type,
external_client_id=external_client_id,
q=q,
request_options=request_options,
)
Expand Down Expand Up @@ -1360,6 +1451,99 @@ async def main() -> None:
)
return _response.data

async def preview_cimd_metadata(
self, *, external_client_id: str, request_options: typing.Optional[RequestOptions] = None
) -> PreviewCimdMetadataResponseContent:
"""

Fetches and validates a Client ID Metadata Document without creating a client.
Returns the raw metadata and how it would be mapped to Auth0 client fields.
This endpoint is useful for testing metadata URIs before creating CIMD clients.


Parameters
----------
external_client_id : str
URL to the Client ID Metadata Document

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Returns
-------
PreviewCimdMetadataResponseContent
Metadata successfully fetched and validated, or retrieval error returned with errors array.

Examples
--------
import asyncio

from auth0 import AsyncAuth0

client = AsyncAuth0(
token="YOUR_TOKEN",
)


async def main() -> None:
await client.clients.preview_cimd_metadata(
external_client_id="external_client_id",
)


asyncio.run(main())
"""
_response = await self._raw_client.preview_cimd_metadata(
external_client_id=external_client_id, request_options=request_options
)
return _response.data

async def register_cimd_client(
self, *, external_client_id: str, request_options: typing.Optional[RequestOptions] = None
) -> RegisterCimdClientResponseContent:
"""

Idempotent registration for Client ID Metadata Document (CIMD) clients.
Uses external_client_id as the unique identifier for upsert operations.
**Create:** Returns 201 when a new client is created (requires \\

Parameters
----------
external_client_id : str
URL to the Client ID Metadata Document. Acts as the unique identifier for upsert operations.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Returns
-------
RegisterCimdClientResponseContent
CIMD client successfully updated (idempotent).

Examples
--------
import asyncio

from auth0 import AsyncAuth0

client = AsyncAuth0(
token="YOUR_TOKEN",
)


async def main() -> None:
await client.clients.register_cimd_client(
external_client_id="external_client_id",
)


asyncio.run(main())
"""
_response = await self._raw_client.register_cimd_client(
external_client_id=external_client_id, request_options=request_options
)
return _response.data

async def get(
self,
id: str,
Expand Down
Loading
Loading