| 1 |
|
| 2 |
|
| 3 |
import typing |
| 4 |
|
| 5 |
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper |
| 6 |
from ...core.request_options import RequestOptions |
| 7 |
from ...types.default_token_quota import DefaultTokenQuota |
| 8 |
from ...types.get_tenant_settings_response_content import GetTenantSettingsResponseContent |
| 9 |
from ...types.session_cookie_schema import SessionCookieSchema |
| 10 |
from ...types.tenant_oidc_logout_settings import TenantOidcLogoutSettings |
| 11 |
from ...types.tenant_settings_country_codes import TenantSettingsCountryCodes |
| 12 |
from ...types.tenant_settings_device_flow import TenantSettingsDeviceFlow |
| 13 |
from ...types.tenant_settings_dynamic_client_registration_security_mode import ( |
| 14 |
TenantSettingsDynamicClientRegistrationSecurityMode, |
| 15 |
) |
| 16 |
from ...types.tenant_settings_error_page import TenantSettingsErrorPage |
| 17 |
from ...types.tenant_settings_flags import TenantSettingsFlags |
| 18 |
from ...types.tenant_settings_guardian_page import TenantSettingsGuardianPage |
| 19 |
from ...types.tenant_settings_mtls import TenantSettingsMtls |
| 20 |
from ...types.tenant_settings_nullable_security_headers import TenantSettingsNullableSecurityHeaders |
| 21 |
from ...types.tenant_settings_password_page import TenantSettingsPasswordPage |
| 22 |
from ...types.tenant_settings_resource_parameter_profile import TenantSettingsResourceParameterProfile |
| 23 |
from ...types.tenant_settings_sessions import TenantSettingsSessions |
| 24 |
from ...types.tenant_settings_supported_locales_enum import TenantSettingsSupportedLocalesEnum |
| 25 |
from ...types.update_tenant_settings_response_content import UpdateTenantSettingsResponseContent |
| 26 |
from .raw_client import AsyncRawSettingsClient, RawSettingsClient |
| 27 |
|
| 28 |
|
| 29 |
OMIT = typing.cast(typing.Any, ...) |
| 30 |
|
| 31 |
|
| 32 |
class SettingsClient: |
| 33 |
def __init__(self, *, client_wrapper: SyncClientWrapper): |
| 34 |
self._raw_client = RawSettingsClient(client_wrapper=client_wrapper) |
| 35 |
|
| 36 |
@property |
| 37 |
def with_raw_response(self) -> RawSettingsClient: |
| 38 |
""" |
| 39 |
Retrieves a raw implementation of this client that returns raw responses. |
| 40 |
|
| 41 |
Returns |
| 42 |
------- |
| 43 |
RawSettingsClient |
| 44 |
""" |
| 45 |
return self._raw_client |
| 46 |
|
| 47 |
def get( |
| 48 |
self, |
| 49 |
*, |
| 50 |
fields: typing.Optional[str] = None, |
| 51 |
include_fields: typing.Optional[bool] = None, |
| 52 |
request_options: typing.Optional[RequestOptions] = None, |
| 53 |
) -> GetTenantSettingsResponseContent: |
| 54 |
""" |
| 55 |
Retrieve tenant settings. A list of fields to include or exclude may also be specified. |
| 56 |
|
| 57 |
Parameters |
| 58 |
---------- |
| 59 |
fields : typing.Optional[str] |
| 60 |
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. |
| 61 |
|
| 62 |
include_fields : typing.Optional[bool] |
| 63 |
Whether specified fields are to be included (true) or excluded (false). |
| 64 |
|
| 65 |
request_options : typing.Optional[RequestOptions] |
| 66 |
Request-specific configuration. |
| 67 |
|
| 68 |
Returns |
| 69 |
------- |
| 70 |
GetTenantSettingsResponseContent |
| 71 |
Tenant settings successfully retrieved. |
| 72 |
|
| 73 |
Examples |
| 74 |
-------- |
| 75 |
from auth0 import Auth0 |
| 76 |
|
| 77 |
client = Auth0( |
| 78 |
token="YOUR_TOKEN", |
| 79 |
) |
| 80 |
client.tenants.settings.get( |
| 81 |
fields="fields", |
| 82 |
include_fields=True, |
| 83 |
) |
| 84 |
""" |
| 85 |
_response = self._raw_client.get(fields=fields, include_fields=include_fields, request_options=request_options) |
| 86 |
return _response.data |
| 87 |
|
| 88 |
def update( |
| 89 |
self, |
| 90 |
*, |
| 91 |
change_password: typing.Optional[TenantSettingsPasswordPage] = OMIT, |
| 92 |
device_flow: typing.Optional[TenantSettingsDeviceFlow] = OMIT, |
| 93 |
guardian_mfa_page: typing.Optional[TenantSettingsGuardianPage] = OMIT, |
| 94 |
default_audience: typing.Optional[str] = OMIT, |
| 95 |
default_directory: typing.Optional[str] = OMIT, |
| 96 |
error_page: typing.Optional[TenantSettingsErrorPage] = OMIT, |
| 97 |
default_token_quota: typing.Optional[DefaultTokenQuota] = OMIT, |
| 98 |
flags: typing.Optional[TenantSettingsFlags] = OMIT, |
| 99 |
friendly_name: typing.Optional[str] = OMIT, |
| 100 |
picture_url: typing.Optional[str] = OMIT, |
| 101 |
support_email: typing.Optional[str] = OMIT, |
| 102 |
support_url: typing.Optional[str] = OMIT, |
| 103 |
allowed_logout_urls: typing.Optional[typing.Sequence[str]] = OMIT, |
| 104 |
session_lifetime: typing.Optional[int] = OMIT, |
| 105 |
session_lifetime_in_minutes: typing.Optional[int] = OMIT, |
| 106 |
idle_session_lifetime: typing.Optional[int] = OMIT, |
| 107 |
idle_session_lifetime_in_minutes: typing.Optional[int] = OMIT, |
| 108 |
ephemeral_session_lifetime: typing.Optional[int] = OMIT, |
| 109 |
idle_ephemeral_session_lifetime: typing.Optional[int] = OMIT, |
| 110 |
ephemeral_session_lifetime_in_minutes: typing.Optional[int] = OMIT, |
| 111 |
idle_ephemeral_session_lifetime_in_minutes: typing.Optional[int] = OMIT, |
| 112 |
sandbox_version: typing.Optional[str] = OMIT, |
| 113 |
legacy_sandbox_version: typing.Optional[str] = OMIT, |
| 114 |
default_redirection_uri: typing.Optional[str] = OMIT, |
| 115 |
enabled_locales: typing.Optional[typing.Sequence[TenantSettingsSupportedLocalesEnum]] = OMIT, |
| 116 |
security_headers: typing.Optional[TenantSettingsNullableSecurityHeaders] = OMIT, |
| 117 |
session_cookie: typing.Optional[SessionCookieSchema] = OMIT, |
| 118 |
sessions: typing.Optional[TenantSettingsSessions] = OMIT, |
| 119 |
oidc_logout: typing.Optional[TenantOidcLogoutSettings] = OMIT, |
| 120 |
customize_mfa_in_postlogin_action: typing.Optional[bool] = OMIT, |
| 121 |
allow_organization_name_in_authentication_api: typing.Optional[bool] = OMIT, |
| 122 |
acr_values_supported: typing.Optional[typing.Sequence[str]] = OMIT, |
| 123 |
mtls: typing.Optional[TenantSettingsMtls] = OMIT, |
| 124 |
pushed_authorization_requests_supported: typing.Optional[bool] = OMIT, |
| 125 |
authorization_response_iss_parameter_supported: typing.Optional[bool] = OMIT, |
| 126 |
skip_non_verifiable_callback_uri_confirmation_prompt: typing.Optional[bool] = OMIT, |
| 127 |
resource_parameter_profile: typing.Optional[TenantSettingsResourceParameterProfile] = OMIT, |
| 128 |
client_id_metadata_document_supported: typing.Optional[bool] = OMIT, |
| 129 |
enable_ai_guide: typing.Optional[bool] = OMIT, |
| 130 |
phone_consolidated_experience: typing.Optional[bool] = OMIT, |
| 131 |
include_session_metadata_in_tenant_logs: typing.Optional[bool] = OMIT, |
| 132 |
dynamic_client_registration_security_mode: typing.Optional[ |
| 133 |
TenantSettingsDynamicClientRegistrationSecurityMode |
| 134 |
] = OMIT, |
| 135 |
country_codes: typing.Optional[TenantSettingsCountryCodes] = OMIT, |
| 136 |
request_options: typing.Optional[RequestOptions] = None, |
| 137 |
) -> UpdateTenantSettingsResponseContent: |
| 138 |
""" |
| 139 |
Update settings for a tenant. |
| 140 |
|
| 141 |
Parameters |
| 142 |
---------- |
| 143 |
change_password : typing.Optional[TenantSettingsPasswordPage] |
| 144 |
|
| 145 |
device_flow : typing.Optional[TenantSettingsDeviceFlow] |
| 146 |
Device Flow configuration. |
| 147 |
|
| 148 |
guardian_mfa_page : typing.Optional[TenantSettingsGuardianPage] |
| 149 |
|
| 150 |
default_audience : typing.Optional[str] |
| 151 |
Default audience for API Authorization. |
| 152 |
|
| 153 |
default_directory : typing.Optional[str] |
| 154 |
Name of connection used for password grants at the `/token` endpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS. |
| 155 |
|
| 156 |
error_page : typing.Optional[TenantSettingsErrorPage] |
| 157 |
|
| 158 |
default_token_quota : typing.Optional[DefaultTokenQuota] |
| 159 |
|
| 160 |
flags : typing.Optional[TenantSettingsFlags] |
| 161 |
|
| 162 |
friendly_name : typing.Optional[str] |
| 163 |
Friendly name for this tenant. |
| 164 |
|
| 165 |
picture_url : typing.Optional[str] |
| 166 |
URL of logo to be shown for this tenant (recommended size: 150x150) |
| 167 |
|
| 168 |
support_email : typing.Optional[str] |
| 169 |
End-user support email. |
| 170 |
|
| 171 |
support_url : typing.Optional[str] |
| 172 |
End-user support url. |
| 173 |
|
| 174 |
allowed_logout_urls : typing.Optional[typing.Sequence[str]] |
| 175 |
URLs that are valid to redirect to after logout from Auth0. |
| 176 |
|
| 177 |
session_lifetime : typing.Optional[int] |
| 178 |
Number of hours a session will stay valid. |
| 179 |
|
| 180 |
session_lifetime_in_minutes : typing.Optional[int] |
| 181 |
Number of minutes a session will stay valid. Cannot be specified together with `session_lifetime`. |
| 182 |
|
| 183 |
idle_session_lifetime : typing.Optional[int] |
| 184 |
Number of hours for which a session can be inactive before the user must log in again. |
| 185 |
|
| 186 |
idle_session_lifetime_in_minutes : typing.Optional[int] |
| 187 |
Number of minutes a session can be inactive before the user must log in again. Cannot be specified together with `idle_session_lifetime`. |
| 188 |
|
| 189 |
ephemeral_session_lifetime : typing.Optional[int] |
| 190 |
Number of hours an ephemeral (non-persistent) session will stay valid. |
| 191 |
|
| 192 |
idle_ephemeral_session_lifetime : typing.Optional[int] |
| 193 |
Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again. |
| 194 |
|
| 195 |
ephemeral_session_lifetime_in_minutes : typing.Optional[int] |
| 196 |
Number of minutes an ephemeral (non-persistent) session will stay valid. Cannot be specified together with `ephemeral_session_lifetime`. |
| 197 |
|
| 198 |
idle_ephemeral_session_lifetime_in_minutes : typing.Optional[int] |
| 199 |
Number of minutes an ephemeral (non-persistent) session can be inactive before the user must log in again. Cannot be specified together with `idle_ephemeral_session_lifetime`. |
| 200 |
|
| 201 |
sandbox_version : typing.Optional[str] |
| 202 |
Selected sandbox version for the extensibility environment |
| 203 |
|
| 204 |
legacy_sandbox_version : typing.Optional[str] |
| 205 |
Selected legacy sandbox version for the extensibility environment |
| 206 |
|
| 207 |
default_redirection_uri : typing.Optional[str] |
| 208 |
The default absolute redirection uri, must be https |
| 209 |
|
| 210 |
enabled_locales : typing.Optional[typing.Sequence[TenantSettingsSupportedLocalesEnum]] |
| 211 |
Supported locales for the user interface |
| 212 |
|
| 213 |
security_headers : typing.Optional[TenantSettingsNullableSecurityHeaders] |
| 214 |
|
| 215 |
session_cookie : typing.Optional[SessionCookieSchema] |
| 216 |
|
| 217 |
sessions : typing.Optional[TenantSettingsSessions] |
| 218 |
|
| 219 |
oidc_logout : typing.Optional[TenantOidcLogoutSettings] |
| 220 |
|
| 221 |
customize_mfa_in_postlogin_action : typing.Optional[bool] |
| 222 |
Whether to enable flexible factors for MFA in the PostLogin action |
| 223 |
|
| 224 |
allow_organization_name_in_authentication_api : typing.Optional[bool] |
| 225 |
Whether to accept an organization name instead of an ID on auth endpoints |
| 226 |
|
| 227 |
acr_values_supported : typing.Optional[typing.Sequence[str]] |
| 228 |
Supported ACR values |
| 229 |
|
| 230 |
mtls : typing.Optional[TenantSettingsMtls] |
| 231 |
|
| 232 |
pushed_authorization_requests_supported : typing.Optional[bool] |
| 233 |
Enables the use of Pushed Authorization Requests |
| 234 |
|
| 235 |
authorization_response_iss_parameter_supported : typing.Optional[bool] |
| 236 |
Supports iss parameter in authorization responses |
| 237 |
|
| 238 |
skip_non_verifiable_callback_uri_confirmation_prompt : typing.Optional[bool] |
| 239 |
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`). |
| 240 |
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. |
| 241 |
See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. |
| 242 |
|
| 243 |
resource_parameter_profile : typing.Optional[TenantSettingsResourceParameterProfile] |
| 244 |
|
| 245 |
client_id_metadata_document_supported : typing.Optional[bool] |
| 246 |
Whether the authorization server supports retrieving client metadata from a client_id URL. |
| 247 |
|
| 248 |
enable_ai_guide : typing.Optional[bool] |
| 249 |
Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. |
| 250 |
|
| 251 |
phone_consolidated_experience : typing.Optional[bool] |
| 252 |
Whether Phone Consolidated Experience is enabled for this tenant. |
| 253 |
|
| 254 |
include_session_metadata_in_tenant_logs : typing.Optional[bool] |
| 255 |
Whether session metadata is included in specific tenant logs (slo, oidc_backchannel_logout_failed, oidc_backchannel_logout_succeeded). |
| 256 |
|
| 257 |
dynamic_client_registration_security_mode : typing.Optional[TenantSettingsDynamicClientRegistrationSecurityMode] |
| 258 |
|
| 259 |
country_codes : typing.Optional[TenantSettingsCountryCodes] |
| 260 |
|
| 261 |
request_options : typing.Optional[RequestOptions] |
| 262 |
Request-specific configuration. |
| 263 |
|
| 264 |
Returns |
| 265 |
------- |
| 266 |
UpdateTenantSettingsResponseContent |
| 267 |
Tenant settings successfully updated. |
| 268 |
|
| 269 |
Examples |
| 270 |
-------- |
| 271 |
from auth0 import Auth0 |
| 272 |
|
| 273 |
client = Auth0( |
| 274 |
token="YOUR_TOKEN", |
| 275 |
) |
| 276 |
client.tenants.settings.update() |
| 277 |
""" |
| 278 |
_response = self._raw_client.update( |
| 279 |
change_password=change_password, |
| 280 |
device_flow=device_flow, |
| 281 |
guardian_mfa_page=guardian_mfa_page, |
| 282 |
default_audience=default_audience, |
| 283 |
default_directory=default_directory, |
| 284 |
error_page=error_page, |
| 285 |
default_token_quota=default_token_quota, |
| 286 |
flags=flags, |
| 287 |
friendly_name=friendly_name, |
| 288 |
picture_url=picture_url, |
| 289 |
support_email=support_email, |
| 290 |
support_url=support_url, |
| 291 |
allowed_logout_urls=allowed_logout_urls, |
| 292 |
session_lifetime=session_lifetime, |
| 293 |
session_lifetime_in_minutes=session_lifetime_in_minutes, |
| 294 |
idle_session_lifetime=idle_session_lifetime, |
| 295 |
idle_session_lifetime_in_minutes=idle_session_lifetime_in_minutes, |
| 296 |
ephemeral_session_lifetime=ephemeral_session_lifetime, |
| 297 |
idle_ephemeral_session_lifetime=idle_ephemeral_session_lifetime, |
| 298 |
ephemeral_session_lifetime_in_minutes=ephemeral_session_lifetime_in_minutes, |
| 299 |
idle_ephemeral_session_lifetime_in_minutes=idle_ephemeral_session_lifetime_in_minutes, |
| 300 |
sandbox_version=sandbox_version, |
| 301 |
legacy_sandbox_version=legacy_sandbox_version, |
| 302 |
default_redirection_uri=default_redirection_uri, |
| 303 |
enabled_locales=enabled_locales, |
| 304 |
security_headers=security_headers, |
| 305 |
session_cookie=session_cookie, |
| 306 |
sessions=sessions, |
| 307 |
oidc_logout=oidc_logout, |
| 308 |
customize_mfa_in_postlogin_action=customize_mfa_in_postlogin_action, |
| 309 |
allow_organization_name_in_authentication_api=allow_organization_name_in_authentication_api, |
| 310 |
acr_values_supported=acr_values_supported, |
| 311 |
mtls=mtls, |
| 312 |
pushed_authorization_requests_supported=pushed_authorization_requests_supported, |
| 313 |
authorization_response_iss_parameter_supported=authorization_response_iss_parameter_supported, |
| 314 |
skip_non_verifiable_callback_uri_confirmation_prompt=skip_non_verifiable_callback_uri_confirmation_prompt, |
| 315 |
resource_parameter_profile=resource_parameter_profile, |
| 316 |
client_id_metadata_document_supported=client_id_metadata_document_supported, |
| 317 |
enable_ai_guide=enable_ai_guide, |
| 318 |
phone_consolidated_experience=phone_consolidated_experience, |
| 319 |
include_session_metadata_in_tenant_logs=include_session_metadata_in_tenant_logs, |
| 320 |
dynamic_client_registration_security_mode=dynamic_client_registration_security_mode, |
| 321 |
country_codes=country_codes, |
| 322 |
request_options=request_options, |
| 323 |
) |
| 324 |
return _response.data |
| 325 |
|
| 326 |
|
| 327 |
class AsyncSettingsClient: |
| 328 |
def __init__(self, *, client_wrapper: AsyncClientWrapper): |
| 329 |
self._raw_client = AsyncRawSettingsClient(client_wrapper=client_wrapper) |
| 330 |
|
| 331 |
@property |
| 332 |
def with_raw_response(self) -> AsyncRawSettingsClient: |
| 333 |
""" |
| 334 |
Retrieves a raw implementation of this client that returns raw responses. |
| 335 |
|
| 336 |
Returns |
| 337 |
------- |
| 338 |
AsyncRawSettingsClient |
| 339 |
""" |
| 340 |
return self._raw_client |
| 341 |
|
| 342 |
async def get( |
| 343 |
self, |
| 344 |
*, |
| 345 |
fields: typing.Optional[str] = None, |
| 346 |
include_fields: typing.Optional[bool] = None, |
| 347 |
request_options: typing.Optional[RequestOptions] = None, |
| 348 |
) -> GetTenantSettingsResponseContent: |
| 349 |
""" |
| 350 |
Retrieve tenant settings. A list of fields to include or exclude may also be specified. |
| 351 |
|
| 352 |
Parameters |
| 353 |
---------- |
| 354 |
fields : typing.Optional[str] |
| 355 |
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. |
| 356 |
|
| 357 |
include_fields : typing.Optional[bool] |
| 358 |
Whether specified fields are to be included (true) or excluded (false). |
| 359 |
|
| 360 |
request_options : typing.Optional[RequestOptions] |
| 361 |
Request-specific configuration. |
| 362 |
|
| 363 |
Returns |
| 364 |
------- |
| 365 |
GetTenantSettingsResponseContent |
| 366 |
Tenant settings successfully retrieved. |
| 367 |
|
| 368 |
Examples |
| 369 |
-------- |
| 370 |
import asyncio |
| 371 |
|
| 372 |
from auth0 import AsyncAuth0 |
| 373 |
|
| 374 |
client = AsyncAuth0( |
| 375 |
token="YOUR_TOKEN", |
| 376 |
) |
| 377 |
|
| 378 |
|
| 379 |
async def main() -> None: |
| 380 |
await client.tenants.settings.get( |
| 381 |
fields="fields", |
| 382 |
include_fields=True, |
| 383 |
) |
| 384 |
|
| 385 |
|
| 386 |
asyncio.run(main()) |
| 387 |
""" |
| 388 |
_response = await self._raw_client.get( |
| 389 |
fields=fields, include_fields=include_fields, request_options=request_options |
| 390 |
) |
| 391 |
return _response.data |
| 392 |
|
| 393 |
async def update( |
| 394 |
self, |
| 395 |
*, |
| 396 |
change_password: typing.Optional[TenantSettingsPasswordPage] = OMIT, |
| 397 |
device_flow: typing.Optional[TenantSettingsDeviceFlow] = OMIT, |
| 398 |
guardian_mfa_page: typing.Optional[TenantSettingsGuardianPage] = OMIT, |
| 399 |
default_audience: typing.Optional[str] = OMIT, |
| 400 |
default_directory: typing.Optional[str] = OMIT, |
| 401 |
error_page: typing.Optional[TenantSettingsErrorPage] = OMIT, |
| 402 |
default_token_quota: typing.Optional[DefaultTokenQuota] = OMIT, |
| 403 |
flags: typing.Optional[TenantSettingsFlags] = OMIT, |
| 404 |
friendly_name: typing.Optional[str] = OMIT, |
| 405 |
picture_url: typing.Optional[str] = OMIT, |
| 406 |
support_email: typing.Optional[str] = OMIT, |
| 407 |
support_url: typing.Optional[str] = OMIT, |
| 408 |
allowed_logout_urls: typing.Optional[typing.Sequence[str]] = OMIT, |
| 409 |
session_lifetime: typing.Optional[int] = OMIT, |
| 410 |
session_lifetime_in_minutes: typing.Optional[int] = OMIT, |
| 411 |
idle_session_lifetime: typing.Optional[int] = OMIT, |
| 412 |
idle_session_lifetime_in_minutes: typing.Optional[int] = OMIT, |
| 413 |
ephemeral_session_lifetime: typing.Optional[int] = OMIT, |
| 414 |
idle_ephemeral_session_lifetime: typing.Optional[int] = OMIT, |
| 415 |
ephemeral_session_lifetime_in_minutes: typing.Optional[int] = OMIT, |
| 416 |
idle_ephemeral_session_lifetime_in_minutes: typing.Optional[int] = OMIT, |
| 417 |
sandbox_version: typing.Optional[str] = OMIT, |
| 418 |
legacy_sandbox_version: typing.Optional[str] = OMIT, |
| 419 |
default_redirection_uri: typing.Optional[str] = OMIT, |
| 420 |
enabled_locales: typing.Optional[typing.Sequence[TenantSettingsSupportedLocalesEnum]] = OMIT, |
| 421 |
security_headers: typing.Optional[TenantSettingsNullableSecurityHeaders] = OMIT, |
| 422 |
session_cookie: typing.Optional[SessionCookieSchema] = OMIT, |
| 423 |
sessions: typing.Optional[TenantSettingsSessions] = OMIT, |
| 424 |
oidc_logout: typing.Optional[TenantOidcLogoutSettings] = OMIT, |
| 425 |
customize_mfa_in_postlogin_action: typing.Optional[bool] = OMIT, |
| 426 |
allow_organization_name_in_authentication_api: typing.Optional[bool] = OMIT, |
| 427 |
acr_values_supported: typing.Optional[typing.Sequence[str]] = OMIT, |
| 428 |
mtls: typing.Optional[TenantSettingsMtls] = OMIT, |
| 429 |
pushed_authorization_requests_supported: typing.Optional[bool] = OMIT, |
| 430 |
authorization_response_iss_parameter_supported: typing.Optional[bool] = OMIT, |
| 431 |
skip_non_verifiable_callback_uri_confirmation_prompt: typing.Optional[bool] = OMIT, |
| 432 |
resource_parameter_profile: typing.Optional[TenantSettingsResourceParameterProfile] = OMIT, |
| 433 |
client_id_metadata_document_supported: typing.Optional[bool] = OMIT, |
| 434 |
enable_ai_guide: typing.Optional[bool] = OMIT, |
| 435 |
phone_consolidated_experience: typing.Optional[bool] = OMIT, |
| 436 |
include_session_metadata_in_tenant_logs: typing.Optional[bool] = OMIT, |
| 437 |
dynamic_client_registration_security_mode: typing.Optional[ |
| 438 |
TenantSettingsDynamicClientRegistrationSecurityMode |
| 439 |
] = OMIT, |
| 440 |
country_codes: typing.Optional[TenantSettingsCountryCodes] = OMIT, |
| 441 |
request_options: typing.Optional[RequestOptions] = None, |
| 442 |
) -> UpdateTenantSettingsResponseContent: |
| 443 |
""" |
| 444 |
Update settings for a tenant. |
| 445 |
|
| 446 |
Parameters |
| 447 |
---------- |
| 448 |
change_password : typing.Optional[TenantSettingsPasswordPage] |
| 449 |
|
| 450 |
device_flow : typing.Optional[TenantSettingsDeviceFlow] |
| 451 |
Device Flow configuration. |
| 452 |
|
| 453 |
guardian_mfa_page : typing.Optional[TenantSettingsGuardianPage] |
| 454 |
|
| 455 |
default_audience : typing.Optional[str] |
| 456 |
Default audience for API Authorization. |
| 457 |
|
| 458 |
default_directory : typing.Optional[str] |
| 459 |
Name of connection used for password grants at the `/token` endpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS. |
| 460 |
|
| 461 |
error_page : typing.Optional[TenantSettingsErrorPage] |
| 462 |
|
| 463 |
default_token_quota : typing.Optional[DefaultTokenQuota] |
| 464 |
|
| 465 |
flags : typing.Optional[TenantSettingsFlags] |
| 466 |
|
| 467 |
friendly_name : typing.Optional[str] |
| 468 |
Friendly name for this tenant. |
| 469 |
|
| 470 |
picture_url : typing.Optional[str] |
| 471 |
URL of logo to be shown for this tenant (recommended size: 150x150) |
| 472 |
|
| 473 |
support_email : typing.Optional[str] |
| 474 |
End-user support email. |
| 475 |
|
| 476 |
support_url : typing.Optional[str] |
| 477 |
End-user support url. |
| 478 |
|
| 479 |
allowed_logout_urls : typing.Optional[typing.Sequence[str]] |
| 480 |
URLs that are valid to redirect to after logout from Auth0. |
| 481 |
|
| 482 |
session_lifetime : typing.Optional[int] |
| 483 |
Number of hours a session will stay valid. |
| 484 |
|
| 485 |
session_lifetime_in_minutes : typing.Optional[int] |
| 486 |
Number of minutes a session will stay valid. Cannot be specified together with `session_lifetime`. |
| 487 |
|
| 488 |
idle_session_lifetime : typing.Optional[int] |
| 489 |
Number of hours for which a session can be inactive before the user must log in again. |
| 490 |
|
| 491 |
idle_session_lifetime_in_minutes : typing.Optional[int] |
| 492 |
Number of minutes a session can be inactive before the user must log in again. Cannot be specified together with `idle_session_lifetime`. |
| 493 |
|
| 494 |
ephemeral_session_lifetime : typing.Optional[int] |
| 495 |
Number of hours an ephemeral (non-persistent) session will stay valid. |
| 496 |
|
| 497 |
idle_ephemeral_session_lifetime : typing.Optional[int] |
| 498 |
Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again. |
| 499 |
|
| 500 |
ephemeral_session_lifetime_in_minutes : typing.Optional[int] |
| 501 |
Number of minutes an ephemeral (non-persistent) session will stay valid. Cannot be specified together with `ephemeral_session_lifetime`. |
| 502 |
|
| 503 |
idle_ephemeral_session_lifetime_in_minutes : typing.Optional[int] |
| 504 |
Number of minutes an ephemeral (non-persistent) session can be inactive before the user must log in again. Cannot be specified together with `idle_ephemeral_session_lifetime`. |
| 505 |
|
| 506 |
sandbox_version : typing.Optional[str] |
| 507 |
Selected sandbox version for the extensibility environment |
| 508 |
|
| 509 |
legacy_sandbox_version : typing.Optional[str] |
| 510 |
Selected legacy sandbox version for the extensibility environment |
| 511 |
|
| 512 |
default_redirection_uri : typing.Optional[str] |
| 513 |
The default absolute redirection uri, must be https |
| 514 |
|
| 515 |
enabled_locales : typing.Optional[typing.Sequence[TenantSettingsSupportedLocalesEnum]] |
| 516 |
Supported locales for the user interface |
| 517 |
|
| 518 |
security_headers : typing.Optional[TenantSettingsNullableSecurityHeaders] |
| 519 |
|
| 520 |
session_cookie : typing.Optional[SessionCookieSchema] |
| 521 |
|
| 522 |
sessions : typing.Optional[TenantSettingsSessions] |
| 523 |
|
| 524 |
oidc_logout : typing.Optional[TenantOidcLogoutSettings] |
| 525 |
|
| 526 |
customize_mfa_in_postlogin_action : typing.Optional[bool] |
| 527 |
Whether to enable flexible factors for MFA in the PostLogin action |
| 528 |
|
| 529 |
allow_organization_name_in_authentication_api : typing.Optional[bool] |
| 530 |
Whether to accept an organization name instead of an ID on auth endpoints |
| 531 |
|
| 532 |
acr_values_supported : typing.Optional[typing.Sequence[str]] |
| 533 |
Supported ACR values |
| 534 |
|
| 535 |
mtls : typing.Optional[TenantSettingsMtls] |
| 536 |
|
| 537 |
pushed_authorization_requests_supported : typing.Optional[bool] |
| 538 |
Enables the use of Pushed Authorization Requests |
| 539 |
|
| 540 |
authorization_response_iss_parameter_supported : typing.Optional[bool] |
| 541 |
Supports iss parameter in authorization responses |
| 542 |
|
| 543 |
skip_non_verifiable_callback_uri_confirmation_prompt : typing.Optional[bool] |
| 544 |
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`). |
| 545 |
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. |
| 546 |
See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. |
| 547 |
|
| 548 |
resource_parameter_profile : typing.Optional[TenantSettingsResourceParameterProfile] |
| 549 |
|
| 550 |
client_id_metadata_document_supported : typing.Optional[bool] |
| 551 |
Whether the authorization server supports retrieving client metadata from a client_id URL. |
| 552 |
|
| 553 |
enable_ai_guide : typing.Optional[bool] |
| 554 |
Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. |
| 555 |
|
| 556 |
phone_consolidated_experience : typing.Optional[bool] |
| 557 |
Whether Phone Consolidated Experience is enabled for this tenant. |
| 558 |
|
| 559 |
include_session_metadata_in_tenant_logs : typing.Optional[bool] |
| 560 |
Whether session metadata is included in specific tenant logs (slo, oidc_backchannel_logout_failed, oidc_backchannel_logout_succeeded). |
| 561 |
|
| 562 |
dynamic_client_registration_security_mode : typing.Optional[TenantSettingsDynamicClientRegistrationSecurityMode] |
| 563 |
|
| 564 |
country_codes : typing.Optional[TenantSettingsCountryCodes] |
| 565 |
|
| 566 |
request_options : typing.Optional[RequestOptions] |
| 567 |
Request-specific configuration. |
| 568 |
|
| 569 |
Returns |
| 570 |
------- |
| 571 |
UpdateTenantSettingsResponseContent |
| 572 |
Tenant settings successfully updated. |
| 573 |
|
| 574 |
Examples |
| 575 |
-------- |
| 576 |
import asyncio |
| 577 |
|
| 578 |
from auth0 import AsyncAuth0 |
| 579 |
|
| 580 |
client = AsyncAuth0( |
| 581 |
token="YOUR_TOKEN", |
| 582 |
) |
| 583 |
|
| 584 |
|
| 585 |
async def main() -> None: |
| 586 |
await client.tenants.settings.update() |
| 587 |
|
| 588 |
|
| 589 |
asyncio.run(main()) |
| 590 |
""" |
| 591 |
_response = await self._raw_client.update( |
| 592 |
change_password=change_password, |
| 593 |
device_flow=device_flow, |
| 594 |
guardian_mfa_page=guardian_mfa_page, |
| 595 |
default_audience=default_audience, |
| 596 |
default_directory=default_directory, |
| 597 |
error_page=error_page, |
| 598 |
default_token_quota=default_token_quota, |
| 599 |
flags=flags, |
| 600 |
friendly_name=friendly_name, |
| 601 |
picture_url=picture_url, |
| 602 |
support_email=support_email, |
| 603 |
support_url=support_url, |
| 604 |
allowed_logout_urls=allowed_logout_urls, |
| 605 |
session_lifetime=session_lifetime, |
| 606 |
session_lifetime_in_minutes=session_lifetime_in_minutes, |
| 607 |
idle_session_lifetime=idle_session_lifetime, |
| 608 |
idle_session_lifetime_in_minutes=idle_session_lifetime_in_minutes, |
| 609 |
ephemeral_session_lifetime=ephemeral_session_lifetime, |
| 610 |
idle_ephemeral_session_lifetime=idle_ephemeral_session_lifetime, |
| 611 |
ephemeral_session_lifetime_in_minutes=ephemeral_session_lifetime_in_minutes, |
| 612 |
idle_ephemeral_session_lifetime_in_minutes=idle_ephemeral_session_lifetime_in_minutes, |
| 613 |
sandbox_version=sandbox_version, |
| 614 |
legacy_sandbox_version=legacy_sandbox_version, |
| 615 |
default_redirection_uri=default_redirection_uri, |
| 616 |
enabled_locales=enabled_locales, |
| 617 |
security_headers=security_headers, |
| 618 |
session_cookie=session_cookie, |
| 619 |
sessions=sessions, |
| 620 |
oidc_logout=oidc_logout, |
| 621 |
customize_mfa_in_postlogin_action=customize_mfa_in_postlogin_action, |
| 622 |
allow_organization_name_in_authentication_api=allow_organization_name_in_authentication_api, |
| 623 |
acr_values_supported=acr_values_supported, |
| 624 |
mtls=mtls, |
| 625 |
pushed_authorization_requests_supported=pushed_authorization_requests_supported, |
| 626 |
authorization_response_iss_parameter_supported=authorization_response_iss_parameter_supported, |
| 627 |
skip_non_verifiable_callback_uri_confirmation_prompt=skip_non_verifiable_callback_uri_confirmation_prompt, |
| 628 |
resource_parameter_profile=resource_parameter_profile, |
| 629 |
client_id_metadata_document_supported=client_id_metadata_document_supported, |
| 630 |
enable_ai_guide=enable_ai_guide, |
| 631 |
phone_consolidated_experience=phone_consolidated_experience, |
| 632 |
include_session_metadata_in_tenant_logs=include_session_metadata_in_tenant_logs, |
| 633 |
dynamic_client_registration_security_mode=dynamic_client_registration_security_mode, |
| 634 |
country_codes=country_codes, |
| 635 |
request_options=request_options, |
| 636 |
) |
| 637 |
return _response.data |