Skip to content

Commit 874d40e

Browse files
authored
feat: DPoP Support, SCIM Groups, Application Rate Limits (#853)
## Changes ### Added - `rate_limit_policies` client with full CRUD: `list`, `create`, `get`, `update`, `delete` - `RateLimitPolicyConfigurationZero` (`allow`), `RateLimitPolicyConfigurationOne` (`block`/`log` + `limit`), `RateLimitPolicyConfigurationAction` (`redirect` + `limit` + `redirect_uri`), `RateLimitPolicy` response type - OAuth scopes: `create:rate_limit_policies`, `read:rate_limit_policies`, `update:rate_limit_policies`, `delete:rate_limit_policies` - `groups.roles` — `list`, `create`, `delete` - `roles.groups` — `get`, `create`, `delete` - `users.effective_roles` / `users.effective_roles.sources.groups` - `users.effective_permissions` / `users.effective_permissions.sources.roles` - `organizations.groups` — `list` - `organizations.groups.roles` — `list`, `create`, `delete` - `organizations.members.effective_roles` / `organizations.members.effective_roles.sources.groups` - types for SCIM Groups: effective role/permission response types, org-member effective role types, paginated list wrappers, source enum discriminators - OAuth scopes: `create/read/delete:group_roles`, `read:organization_groups`, `create/read/delete:organization_group_roles`, `read:organization_member_effective_roles`, `read:organization_member_role_source_groups`, `read:user_effective_roles`, `read:user_role_source_groups`, `read:user_effective_permissions`, `read:user_permission_source_roles` ### Changed - `ConnectionPropertiesOptions` — `dpop_signing_alg` field added (write path for `POST /api/v2/connections`) - `UpdateConnectionOptions` — `dpop_signing_alg` field added (write path for `PATCH /api/v2/connections/{id}`)
2 parents 5e2d073 + 32d0dce commit 874d40e

179 files changed

Lines changed: 15899 additions & 3813 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/replay.lock

Lines changed: 317 additions & 843 deletions
Large diffs are not rendered by default.

reference.md

Lines changed: 3703 additions & 1796 deletions
Large diffs are not rendered by default.

src/auth0/management/__init__.py

Lines changed: 120 additions & 0 deletions
Large diffs are not rendered by default.

src/auth0/management/actions/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def update(
284284
request_options: typing.Optional[RequestOptions] = None,
285285
) -> UpdateActionResponseContent:
286286
"""
287-
Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed.
287+
Update an existing action. If this action is currently bound to a trigger, updating it will **not** affect any user flows until the action is deployed.
288288
289289
Parameters
290290
----------
@@ -734,7 +734,7 @@ async def update(
734734
request_options: typing.Optional[RequestOptions] = None,
735735
) -> UpdateActionResponseContent:
736736
"""
737-
Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed.
737+
Update an existing action. If this action is currently bound to a trigger, updating it will **not** affect any user flows until the action is deployed.
738738
739739
Parameters
740740
----------

src/auth0/management/actions/raw_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def update(
519519
request_options: typing.Optional[RequestOptions] = None,
520520
) -> HttpResponse[UpdateActionResponseContent]:
521521
"""
522-
Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed.
522+
Update an existing action. If this action is currently bound to a trigger, updating it will **not** affect any user flows until the action is deployed.
523523
524524
Parameters
525525
----------
@@ -1325,7 +1325,7 @@ async def update(
13251325
request_options: typing.Optional[RequestOptions] = None,
13261326
) -> AsyncHttpResponse[UpdateActionResponseContent]:
13271327
"""
1328-
Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed.
1328+
Update an existing action. If this action is currently bound to a trigger, updating it will **not** affect any user flows until the action is deployed.
13291329
13301330
Parameters
13311331
----------

src/auth0/management/actions/versions/raw_client.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,6 @@ def deploy(
280280
json=convert_and_respect_annotation_metadata(
281281
object_=request, annotation=typing.Optional[DeployActionVersionRequestContent], direction="write"
282282
),
283-
headers={
284-
"content-type": "application/json",
285-
},
286283
request_options=request_options,
287284
omit=OMIT,
288285
)
@@ -605,9 +602,6 @@ async def deploy(
605602
json=convert_and_respect_annotation_metadata(
606603
object_=request, annotation=typing.Optional[DeployActionVersionRequestContent], direction="write"
607604
),
608-
headers={
609-
"content-type": "application/json",
610-
},
611605
request_options=request_options,
612606
omit=OMIT,
613607
)

src/auth0/management/branding/phone/templates/raw_client.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,6 @@ def reset(
565565
f"branding/phone/templates/{encode_path_param(id)}/reset",
566566
method="PATCH",
567567
json=request,
568-
headers={
569-
"content-type": "application/json",
570-
},
571568
request_options=request_options,
572569
omit=OMIT,
573570
)
@@ -1280,9 +1277,6 @@ async def reset(
12801277
f"branding/phone/templates/{encode_path_param(id)}/reset",
12811278
method="PATCH",
12821279
json=request,
1283-
headers={
1284-
"content-type": "application/json",
1285-
},
12861280
request_options=request_options,
12871281
omit=OMIT,
12881282
)

src/auth0/management/branding/templates/client.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,28 @@ def update_universal_login(
6262
"""
6363
Update the Universal Login branding template.
6464
65-
<p>When <code>content-type</code> header is set to <code>application/json</code>:</p>
66-
<pre>
65+
When `content-type` header is set to `application/json`:
66+
67+
```json
6768
{
68-
"template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;"
69+
"template": "<!DOCTYPE html>{% assign resolved_dir = dir | default: \\"auto\\" %}<html lang=\\"{{locale}}\\" dir=\\"{{resolved_dir}}\\"><head>{%- auth0:head -%}</head><body class=\\"_widget-auto-layout\\">{%- auth0:widget -%}</body></html>"
6970
}
70-
</pre>
71+
```
72+
73+
When `content-type` header is set to `text/html`:
7174
72-
<p>
73-
When <code>content-type</code> header is set to <code>text/html</code>:
74-
</p>
75-
<pre>
76-
&lt!DOCTYPE html&gt;
75+
```html
76+
<!DOCTYPE html>
7777
{% assign resolved_dir = dir | default: "auto" %}
78-
&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;
79-
&lt;head&gt;
78+
<html lang="{{locale}}" dir="{{resolved_dir}}">
79+
<head>
8080
{%- auth0:head -%}
81-
&lt;/head&gt;
82-
&lt;body class="_widget-auto-layout"&gt;
81+
</head>
82+
<body class="_widget-auto-layout">
8383
{%- auth0:widget -%}
84-
&lt;/body&gt;
85-
&lt;/html&gt;
86-
</pre>
84+
</body>
85+
</html>
86+
```
8787
8888
Parameters
8989
----------
@@ -192,28 +192,28 @@ async def update_universal_login(
192192
"""
193193
Update the Universal Login branding template.
194194
195-
<p>When <code>content-type</code> header is set to <code>application/json</code>:</p>
196-
<pre>
195+
When `content-type` header is set to `application/json`:
196+
197+
```json
197198
{
198-
"template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;"
199+
"template": "<!DOCTYPE html>{% assign resolved_dir = dir | default: \\"auto\\" %}<html lang=\\"{{locale}}\\" dir=\\"{{resolved_dir}}\\"><head>{%- auth0:head -%}</head><body class=\\"_widget-auto-layout\\">{%- auth0:widget -%}</body></html>"
199200
}
200-
</pre>
201+
```
202+
203+
When `content-type` header is set to `text/html`:
201204
202-
<p>
203-
When <code>content-type</code> header is set to <code>text/html</code>:
204-
</p>
205-
<pre>
206-
&lt!DOCTYPE html&gt;
205+
```html
206+
<!DOCTYPE html>
207207
{% assign resolved_dir = dir | default: "auto" %}
208-
&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;
209-
&lt;head&gt;
208+
<html lang="{{locale}}" dir="{{resolved_dir}}">
209+
<head>
210210
{%- auth0:head -%}
211-
&lt;/head&gt;
212-
&lt;body class="_widget-auto-layout"&gt;
211+
</head>
212+
<body class="_widget-auto-layout">
213213
{%- auth0:widget -%}
214-
&lt;/body&gt;
215-
&lt;/html&gt;
216-
</pre>
214+
</body>
215+
</html>
216+
```
217217
218218
Parameters
219219
----------

src/auth0/management/branding/templates/raw_client.py

Lines changed: 32 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -131,28 +131,28 @@ def update_universal_login(
131131
"""
132132
Update the Universal Login branding template.
133133
134-
<p>When <code>content-type</code> header is set to <code>application/json</code>:</p>
135-
<pre>
134+
When `content-type` header is set to `application/json`:
135+
136+
```json
136137
{
137-
"template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;"
138+
"template": "<!DOCTYPE html>{% assign resolved_dir = dir | default: \\"auto\\" %}<html lang=\\"{{locale}}\\" dir=\\"{{resolved_dir}}\\"><head>{%- auth0:head -%}</head><body class=\\"_widget-auto-layout\\">{%- auth0:widget -%}</body></html>"
138139
}
139-
</pre>
140+
```
141+
142+
When `content-type` header is set to `text/html`:
140143
141-
<p>
142-
When <code>content-type</code> header is set to <code>text/html</code>:
143-
</p>
144-
<pre>
145-
&lt!DOCTYPE html&gt;
144+
```html
145+
<!DOCTYPE html>
146146
{% assign resolved_dir = dir | default: "auto" %}
147-
&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;
148-
&lt;head&gt;
147+
<html lang="{{locale}}" dir="{{resolved_dir}}">
148+
<head>
149149
{%- auth0:head -%}
150-
&lt;/head&gt;
151-
&lt;body class="_widget-auto-layout"&gt;
150+
</head>
151+
<body class="_widget-auto-layout">
152152
{%- auth0:widget -%}
153-
&lt;/body&gt;
154-
&lt;/html&gt;
155-
</pre>
153+
</body>
154+
</html>
155+
```
156156
157157
Parameters
158158
----------
@@ -171,9 +171,6 @@ def update_universal_login(
171171
json=convert_and_respect_annotation_metadata(
172172
object_=request, annotation=UpdateUniversalLoginTemplateRequestContent, direction="write"
173173
),
174-
headers={
175-
"content-type": "application/json",
176-
},
177174
request_options=request_options,
178175
omit=OMIT,
179176
)
@@ -434,28 +431,28 @@ async def update_universal_login(
434431
"""
435432
Update the Universal Login branding template.
436433
437-
<p>When <code>content-type</code> header is set to <code>application/json</code>:</p>
438-
<pre>
434+
When `content-type` header is set to `application/json`:
435+
436+
```json
439437
{
440-
"template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;"
438+
"template": "<!DOCTYPE html>{% assign resolved_dir = dir | default: \\"auto\\" %}<html lang=\\"{{locale}}\\" dir=\\"{{resolved_dir}}\\"><head>{%- auth0:head -%}</head><body class=\\"_widget-auto-layout\\">{%- auth0:widget -%}</body></html>"
441439
}
442-
</pre>
440+
```
441+
442+
When `content-type` header is set to `text/html`:
443443
444-
<p>
445-
When <code>content-type</code> header is set to <code>text/html</code>:
446-
</p>
447-
<pre>
448-
&lt!DOCTYPE html&gt;
444+
```html
445+
<!DOCTYPE html>
449446
{% assign resolved_dir = dir | default: "auto" %}
450-
&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;
451-
&lt;head&gt;
447+
<html lang="{{locale}}" dir="{{resolved_dir}}">
448+
<head>
452449
{%- auth0:head -%}
453-
&lt;/head&gt;
454-
&lt;body class="_widget-auto-layout"&gt;
450+
</head>
451+
<body class="_widget-auto-layout">
455452
{%- auth0:widget -%}
456-
&lt;/body&gt;
457-
&lt;/html&gt;
458-
</pre>
453+
</body>
454+
</html>
455+
```
459456
460457
Parameters
461458
----------
@@ -474,9 +471,6 @@ async def update_universal_login(
474471
json=convert_and_respect_annotation_metadata(
475472
object_=request, annotation=UpdateUniversalLoginTemplateRequestContent, direction="write"
476473
),
477-
headers={
478-
"content-type": "application/json",
479-
},
480474
request_options=request_options,
481475
omit=OMIT,
482476
)

src/auth0/management/client.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from .network_acls.client import AsyncNetworkAclsClient, NetworkAclsClient
3737
from .organizations.client import AsyncOrganizationsClient, OrganizationsClient
3838
from .prompts.client import AsyncPromptsClient, PromptsClient
39+
from .rate_limit_policies.client import AsyncRateLimitPoliciesClient, RateLimitPoliciesClient
3940
from .refresh_tokens.client import AsyncRefreshTokensClient, RefreshTokensClient
4041
from .resource_servers.client import AsyncResourceServersClient, ResourceServersClient
4142
from .risk_assessments.client import AsyncRiskAssessmentsClient, RiskAssessmentsClient
@@ -161,6 +162,7 @@ def __init__(
161162
self._network_acls: typing.Optional[NetworkAclsClient] = None
162163
self._organizations: typing.Optional[OrganizationsClient] = None
163164
self._prompts: typing.Optional[PromptsClient] = None
165+
self._rate_limit_policies: typing.Optional[RateLimitPoliciesClient] = None
164166
self._refresh_tokens: typing.Optional[RefreshTokensClient] = None
165167
self._resource_servers: typing.Optional[ResourceServersClient] = None
166168
self._roles: typing.Optional[RolesClient] = None
@@ -360,6 +362,14 @@ def prompts(self):
360362
self._prompts = PromptsClient(client_wrapper=self._client_wrapper)
361363
return self._prompts
362364

365+
@property
366+
def rate_limit_policies(self):
367+
if self._rate_limit_policies is None:
368+
from .rate_limit_policies.client import RateLimitPoliciesClient # noqa: E402
369+
370+
self._rate_limit_policies = RateLimitPoliciesClient(client_wrapper=self._client_wrapper)
371+
return self._rate_limit_policies
372+
363373
@property
364374
def refresh_tokens(self):
365375
if self._refresh_tokens is None:
@@ -663,6 +673,7 @@ def __init__(
663673
self._network_acls: typing.Optional[AsyncNetworkAclsClient] = None
664674
self._organizations: typing.Optional[AsyncOrganizationsClient] = None
665675
self._prompts: typing.Optional[AsyncPromptsClient] = None
676+
self._rate_limit_policies: typing.Optional[AsyncRateLimitPoliciesClient] = None
666677
self._refresh_tokens: typing.Optional[AsyncRefreshTokensClient] = None
667678
self._resource_servers: typing.Optional[AsyncResourceServersClient] = None
668679
self._roles: typing.Optional[AsyncRolesClient] = None
@@ -862,6 +873,14 @@ def prompts(self):
862873
self._prompts = AsyncPromptsClient(client_wrapper=self._client_wrapper)
863874
return self._prompts
864875

876+
@property
877+
def rate_limit_policies(self):
878+
if self._rate_limit_policies is None:
879+
from .rate_limit_policies.client import AsyncRateLimitPoliciesClient # noqa: E402
880+
881+
self._rate_limit_policies = AsyncRateLimitPoliciesClient(client_wrapper=self._client_wrapper)
882+
return self._rate_limit_policies
883+
865884
@property
866885
def refresh_tokens(self):
867886
if self._refresh_tokens is None:

0 commit comments

Comments
 (0)