Skip to content

Commit 58f7743

Browse files
authored
fix: Remove branding identifiers, add tenant/connection types, fix missing error responses (#860)
### ⚠️ Breaking Changes - **Branding `identifiers` removed** — `identifiers` parameter removed from `branding.update()`; `identifiers` field removed from `GetBrandingResponseContent` and `UpdateBrandingResponseContent`. Associated types (`BrandingIdentifiers`, `UpdateBrandingIdentifiers`, `BrandingPhoneDisplay`, `UpdateBrandingPhoneDisplay`, and their supporting enums) are no longer exported from `auth0.management.types`. These settings now live exclusively on the theme resource (`PATCH /api/v2/branding/themes/{id}`). - **`PhoneTemplate.id` now optional** — `id` was a required `str` on `PhoneTemplate`, `GetPhoneTemplateResponseContent`, `CreatePhoneTemplateResponseContent`, `UpdatePhoneTemplateResponseContent`, and `ResetPhoneTemplateResponseContent`. It is now `Optional[str]`. Code that accesses `.id` without a `None` check will require updating. ### Type Changes - **Tenant Settings** — new `security_headers` field (CSP + XSS protection config), `country_codes` (phone identifier allow/deny list), and `include_session_metadata_in_tenant_logs` flag - **Connection Options** — new `id_token_session_expiry_supported` field on OIDC and update connection options - **Client MyOrganization** — new `invitation_landing_client_id` field across post/patch/response configuration types ### Bug Fixes - **`GET /client-grants/{id}/organizations`** — added `404` handling; raises `NotFoundError` when the grant does not exist (was previously an unhandled parse error) - **`PATCH /token-exchange-profiles/{id}`** — added `409` handling; raises `ConflictError` when a profile with the same `subject_token_type` already exists (was previously an unhandled parse error)
2 parents d381cbf + 8907450 commit 58f7743

108 files changed

Lines changed: 2310 additions & 1538 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: 88 additions & 49 deletions
Large diffs are not rendered by default.

reference.md

Lines changed: 277 additions & 269 deletions
Large diffs are not rendered by default.

src/auth0/management/__init__.py

Lines changed: 63 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,7 @@
9696
BotDetectionMonitoringModeEnabled,
9797
BrandingColors,
9898
BrandingFont,
99-
BrandingIdentifiers,
100-
BrandingLoginDisplayEnum,
10199
BrandingPageBackground,
102-
BrandingPhoneDisplay,
103-
BrandingPhoneFormattingEnum,
104-
BrandingPhoneMaskingEnum,
105100
BrandingThemeBorders,
106101
BrandingThemeBordersButtonsStyleEnum,
107102
BrandingThemeBordersInputsStyleEnum,
@@ -406,6 +401,7 @@
406401
ConnectionId,
407402
ConnectionIdTokenEncryptionAlgValuesSupported,
408403
ConnectionIdTokenEncryptionEncValuesSupported,
404+
ConnectionIdTokenSessionExpirySupported,
409405
ConnectionIdTokenSignedResponseAlgEnum,
410406
ConnectionIdTokenSignedResponseAlgs,
411407
ConnectionIdTokenSigningAlgValuesSupported,
@@ -762,6 +758,7 @@
762758
ConnectionWaadProtocol,
763759
ConnectionWaadProtocolEnumAzureAd,
764760
ConnectionsMetadata,
761+
ContentSecurityPolicyConfig,
765762
CreateActionModuleResponseContent,
766763
CreateActionModuleVersionResponseContent,
767764
CreateActionResponseContent,
@@ -1018,6 +1015,18 @@
10181015
CreatedUserAuthenticationMethodTypeEnum,
10191016
CredentialDeviceTypeEnum,
10201017
CredentialId,
1018+
CspDirectives,
1019+
CspFlag,
1020+
CspFlags,
1021+
CspPolicies,
1022+
CspPolicy,
1023+
CspPolicyMode,
1024+
CspPolicyReporting,
1025+
CspReportTo,
1026+
CspReportToEndpoint,
1027+
CspReportToEndpoints,
1028+
CspReportingEndpoints,
1029+
CspReportingInfrastructure,
10211030
CustomDomain,
10221031
CustomDomainCustomClientIpHeader,
10231032
CustomDomainCustomClientIpHeaderEnum,
@@ -2504,13 +2513,18 @@
25042513
SynchronizeGroupsEnum,
25052514
SynchronizedGroupPayload,
25062515
TenantOidcLogoutSettings,
2516+
TenantSettingsCountryCodes,
2517+
TenantSettingsCountryCodesMode,
2518+
TenantSettingsCountryCodesModeResponse,
2519+
TenantSettingsCountryCodesResponse,
25072520
TenantSettingsDeviceFlow,
25082521
TenantSettingsDeviceFlowCharset,
25092522
TenantSettingsDynamicClientRegistrationSecurityMode,
25102523
TenantSettingsErrorPage,
25112524
TenantSettingsFlags,
25122525
TenantSettingsGuardianPage,
25132526
TenantSettingsMtls,
2527+
TenantSettingsNullableSecurityHeaders,
25142528
TenantSettingsPasswordPage,
25152529
TenantSettingsResourceParameterProfile,
25162530
TenantSettingsSessions,
@@ -2541,12 +2555,7 @@
25412555
UpdateBotDetectionSettingsResponseContent,
25422556
UpdateBrandingColors,
25432557
UpdateBrandingFont,
2544-
UpdateBrandingIdentifiers,
2545-
UpdateBrandingLoginDisplayEnum,
25462558
UpdateBrandingPageBackground,
2547-
UpdateBrandingPhoneDisplay,
2548-
UpdateBrandingPhoneFormattingEnum,
2549-
UpdateBrandingPhoneMaskingEnum,
25502559
UpdateBrandingPhoneProviderResponseContent,
25512560
UpdateBrandingResponseContent,
25522561
UpdateBrandingThemeResponseContent,
@@ -2716,6 +2725,8 @@
27162725
VerifyEmailTicketResponseContent,
27172726
X509CertificateCredential,
27182727
X509CertificateCredentialTypeEnum,
2728+
XssProtectionConfig,
2729+
XssProtectionMode,
27192730
)
27202731
from .errors import (
27212732
BadRequestError,
@@ -2881,12 +2892,7 @@
28812892
"BotDetectionMonitoringModeEnabled": ".types",
28822893
"BrandingColors": ".types",
28832894
"BrandingFont": ".types",
2884-
"BrandingIdentifiers": ".types",
2885-
"BrandingLoginDisplayEnum": ".types",
28862895
"BrandingPageBackground": ".types",
2887-
"BrandingPhoneDisplay": ".types",
2888-
"BrandingPhoneFormattingEnum": ".types",
2889-
"BrandingPhoneMaskingEnum": ".types",
28902896
"BrandingThemeBorders": ".types",
28912897
"BrandingThemeBordersButtonsStyleEnum": ".types",
28922898
"BrandingThemeBordersInputsStyleEnum": ".types",
@@ -3192,6 +3198,7 @@
31923198
"ConnectionId": ".types",
31933199
"ConnectionIdTokenEncryptionAlgValuesSupported": ".types",
31943200
"ConnectionIdTokenEncryptionEncValuesSupported": ".types",
3201+
"ConnectionIdTokenSessionExpirySupported": ".types",
31953202
"ConnectionIdTokenSignedResponseAlgEnum": ".types",
31963203
"ConnectionIdTokenSignedResponseAlgs": ".types",
31973204
"ConnectionIdTokenSigningAlgValuesSupported": ".types",
@@ -3548,6 +3555,7 @@
35483555
"ConnectionWaadProtocol": ".types",
35493556
"ConnectionWaadProtocolEnumAzureAd": ".types",
35503557
"ConnectionsMetadata": ".types",
3558+
"ContentSecurityPolicyConfig": ".types",
35513559
"ContentTooLargeError": ".errors",
35523560
"CreateActionModuleResponseContent": ".types",
35533561
"CreateActionModuleVersionResponseContent": ".types",
@@ -3805,6 +3813,18 @@
38053813
"CreatedUserAuthenticationMethodTypeEnum": ".types",
38063814
"CredentialDeviceTypeEnum": ".types",
38073815
"CredentialId": ".types",
3816+
"CspDirectives": ".types",
3817+
"CspFlag": ".types",
3818+
"CspFlags": ".types",
3819+
"CspPolicies": ".types",
3820+
"CspPolicy": ".types",
3821+
"CspPolicyMode": ".types",
3822+
"CspPolicyReporting": ".types",
3823+
"CspReportTo": ".types",
3824+
"CspReportToEndpoint": ".types",
3825+
"CspReportToEndpoints": ".types",
3826+
"CspReportingEndpoints": ".types",
3827+
"CspReportingInfrastructure": ".types",
38083828
"CustomDomain": ".types",
38093829
"CustomDomainHeader": ".management_client",
38103830
"CustomDomainCustomClientIpHeader": ".types",
@@ -5303,13 +5323,18 @@
53035323
"SynchronizeGroupsEnum": ".types",
53045324
"SynchronizedGroupPayload": ".types",
53055325
"TenantOidcLogoutSettings": ".types",
5326+
"TenantSettingsCountryCodes": ".types",
5327+
"TenantSettingsCountryCodesMode": ".types",
5328+
"TenantSettingsCountryCodesModeResponse": ".types",
5329+
"TenantSettingsCountryCodesResponse": ".types",
53065330
"TenantSettingsDeviceFlow": ".types",
53075331
"TenantSettingsDeviceFlowCharset": ".types",
53085332
"TenantSettingsDynamicClientRegistrationSecurityMode": ".types",
53095333
"TenantSettingsErrorPage": ".types",
53105334
"TenantSettingsFlags": ".types",
53115335
"TenantSettingsGuardianPage": ".types",
53125336
"TenantSettingsMtls": ".types",
5337+
"TenantSettingsNullableSecurityHeaders": ".types",
53135338
"TenantSettingsPasswordPage": ".types",
53145339
"TenantSettingsResourceParameterProfile": ".types",
53155340
"TenantSettingsSessions": ".types",
@@ -5343,12 +5368,7 @@
53435368
"UpdateBotDetectionSettingsResponseContent": ".types",
53445369
"UpdateBrandingColors": ".types",
53455370
"UpdateBrandingFont": ".types",
5346-
"UpdateBrandingIdentifiers": ".types",
5347-
"UpdateBrandingLoginDisplayEnum": ".types",
53485371
"UpdateBrandingPageBackground": ".types",
5349-
"UpdateBrandingPhoneDisplay": ".types",
5350-
"UpdateBrandingPhoneFormattingEnum": ".types",
5351-
"UpdateBrandingPhoneMaskingEnum": ".types",
53525372
"UpdateBrandingPhoneProviderResponseContent": ".types",
53535373
"UpdateBrandingResponseContent": ".types",
53545374
"UpdateBrandingThemeResponseContent": ".types",
@@ -5518,6 +5538,8 @@
55185538
"VerifyEmailTicketResponseContent": ".types",
55195539
"X509CertificateCredential": ".types",
55205540
"X509CertificateCredentialTypeEnum": ".types",
5541+
"XssProtectionConfig": ".types",
5542+
"XssProtectionMode": ".types",
55215543
"__version__": ".version",
55225544
"actions": ".actions",
55235545
"anomaly": ".anomaly",
@@ -5684,12 +5706,7 @@ def __dir__():
56845706
"BotDetectionMonitoringModeEnabled",
56855707
"BrandingColors",
56865708
"BrandingFont",
5687-
"BrandingIdentifiers",
5688-
"BrandingLoginDisplayEnum",
56895709
"BrandingPageBackground",
5690-
"BrandingPhoneDisplay",
5691-
"BrandingPhoneFormattingEnum",
5692-
"BrandingPhoneMaskingEnum",
56935710
"BrandingThemeBorders",
56945711
"BrandingThemeBordersButtonsStyleEnum",
56955712
"BrandingThemeBordersInputsStyleEnum",
@@ -5995,6 +6012,7 @@ def __dir__():
59956012
"ConnectionId",
59966013
"ConnectionIdTokenEncryptionAlgValuesSupported",
59976014
"ConnectionIdTokenEncryptionEncValuesSupported",
6015+
"ConnectionIdTokenSessionExpirySupported",
59986016
"ConnectionIdTokenSignedResponseAlgEnum",
59996017
"ConnectionIdTokenSignedResponseAlgs",
60006018
"ConnectionIdTokenSigningAlgValuesSupported",
@@ -6351,6 +6369,7 @@ def __dir__():
63516369
"ConnectionWaadProtocol",
63526370
"ConnectionWaadProtocolEnumAzureAd",
63536371
"ConnectionsMetadata",
6372+
"ContentSecurityPolicyConfig",
63546373
"ContentTooLargeError",
63556374
"CreateActionModuleResponseContent",
63566375
"CreateActionModuleVersionResponseContent",
@@ -6608,6 +6627,18 @@ def __dir__():
66086627
"CreatedUserAuthenticationMethodTypeEnum",
66096628
"CredentialDeviceTypeEnum",
66106629
"CredentialId",
6630+
"CspDirectives",
6631+
"CspFlag",
6632+
"CspFlags",
6633+
"CspPolicies",
6634+
"CspPolicy",
6635+
"CspPolicyMode",
6636+
"CspPolicyReporting",
6637+
"CspReportTo",
6638+
"CspReportToEndpoint",
6639+
"CspReportToEndpoints",
6640+
"CspReportingEndpoints",
6641+
"CspReportingInfrastructure",
66116642
"CustomDomain",
66126643
"CustomDomainCustomClientIpHeader",
66136644
"CustomDomainCustomClientIpHeaderEnum",
@@ -8105,13 +8136,18 @@ def __dir__():
81058136
"SynchronizeGroupsEnum",
81068137
"SynchronizedGroupPayload",
81078138
"TenantOidcLogoutSettings",
8139+
"TenantSettingsCountryCodes",
8140+
"TenantSettingsCountryCodesMode",
8141+
"TenantSettingsCountryCodesModeResponse",
8142+
"TenantSettingsCountryCodesResponse",
81088143
"TenantSettingsDeviceFlow",
81098144
"TenantSettingsDeviceFlowCharset",
81108145
"TenantSettingsDynamicClientRegistrationSecurityMode",
81118146
"TenantSettingsErrorPage",
81128147
"TenantSettingsFlags",
81138148
"TenantSettingsGuardianPage",
81148149
"TenantSettingsMtls",
8150+
"TenantSettingsNullableSecurityHeaders",
81158151
"TenantSettingsPasswordPage",
81168152
"TenantSettingsResourceParameterProfile",
81178153
"TenantSettingsSessions",
@@ -8145,12 +8181,7 @@ def __dir__():
81458181
"UpdateBotDetectionSettingsResponseContent",
81468182
"UpdateBrandingColors",
81478183
"UpdateBrandingFont",
8148-
"UpdateBrandingIdentifiers",
8149-
"UpdateBrandingLoginDisplayEnum",
81508184
"UpdateBrandingPageBackground",
8151-
"UpdateBrandingPhoneDisplay",
8152-
"UpdateBrandingPhoneFormattingEnum",
8153-
"UpdateBrandingPhoneMaskingEnum",
81548185
"UpdateBrandingPhoneProviderResponseContent",
81558186
"UpdateBrandingResponseContent",
81568187
"UpdateBrandingThemeResponseContent",
@@ -8320,6 +8351,8 @@ def __dir__():
83208351
"VerifyEmailTicketResponseContent",
83218352
"X509CertificateCredential",
83228353
"X509CertificateCredentialTypeEnum",
8354+
"XssProtectionConfig",
8355+
"XssProtectionMode",
83238356
"__version__",
83248357
"actions",
83258358
"anomaly",

src/auth0/management/branding/client.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from ..types.get_branding_response_content import GetBrandingResponseContent
1010
from ..types.update_branding_colors import UpdateBrandingColors
1111
from ..types.update_branding_font import UpdateBrandingFont
12-
from ..types.update_branding_identifiers import UpdateBrandingIdentifiers
1312
from ..types.update_branding_response_content import UpdateBrandingResponseContent
1413
from .raw_client import AsyncRawBrandingClient, RawBrandingClient
1514

@@ -72,7 +71,6 @@ def update(
7271
colors: typing.Optional[UpdateBrandingColors] = OMIT,
7372
favicon_url: typing.Optional[str] = OMIT,
7473
logo_url: typing.Optional[str] = OMIT,
75-
identifiers: typing.Optional[UpdateBrandingIdentifiers] = OMIT,
7674
font: typing.Optional[UpdateBrandingFont] = OMIT,
7775
request_options: typing.Optional[RequestOptions] = None,
7876
) -> UpdateBrandingResponseContent:
@@ -89,8 +87,6 @@ def update(
8987
logo_url : typing.Optional[str]
9088
URL for the logo. Must use HTTPS.
9189
92-
identifiers : typing.Optional[UpdateBrandingIdentifiers]
93-
9490
font : typing.Optional[UpdateBrandingFont]
9591
9692
request_options : typing.Optional[RequestOptions]
@@ -111,12 +107,7 @@ def update(
111107
client.branding.update()
112108
"""
113109
_response = self._raw_client.update(
114-
colors=colors,
115-
favicon_url=favicon_url,
116-
logo_url=logo_url,
117-
identifiers=identifiers,
118-
font=font,
119-
request_options=request_options,
110+
colors=colors, favicon_url=favicon_url, logo_url=logo_url, font=font, request_options=request_options
120111
)
121112
return _response.data
122113

@@ -204,7 +195,6 @@ async def update(
204195
colors: typing.Optional[UpdateBrandingColors] = OMIT,
205196
favicon_url: typing.Optional[str] = OMIT,
206197
logo_url: typing.Optional[str] = OMIT,
207-
identifiers: typing.Optional[UpdateBrandingIdentifiers] = OMIT,
208198
font: typing.Optional[UpdateBrandingFont] = OMIT,
209199
request_options: typing.Optional[RequestOptions] = None,
210200
) -> UpdateBrandingResponseContent:
@@ -221,8 +211,6 @@ async def update(
221211
logo_url : typing.Optional[str]
222212
URL for the logo. Must use HTTPS.
223213
224-
identifiers : typing.Optional[UpdateBrandingIdentifiers]
225-
226214
font : typing.Optional[UpdateBrandingFont]
227215
228216
request_options : typing.Optional[RequestOptions]
@@ -251,12 +239,7 @@ async def main() -> None:
251239
asyncio.run(main())
252240
"""
253241
_response = await self._raw_client.update(
254-
colors=colors,
255-
favicon_url=favicon_url,
256-
logo_url=logo_url,
257-
identifiers=identifiers,
258-
font=font,
259-
request_options=request_options,
242+
colors=colors, favicon_url=favicon_url, logo_url=logo_url, font=font, request_options=request_options
260243
)
261244
return _response.data
262245

0 commit comments

Comments
 (0)