| 1 |
|
| 2 |
|
| 3 |
import typing |
| 4 |
|
| 5 |
from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper |
| 6 |
from ....core.request_options import RequestOptions |
| 7 |
from ....types.get_guardian_factors_provider_apns_response_content import GetGuardianFactorsProviderApnsResponseContent |
| 8 |
from ....types.get_guardian_factors_provider_push_notification_response_content import ( |
| 9 |
GetGuardianFactorsProviderPushNotificationResponseContent, |
| 10 |
) |
| 11 |
from ....types.get_guardian_factors_provider_sns_response_content import GetGuardianFactorsProviderSnsResponseContent |
| 12 |
from ....types.guardian_factors_provider_push_notification_provider_data_enum import ( |
| 13 |
GuardianFactorsProviderPushNotificationProviderDataEnum, |
| 14 |
) |
| 15 |
from ....types.set_guardian_factors_provider_push_notification_apns_response_content import ( |
| 16 |
SetGuardianFactorsProviderPushNotificationApnsResponseContent, |
| 17 |
) |
| 18 |
from ....types.set_guardian_factors_provider_push_notification_fcm_response_content import ( |
| 19 |
SetGuardianFactorsProviderPushNotificationFcmResponseContent, |
| 20 |
) |
| 21 |
from ....types.set_guardian_factors_provider_push_notification_fcmv_1_response_content import ( |
| 22 |
SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent, |
| 23 |
) |
| 24 |
from ....types.set_guardian_factors_provider_push_notification_response_content import ( |
| 25 |
SetGuardianFactorsProviderPushNotificationResponseContent, |
| 26 |
) |
| 27 |
from ....types.set_guardian_factors_provider_push_notification_sns_response_content import ( |
| 28 |
SetGuardianFactorsProviderPushNotificationSnsResponseContent, |
| 29 |
) |
| 30 |
from ....types.update_guardian_factors_provider_push_notification_apns_response_content import ( |
| 31 |
UpdateGuardianFactorsProviderPushNotificationApnsResponseContent, |
| 32 |
) |
| 33 |
from ....types.update_guardian_factors_provider_push_notification_fcm_response_content import ( |
| 34 |
UpdateGuardianFactorsProviderPushNotificationFcmResponseContent, |
| 35 |
) |
| 36 |
from ....types.update_guardian_factors_provider_push_notification_fcmv_1_response_content import ( |
| 37 |
UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent, |
| 38 |
) |
| 39 |
from ....types.update_guardian_factors_provider_push_notification_sns_response_content import ( |
| 40 |
UpdateGuardianFactorsProviderPushNotificationSnsResponseContent, |
| 41 |
) |
| 42 |
from .raw_client import AsyncRawPushNotificationClient, RawPushNotificationClient |
| 43 |
|
| 44 |
|
| 45 |
OMIT = typing.cast(typing.Any, ...) |
| 46 |
|
| 47 |
|
| 48 |
class PushNotificationClient: |
| 49 |
def __init__(self, *, client_wrapper: SyncClientWrapper): |
| 50 |
self._raw_client = RawPushNotificationClient(client_wrapper=client_wrapper) |
| 51 |
|
| 52 |
@property |
| 53 |
def with_raw_response(self) -> RawPushNotificationClient: |
| 54 |
""" |
| 55 |
Retrieves a raw implementation of this client that returns raw responses. |
| 56 |
|
| 57 |
Returns |
| 58 |
------- |
| 59 |
RawPushNotificationClient |
| 60 |
""" |
| 61 |
return self._raw_client |
| 62 |
|
| 63 |
def get_apns_provider( |
| 64 |
self, *, request_options: typing.Optional[RequestOptions] = None |
| 65 |
) -> GetGuardianFactorsProviderApnsResponseContent: |
| 66 |
""" |
| 67 |
Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. |
| 68 |
|
| 69 |
Parameters |
| 70 |
---------- |
| 71 |
request_options : typing.Optional[RequestOptions] |
| 72 |
Request-specific configuration. |
| 73 |
|
| 74 |
Returns |
| 75 |
------- |
| 76 |
GetGuardianFactorsProviderApnsResponseContent |
| 77 |
APNS configuration successfully retrieved. |
| 78 |
|
| 79 |
Examples |
| 80 |
-------- |
| 81 |
from auth0 import Auth0 |
| 82 |
|
| 83 |
client = Auth0( |
| 84 |
token="YOUR_TOKEN", |
| 85 |
) |
| 86 |
client.guardian.factors.push_notification.get_apns_provider() |
| 87 |
""" |
| 88 |
_response = self._raw_client.get_apns_provider(request_options=request_options) |
| 89 |
return _response.data |
| 90 |
|
| 91 |
def set_apns_provider( |
| 92 |
self, |
| 93 |
*, |
| 94 |
sandbox: typing.Optional[bool] = OMIT, |
| 95 |
bundle_id: typing.Optional[str] = OMIT, |
| 96 |
p_12: typing.Optional[str] = OMIT, |
| 97 |
request_options: typing.Optional[RequestOptions] = None, |
| 98 |
) -> SetGuardianFactorsProviderPushNotificationApnsResponseContent: |
| 99 |
""" |
| 100 |
Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. |
| 101 |
|
| 102 |
Parameters |
| 103 |
---------- |
| 104 |
sandbox : typing.Optional[bool] |
| 105 |
|
| 106 |
bundle_id : typing.Optional[str] |
| 107 |
|
| 108 |
p_12 : typing.Optional[str] |
| 109 |
|
| 110 |
request_options : typing.Optional[RequestOptions] |
| 111 |
Request-specific configuration. |
| 112 |
|
| 113 |
Returns |
| 114 |
------- |
| 115 |
SetGuardianFactorsProviderPushNotificationApnsResponseContent |
| 116 |
APNS configuration successfully updated. |
| 117 |
|
| 118 |
Examples |
| 119 |
-------- |
| 120 |
from auth0 import Auth0 |
| 121 |
|
| 122 |
client = Auth0( |
| 123 |
token="YOUR_TOKEN", |
| 124 |
) |
| 125 |
client.guardian.factors.push_notification.set_apns_provider() |
| 126 |
""" |
| 127 |
_response = self._raw_client.set_apns_provider( |
| 128 |
sandbox=sandbox, bundle_id=bundle_id, p_12=p_12, request_options=request_options |
| 129 |
) |
| 130 |
return _response.data |
| 131 |
|
| 132 |
def update_apns_provider( |
| 133 |
self, |
| 134 |
*, |
| 135 |
sandbox: typing.Optional[bool] = OMIT, |
| 136 |
bundle_id: typing.Optional[str] = OMIT, |
| 137 |
p_12: typing.Optional[str] = OMIT, |
| 138 |
request_options: typing.Optional[RequestOptions] = None, |
| 139 |
) -> UpdateGuardianFactorsProviderPushNotificationApnsResponseContent: |
| 140 |
""" |
| 141 |
Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. |
| 142 |
|
| 143 |
Parameters |
| 144 |
---------- |
| 145 |
sandbox : typing.Optional[bool] |
| 146 |
|
| 147 |
bundle_id : typing.Optional[str] |
| 148 |
|
| 149 |
p_12 : typing.Optional[str] |
| 150 |
|
| 151 |
request_options : typing.Optional[RequestOptions] |
| 152 |
Request-specific configuration. |
| 153 |
|
| 154 |
Returns |
| 155 |
------- |
| 156 |
UpdateGuardianFactorsProviderPushNotificationApnsResponseContent |
| 157 |
APNS configuration successfully updated. |
| 158 |
|
| 159 |
Examples |
| 160 |
-------- |
| 161 |
from auth0 import Auth0 |
| 162 |
|
| 163 |
client = Auth0( |
| 164 |
token="YOUR_TOKEN", |
| 165 |
) |
| 166 |
client.guardian.factors.push_notification.update_apns_provider() |
| 167 |
""" |
| 168 |
_response = self._raw_client.update_apns_provider( |
| 169 |
sandbox=sandbox, bundle_id=bundle_id, p_12=p_12, request_options=request_options |
| 170 |
) |
| 171 |
return _response.data |
| 172 |
|
| 173 |
def set_fcm_provider( |
| 174 |
self, *, server_key: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None |
| 175 |
) -> SetGuardianFactorsProviderPushNotificationFcmResponseContent: |
| 176 |
""" |
| 177 |
Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. |
| 178 |
|
| 179 |
Parameters |
| 180 |
---------- |
| 181 |
server_key : typing.Optional[str] |
| 182 |
|
| 183 |
request_options : typing.Optional[RequestOptions] |
| 184 |
Request-specific configuration. |
| 185 |
|
| 186 |
Returns |
| 187 |
------- |
| 188 |
SetGuardianFactorsProviderPushNotificationFcmResponseContent |
| 189 |
FCM configuration updated |
| 190 |
|
| 191 |
Examples |
| 192 |
-------- |
| 193 |
from auth0 import Auth0 |
| 194 |
|
| 195 |
client = Auth0( |
| 196 |
token="YOUR_TOKEN", |
| 197 |
) |
| 198 |
client.guardian.factors.push_notification.set_fcm_provider() |
| 199 |
""" |
| 200 |
_response = self._raw_client.set_fcm_provider(server_key=server_key, request_options=request_options) |
| 201 |
return _response.data |
| 202 |
|
| 203 |
def update_fcm_provider( |
| 204 |
self, *, server_key: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None |
| 205 |
) -> UpdateGuardianFactorsProviderPushNotificationFcmResponseContent: |
| 206 |
""" |
| 207 |
Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. |
| 208 |
|
| 209 |
Parameters |
| 210 |
---------- |
| 211 |
server_key : typing.Optional[str] |
| 212 |
|
| 213 |
request_options : typing.Optional[RequestOptions] |
| 214 |
Request-specific configuration. |
| 215 |
|
| 216 |
Returns |
| 217 |
------- |
| 218 |
UpdateGuardianFactorsProviderPushNotificationFcmResponseContent |
| 219 |
FCM configuration updated |
| 220 |
|
| 221 |
Examples |
| 222 |
-------- |
| 223 |
from auth0 import Auth0 |
| 224 |
|
| 225 |
client = Auth0( |
| 226 |
token="YOUR_TOKEN", |
| 227 |
) |
| 228 |
client.guardian.factors.push_notification.update_fcm_provider() |
| 229 |
""" |
| 230 |
_response = self._raw_client.update_fcm_provider(server_key=server_key, request_options=request_options) |
| 231 |
return _response.data |
| 232 |
|
| 233 |
def set_fcmv_1_provider( |
| 234 |
self, |
| 235 |
*, |
| 236 |
server_credentials: typing.Optional[str] = OMIT, |
| 237 |
request_options: typing.Optional[RequestOptions] = None, |
| 238 |
) -> SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent: |
| 239 |
""" |
| 240 |
Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. |
| 241 |
|
| 242 |
Parameters |
| 243 |
---------- |
| 244 |
server_credentials : typing.Optional[str] |
| 245 |
|
| 246 |
request_options : typing.Optional[RequestOptions] |
| 247 |
Request-specific configuration. |
| 248 |
|
| 249 |
Returns |
| 250 |
------- |
| 251 |
SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent |
| 252 |
FCMV1 configuration updated |
| 253 |
|
| 254 |
Examples |
| 255 |
-------- |
| 256 |
from auth0 import Auth0 |
| 257 |
|
| 258 |
client = Auth0( |
| 259 |
token="YOUR_TOKEN", |
| 260 |
) |
| 261 |
client.guardian.factors.push_notification.set_fcmv_1_provider() |
| 262 |
""" |
| 263 |
_response = self._raw_client.set_fcmv_1_provider( |
| 264 |
server_credentials=server_credentials, request_options=request_options |
| 265 |
) |
| 266 |
return _response.data |
| 267 |
|
| 268 |
def update_fcmv_1_provider( |
| 269 |
self, |
| 270 |
*, |
| 271 |
server_credentials: typing.Optional[str] = OMIT, |
| 272 |
request_options: typing.Optional[RequestOptions] = None, |
| 273 |
) -> UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent: |
| 274 |
""" |
| 275 |
Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. |
| 276 |
|
| 277 |
Parameters |
| 278 |
---------- |
| 279 |
server_credentials : typing.Optional[str] |
| 280 |
|
| 281 |
request_options : typing.Optional[RequestOptions] |
| 282 |
Request-specific configuration. |
| 283 |
|
| 284 |
Returns |
| 285 |
------- |
| 286 |
UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent |
| 287 |
FCMV1 configuration updated |
| 288 |
|
| 289 |
Examples |
| 290 |
-------- |
| 291 |
from auth0 import Auth0 |
| 292 |
|
| 293 |
client = Auth0( |
| 294 |
token="YOUR_TOKEN", |
| 295 |
) |
| 296 |
client.guardian.factors.push_notification.update_fcmv_1_provider() |
| 297 |
""" |
| 298 |
_response = self._raw_client.update_fcmv_1_provider( |
| 299 |
server_credentials=server_credentials, request_options=request_options |
| 300 |
) |
| 301 |
return _response.data |
| 302 |
|
| 303 |
def get_sns_provider( |
| 304 |
self, *, request_options: typing.Optional[RequestOptions] = None |
| 305 |
) -> GetGuardianFactorsProviderSnsResponseContent: |
| 306 |
""" |
| 307 |
Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review [Configure Push Notifications for MFA](https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa). |
| 308 |
|
| 309 |
Parameters |
| 310 |
---------- |
| 311 |
request_options : typing.Optional[RequestOptions] |
| 312 |
Request-specific configuration. |
| 313 |
|
| 314 |
Returns |
| 315 |
------- |
| 316 |
GetGuardianFactorsProviderSnsResponseContent |
| 317 |
AWS SNS configuration successfully retrieved. |
| 318 |
|
| 319 |
Examples |
| 320 |
-------- |
| 321 |
from auth0 import Auth0 |
| 322 |
|
| 323 |
client = Auth0( |
| 324 |
token="YOUR_TOKEN", |
| 325 |
) |
| 326 |
client.guardian.factors.push_notification.get_sns_provider() |
| 327 |
""" |
| 328 |
_response = self._raw_client.get_sns_provider(request_options=request_options) |
| 329 |
return _response.data |
| 330 |
|
| 331 |
def set_sns_provider( |
| 332 |
self, |
| 333 |
*, |
| 334 |
aws_access_key_id: typing.Optional[str] = OMIT, |
| 335 |
aws_secret_access_key: typing.Optional[str] = OMIT, |
| 336 |
aws_region: typing.Optional[str] = OMIT, |
| 337 |
sns_apns_platform_application_arn: typing.Optional[str] = OMIT, |
| 338 |
sns_gcm_platform_application_arn: typing.Optional[str] = OMIT, |
| 339 |
request_options: typing.Optional[RequestOptions] = None, |
| 340 |
) -> SetGuardianFactorsProviderPushNotificationSnsResponseContent: |
| 341 |
""" |
| 342 |
Configure the [AWS SNS push notification provider configuration](https://auth0.com/docs/multifactor-authentication/developer/sns-configuration) (subscription required). |
| 343 |
|
| 344 |
Parameters |
| 345 |
---------- |
| 346 |
aws_access_key_id : typing.Optional[str] |
| 347 |
|
| 348 |
aws_secret_access_key : typing.Optional[str] |
| 349 |
|
| 350 |
aws_region : typing.Optional[str] |
| 351 |
|
| 352 |
sns_apns_platform_application_arn : typing.Optional[str] |
| 353 |
|
| 354 |
sns_gcm_platform_application_arn : typing.Optional[str] |
| 355 |
|
| 356 |
request_options : typing.Optional[RequestOptions] |
| 357 |
Request-specific configuration. |
| 358 |
|
| 359 |
Returns |
| 360 |
------- |
| 361 |
SetGuardianFactorsProviderPushNotificationSnsResponseContent |
| 362 |
AWS SNS configuration successfully updated. |
| 363 |
|
| 364 |
Examples |
| 365 |
-------- |
| 366 |
from auth0 import Auth0 |
| 367 |
|
| 368 |
client = Auth0( |
| 369 |
token="YOUR_TOKEN", |
| 370 |
) |
| 371 |
client.guardian.factors.push_notification.set_sns_provider() |
| 372 |
""" |
| 373 |
_response = self._raw_client.set_sns_provider( |
| 374 |
aws_access_key_id=aws_access_key_id, |
| 375 |
aws_secret_access_key=aws_secret_access_key, |
| 376 |
aws_region=aws_region, |
| 377 |
sns_apns_platform_application_arn=sns_apns_platform_application_arn, |
| 378 |
sns_gcm_platform_application_arn=sns_gcm_platform_application_arn, |
| 379 |
request_options=request_options, |
| 380 |
) |
| 381 |
return _response.data |
| 382 |
|
| 383 |
def update_sns_provider( |
| 384 |
self, |
| 385 |
*, |
| 386 |
aws_access_key_id: typing.Optional[str] = OMIT, |
| 387 |
aws_secret_access_key: typing.Optional[str] = OMIT, |
| 388 |
aws_region: typing.Optional[str] = OMIT, |
| 389 |
sns_apns_platform_application_arn: typing.Optional[str] = OMIT, |
| 390 |
sns_gcm_platform_application_arn: typing.Optional[str] = OMIT, |
| 391 |
request_options: typing.Optional[RequestOptions] = None, |
| 392 |
) -> UpdateGuardianFactorsProviderPushNotificationSnsResponseContent: |
| 393 |
""" |
| 394 |
Configure the [AWS SNS push notification provider configuration](https://auth0.com/docs/multifactor-authentication/developer/sns-configuration) (subscription required). |
| 395 |
|
| 396 |
Parameters |
| 397 |
---------- |
| 398 |
aws_access_key_id : typing.Optional[str] |
| 399 |
|
| 400 |
aws_secret_access_key : typing.Optional[str] |
| 401 |
|
| 402 |
aws_region : typing.Optional[str] |
| 403 |
|
| 404 |
sns_apns_platform_application_arn : typing.Optional[str] |
| 405 |
|
| 406 |
sns_gcm_platform_application_arn : typing.Optional[str] |
| 407 |
|
| 408 |
request_options : typing.Optional[RequestOptions] |
| 409 |
Request-specific configuration. |
| 410 |
|
| 411 |
Returns |
| 412 |
------- |
| 413 |
UpdateGuardianFactorsProviderPushNotificationSnsResponseContent |
| 414 |
AWS SNS configuration successfully updated. |
| 415 |
|
| 416 |
Examples |
| 417 |
-------- |
| 418 |
from auth0 import Auth0 |
| 419 |
|
| 420 |
client = Auth0( |
| 421 |
token="YOUR_TOKEN", |
| 422 |
) |
| 423 |
client.guardian.factors.push_notification.update_sns_provider() |
| 424 |
""" |
| 425 |
_response = self._raw_client.update_sns_provider( |
| 426 |
aws_access_key_id=aws_access_key_id, |
| 427 |
aws_secret_access_key=aws_secret_access_key, |
| 428 |
aws_region=aws_region, |
| 429 |
sns_apns_platform_application_arn=sns_apns_platform_application_arn, |
| 430 |
sns_gcm_platform_application_arn=sns_gcm_platform_application_arn, |
| 431 |
request_options=request_options, |
| 432 |
) |
| 433 |
return _response.data |
| 434 |
|
| 435 |
def get_selected_provider( |
| 436 |
self, *, request_options: typing.Optional[RequestOptions] = None |
| 437 |
) -> GetGuardianFactorsProviderPushNotificationResponseContent: |
| 438 |
""" |
| 439 |
Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. |
| 440 |
|
| 441 |
Parameters |
| 442 |
---------- |
| 443 |
request_options : typing.Optional[RequestOptions] |
| 444 |
Request-specific configuration. |
| 445 |
|
| 446 |
Returns |
| 447 |
------- |
| 448 |
GetGuardianFactorsProviderPushNotificationResponseContent |
| 449 |
Returns selected push notification provider |
| 450 |
|
| 451 |
Examples |
| 452 |
-------- |
| 453 |
from auth0 import Auth0 |
| 454 |
|
| 455 |
client = Auth0( |
| 456 |
token="YOUR_TOKEN", |
| 457 |
) |
| 458 |
client.guardian.factors.push_notification.get_selected_provider() |
| 459 |
""" |
| 460 |
_response = self._raw_client.get_selected_provider(request_options=request_options) |
| 461 |
return _response.data |
| 462 |
|
| 463 |
def set_provider( |
| 464 |
self, |
| 465 |
*, |
| 466 |
provider: GuardianFactorsProviderPushNotificationProviderDataEnum, |
| 467 |
request_options: typing.Optional[RequestOptions] = None, |
| 468 |
) -> SetGuardianFactorsProviderPushNotificationResponseContent: |
| 469 |
""" |
| 470 |
Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. |
| 471 |
|
| 472 |
Parameters |
| 473 |
---------- |
| 474 |
provider : GuardianFactorsProviderPushNotificationProviderDataEnum |
| 475 |
|
| 476 |
request_options : typing.Optional[RequestOptions] |
| 477 |
Request-specific configuration. |
| 478 |
|
| 479 |
Returns |
| 480 |
------- |
| 481 |
SetGuardianFactorsProviderPushNotificationResponseContent |
| 482 |
Returns selected push notification provider configuration |
| 483 |
|
| 484 |
Examples |
| 485 |
-------- |
| 486 |
from auth0 import Auth0 |
| 487 |
|
| 488 |
client = Auth0( |
| 489 |
token="YOUR_TOKEN", |
| 490 |
) |
| 491 |
client.guardian.factors.push_notification.set_provider( |
| 492 |
provider="guardian", |
| 493 |
) |
| 494 |
""" |
| 495 |
_response = self._raw_client.set_provider(provider=provider, request_options=request_options) |
| 496 |
return _response.data |
| 497 |
|
| 498 |
|
| 499 |
class AsyncPushNotificationClient: |
| 500 |
def __init__(self, *, client_wrapper: AsyncClientWrapper): |
| 501 |
self._raw_client = AsyncRawPushNotificationClient(client_wrapper=client_wrapper) |
| 502 |
|
| 503 |
@property |
| 504 |
def with_raw_response(self) -> AsyncRawPushNotificationClient: |
| 505 |
""" |
| 506 |
Retrieves a raw implementation of this client that returns raw responses. |
| 507 |
|
| 508 |
Returns |
| 509 |
------- |
| 510 |
AsyncRawPushNotificationClient |
| 511 |
""" |
| 512 |
return self._raw_client |
| 513 |
|
| 514 |
async def get_apns_provider( |
| 515 |
self, *, request_options: typing.Optional[RequestOptions] = None |
| 516 |
) -> GetGuardianFactorsProviderApnsResponseContent: |
| 517 |
""" |
| 518 |
Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. |
| 519 |
|
| 520 |
Parameters |
| 521 |
---------- |
| 522 |
request_options : typing.Optional[RequestOptions] |
| 523 |
Request-specific configuration. |
| 524 |
|
| 525 |
Returns |
| 526 |
------- |
| 527 |
GetGuardianFactorsProviderApnsResponseContent |
| 528 |
APNS configuration successfully retrieved. |
| 529 |
|
| 530 |
Examples |
| 531 |
-------- |
| 532 |
import asyncio |
| 533 |
|
| 534 |
from auth0 import AsyncAuth0 |
| 535 |
|
| 536 |
client = AsyncAuth0( |
| 537 |
token="YOUR_TOKEN", |
| 538 |
) |
| 539 |
|
| 540 |
|
| 541 |
async def main() -> None: |
| 542 |
await client.guardian.factors.push_notification.get_apns_provider() |
| 543 |
|
| 544 |
|
| 545 |
asyncio.run(main()) |
| 546 |
""" |
| 547 |
_response = await self._raw_client.get_apns_provider(request_options=request_options) |
| 548 |
return _response.data |
| 549 |
|
| 550 |
async def set_apns_provider( |
| 551 |
self, |
| 552 |
*, |
| 553 |
sandbox: typing.Optional[bool] = OMIT, |
| 554 |
bundle_id: typing.Optional[str] = OMIT, |
| 555 |
p_12: typing.Optional[str] = OMIT, |
| 556 |
request_options: typing.Optional[RequestOptions] = None, |
| 557 |
) -> SetGuardianFactorsProviderPushNotificationApnsResponseContent: |
| 558 |
""" |
| 559 |
Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. |
| 560 |
|
| 561 |
Parameters |
| 562 |
---------- |
| 563 |
sandbox : typing.Optional[bool] |
| 564 |
|
| 565 |
bundle_id : typing.Optional[str] |
| 566 |
|
| 567 |
p_12 : typing.Optional[str] |
| 568 |
|
| 569 |
request_options : typing.Optional[RequestOptions] |
| 570 |
Request-specific configuration. |
| 571 |
|
| 572 |
Returns |
| 573 |
------- |
| 574 |
SetGuardianFactorsProviderPushNotificationApnsResponseContent |
| 575 |
APNS configuration successfully updated. |
| 576 |
|
| 577 |
Examples |
| 578 |
-------- |
| 579 |
import asyncio |
| 580 |
|
| 581 |
from auth0 import AsyncAuth0 |
| 582 |
|
| 583 |
client = AsyncAuth0( |
| 584 |
token="YOUR_TOKEN", |
| 585 |
) |
| 586 |
|
| 587 |
|
| 588 |
async def main() -> None: |
| 589 |
await client.guardian.factors.push_notification.set_apns_provider() |
| 590 |
|
| 591 |
|
| 592 |
asyncio.run(main()) |
| 593 |
""" |
| 594 |
_response = await self._raw_client.set_apns_provider( |
| 595 |
sandbox=sandbox, bundle_id=bundle_id, p_12=p_12, request_options=request_options |
| 596 |
) |
| 597 |
return _response.data |
| 598 |
|
| 599 |
async def update_apns_provider( |
| 600 |
self, |
| 601 |
*, |
| 602 |
sandbox: typing.Optional[bool] = OMIT, |
| 603 |
bundle_id: typing.Optional[str] = OMIT, |
| 604 |
p_12: typing.Optional[str] = OMIT, |
| 605 |
request_options: typing.Optional[RequestOptions] = None, |
| 606 |
) -> UpdateGuardianFactorsProviderPushNotificationApnsResponseContent: |
| 607 |
""" |
| 608 |
Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. |
| 609 |
|
| 610 |
Parameters |
| 611 |
---------- |
| 612 |
sandbox : typing.Optional[bool] |
| 613 |
|
| 614 |
bundle_id : typing.Optional[str] |
| 615 |
|
| 616 |
p_12 : typing.Optional[str] |
| 617 |
|
| 618 |
request_options : typing.Optional[RequestOptions] |
| 619 |
Request-specific configuration. |
| 620 |
|
| 621 |
Returns |
| 622 |
------- |
| 623 |
UpdateGuardianFactorsProviderPushNotificationApnsResponseContent |
| 624 |
APNS configuration successfully updated. |
| 625 |
|
| 626 |
Examples |
| 627 |
-------- |
| 628 |
import asyncio |
| 629 |
|
| 630 |
from auth0 import AsyncAuth0 |
| 631 |
|
| 632 |
client = AsyncAuth0( |
| 633 |
token="YOUR_TOKEN", |
| 634 |
) |
| 635 |
|
| 636 |
|
| 637 |
async def main() -> None: |
| 638 |
await client.guardian.factors.push_notification.update_apns_provider() |
| 639 |
|
| 640 |
|
| 641 |
asyncio.run(main()) |
| 642 |
""" |
| 643 |
_response = await self._raw_client.update_apns_provider( |
| 644 |
sandbox=sandbox, bundle_id=bundle_id, p_12=p_12, request_options=request_options |
| 645 |
) |
| 646 |
return _response.data |
| 647 |
|
| 648 |
async def set_fcm_provider( |
| 649 |
self, *, server_key: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None |
| 650 |
) -> SetGuardianFactorsProviderPushNotificationFcmResponseContent: |
| 651 |
""" |
| 652 |
Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. |
| 653 |
|
| 654 |
Parameters |
| 655 |
---------- |
| 656 |
server_key : typing.Optional[str] |
| 657 |
|
| 658 |
request_options : typing.Optional[RequestOptions] |
| 659 |
Request-specific configuration. |
| 660 |
|
| 661 |
Returns |
| 662 |
------- |
| 663 |
SetGuardianFactorsProviderPushNotificationFcmResponseContent |
| 664 |
FCM configuration updated |
| 665 |
|
| 666 |
Examples |
| 667 |
-------- |
| 668 |
import asyncio |
| 669 |
|
| 670 |
from auth0 import AsyncAuth0 |
| 671 |
|
| 672 |
client = AsyncAuth0( |
| 673 |
token="YOUR_TOKEN", |
| 674 |
) |
| 675 |
|
| 676 |
|
| 677 |
async def main() -> None: |
| 678 |
await client.guardian.factors.push_notification.set_fcm_provider() |
| 679 |
|
| 680 |
|
| 681 |
asyncio.run(main()) |
| 682 |
""" |
| 683 |
_response = await self._raw_client.set_fcm_provider(server_key=server_key, request_options=request_options) |
| 684 |
return _response.data |
| 685 |
|
| 686 |
async def update_fcm_provider( |
| 687 |
self, *, server_key: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None |
| 688 |
) -> UpdateGuardianFactorsProviderPushNotificationFcmResponseContent: |
| 689 |
""" |
| 690 |
Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. |
| 691 |
|
| 692 |
Parameters |
| 693 |
---------- |
| 694 |
server_key : typing.Optional[str] |
| 695 |
|
| 696 |
request_options : typing.Optional[RequestOptions] |
| 697 |
Request-specific configuration. |
| 698 |
|
| 699 |
Returns |
| 700 |
------- |
| 701 |
UpdateGuardianFactorsProviderPushNotificationFcmResponseContent |
| 702 |
FCM configuration updated |
| 703 |
|
| 704 |
Examples |
| 705 |
-------- |
| 706 |
import asyncio |
| 707 |
|
| 708 |
from auth0 import AsyncAuth0 |
| 709 |
|
| 710 |
client = AsyncAuth0( |
| 711 |
token="YOUR_TOKEN", |
| 712 |
) |
| 713 |
|
| 714 |
|
| 715 |
async def main() -> None: |
| 716 |
await client.guardian.factors.push_notification.update_fcm_provider() |
| 717 |
|
| 718 |
|
| 719 |
asyncio.run(main()) |
| 720 |
""" |
| 721 |
_response = await self._raw_client.update_fcm_provider(server_key=server_key, request_options=request_options) |
| 722 |
return _response.data |
| 723 |
|
| 724 |
async def set_fcmv_1_provider( |
| 725 |
self, |
| 726 |
*, |
| 727 |
server_credentials: typing.Optional[str] = OMIT, |
| 728 |
request_options: typing.Optional[RequestOptions] = None, |
| 729 |
) -> SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent: |
| 730 |
""" |
| 731 |
Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. |
| 732 |
|
| 733 |
Parameters |
| 734 |
---------- |
| 735 |
server_credentials : typing.Optional[str] |
| 736 |
|
| 737 |
request_options : typing.Optional[RequestOptions] |
| 738 |
Request-specific configuration. |
| 739 |
|
| 740 |
Returns |
| 741 |
------- |
| 742 |
SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent |
| 743 |
FCMV1 configuration updated |
| 744 |
|
| 745 |
Examples |
| 746 |
-------- |
| 747 |
import asyncio |
| 748 |
|
| 749 |
from auth0 import AsyncAuth0 |
| 750 |
|
| 751 |
client = AsyncAuth0( |
| 752 |
token="YOUR_TOKEN", |
| 753 |
) |
| 754 |
|
| 755 |
|
| 756 |
async def main() -> None: |
| 757 |
await client.guardian.factors.push_notification.set_fcmv_1_provider() |
| 758 |
|
| 759 |
|
| 760 |
asyncio.run(main()) |
| 761 |
""" |
| 762 |
_response = await self._raw_client.set_fcmv_1_provider( |
| 763 |
server_credentials=server_credentials, request_options=request_options |
| 764 |
) |
| 765 |
return _response.data |
| 766 |
|
| 767 |
async def update_fcmv_1_provider( |
| 768 |
self, |
| 769 |
*, |
| 770 |
server_credentials: typing.Optional[str] = OMIT, |
| 771 |
request_options: typing.Optional[RequestOptions] = None, |
| 772 |
) -> UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent: |
| 773 |
""" |
| 774 |
Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. |
| 775 |
|
| 776 |
Parameters |
| 777 |
---------- |
| 778 |
server_credentials : typing.Optional[str] |
| 779 |
|
| 780 |
request_options : typing.Optional[RequestOptions] |
| 781 |
Request-specific configuration. |
| 782 |
|
| 783 |
Returns |
| 784 |
------- |
| 785 |
UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent |
| 786 |
FCMV1 configuration updated |
| 787 |
|
| 788 |
Examples |
| 789 |
-------- |
| 790 |
import asyncio |
| 791 |
|
| 792 |
from auth0 import AsyncAuth0 |
| 793 |
|
| 794 |
client = AsyncAuth0( |
| 795 |
token="YOUR_TOKEN", |
| 796 |
) |
| 797 |
|
| 798 |
|
| 799 |
async def main() -> None: |
| 800 |
await client.guardian.factors.push_notification.update_fcmv_1_provider() |
| 801 |
|
| 802 |
|
| 803 |
asyncio.run(main()) |
| 804 |
""" |
| 805 |
_response = await self._raw_client.update_fcmv_1_provider( |
| 806 |
server_credentials=server_credentials, request_options=request_options |
| 807 |
) |
| 808 |
return _response.data |
| 809 |
|
| 810 |
async def get_sns_provider( |
| 811 |
self, *, request_options: typing.Optional[RequestOptions] = None |
| 812 |
) -> GetGuardianFactorsProviderSnsResponseContent: |
| 813 |
""" |
| 814 |
Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review [Configure Push Notifications for MFA](https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa). |
| 815 |
|
| 816 |
Parameters |
| 817 |
---------- |
| 818 |
request_options : typing.Optional[RequestOptions] |
| 819 |
Request-specific configuration. |
| 820 |
|
| 821 |
Returns |
| 822 |
------- |
| 823 |
GetGuardianFactorsProviderSnsResponseContent |
| 824 |
AWS SNS configuration successfully retrieved. |
| 825 |
|
| 826 |
Examples |
| 827 |
-------- |
| 828 |
import asyncio |
| 829 |
|
| 830 |
from auth0 import AsyncAuth0 |
| 831 |
|
| 832 |
client = AsyncAuth0( |
| 833 |
token="YOUR_TOKEN", |
| 834 |
) |
| 835 |
|
| 836 |
|
| 837 |
async def main() -> None: |
| 838 |
await client.guardian.factors.push_notification.get_sns_provider() |
| 839 |
|
| 840 |
|
| 841 |
asyncio.run(main()) |
| 842 |
""" |
| 843 |
_response = await self._raw_client.get_sns_provider(request_options=request_options) |
| 844 |
return _response.data |
| 845 |
|
| 846 |
async def set_sns_provider( |
| 847 |
self, |
| 848 |
*, |
| 849 |
aws_access_key_id: typing.Optional[str] = OMIT, |
| 850 |
aws_secret_access_key: typing.Optional[str] = OMIT, |
| 851 |
aws_region: typing.Optional[str] = OMIT, |
| 852 |
sns_apns_platform_application_arn: typing.Optional[str] = OMIT, |
| 853 |
sns_gcm_platform_application_arn: typing.Optional[str] = OMIT, |
| 854 |
request_options: typing.Optional[RequestOptions] = None, |
| 855 |
) -> SetGuardianFactorsProviderPushNotificationSnsResponseContent: |
| 856 |
""" |
| 857 |
Configure the [AWS SNS push notification provider configuration](https://auth0.com/docs/multifactor-authentication/developer/sns-configuration) (subscription required). |
| 858 |
|
| 859 |
Parameters |
| 860 |
---------- |
| 861 |
aws_access_key_id : typing.Optional[str] |
| 862 |
|
| 863 |
aws_secret_access_key : typing.Optional[str] |
| 864 |
|
| 865 |
aws_region : typing.Optional[str] |
| 866 |
|
| 867 |
sns_apns_platform_application_arn : typing.Optional[str] |
| 868 |
|
| 869 |
sns_gcm_platform_application_arn : typing.Optional[str] |
| 870 |
|
| 871 |
request_options : typing.Optional[RequestOptions] |
| 872 |
Request-specific configuration. |
| 873 |
|
| 874 |
Returns |
| 875 |
------- |
| 876 |
SetGuardianFactorsProviderPushNotificationSnsResponseContent |
| 877 |
AWS SNS configuration successfully updated. |
| 878 |
|
| 879 |
Examples |
| 880 |
-------- |
| 881 |
import asyncio |
| 882 |
|
| 883 |
from auth0 import AsyncAuth0 |
| 884 |
|
| 885 |
client = AsyncAuth0( |
| 886 |
token="YOUR_TOKEN", |
| 887 |
) |
| 888 |
|
| 889 |
|
| 890 |
async def main() -> None: |
| 891 |
await client.guardian.factors.push_notification.set_sns_provider() |
| 892 |
|
| 893 |
|
| 894 |
asyncio.run(main()) |
| 895 |
""" |
| 896 |
_response = await self._raw_client.set_sns_provider( |
| 897 |
aws_access_key_id=aws_access_key_id, |
| 898 |
aws_secret_access_key=aws_secret_access_key, |
| 899 |
aws_region=aws_region, |
| 900 |
sns_apns_platform_application_arn=sns_apns_platform_application_arn, |
| 901 |
sns_gcm_platform_application_arn=sns_gcm_platform_application_arn, |
| 902 |
request_options=request_options, |
| 903 |
) |
| 904 |
return _response.data |
| 905 |
|
| 906 |
async def update_sns_provider( |
| 907 |
self, |
| 908 |
*, |
| 909 |
aws_access_key_id: typing.Optional[str] = OMIT, |
| 910 |
aws_secret_access_key: typing.Optional[str] = OMIT, |
| 911 |
aws_region: typing.Optional[str] = OMIT, |
| 912 |
sns_apns_platform_application_arn: typing.Optional[str] = OMIT, |
| 913 |
sns_gcm_platform_application_arn: typing.Optional[str] = OMIT, |
| 914 |
request_options: typing.Optional[RequestOptions] = None, |
| 915 |
) -> UpdateGuardianFactorsProviderPushNotificationSnsResponseContent: |
| 916 |
""" |
| 917 |
Configure the [AWS SNS push notification provider configuration](https://auth0.com/docs/multifactor-authentication/developer/sns-configuration) (subscription required). |
| 918 |
|
| 919 |
Parameters |
| 920 |
---------- |
| 921 |
aws_access_key_id : typing.Optional[str] |
| 922 |
|
| 923 |
aws_secret_access_key : typing.Optional[str] |
| 924 |
|
| 925 |
aws_region : typing.Optional[str] |
| 926 |
|
| 927 |
sns_apns_platform_application_arn : typing.Optional[str] |
| 928 |
|
| 929 |
sns_gcm_platform_application_arn : typing.Optional[str] |
| 930 |
|
| 931 |
request_options : typing.Optional[RequestOptions] |
| 932 |
Request-specific configuration. |
| 933 |
|
| 934 |
Returns |
| 935 |
------- |
| 936 |
UpdateGuardianFactorsProviderPushNotificationSnsResponseContent |
| 937 |
AWS SNS configuration successfully updated. |
| 938 |
|
| 939 |
Examples |
| 940 |
-------- |
| 941 |
import asyncio |
| 942 |
|
| 943 |
from auth0 import AsyncAuth0 |
| 944 |
|
| 945 |
client = AsyncAuth0( |
| 946 |
token="YOUR_TOKEN", |
| 947 |
) |
| 948 |
|
| 949 |
|
| 950 |
async def main() -> None: |
| 951 |
await client.guardian.factors.push_notification.update_sns_provider() |
| 952 |
|
| 953 |
|
| 954 |
asyncio.run(main()) |
| 955 |
""" |
| 956 |
_response = await self._raw_client.update_sns_provider( |
| 957 |
aws_access_key_id=aws_access_key_id, |
| 958 |
aws_secret_access_key=aws_secret_access_key, |
| 959 |
aws_region=aws_region, |
| 960 |
sns_apns_platform_application_arn=sns_apns_platform_application_arn, |
| 961 |
sns_gcm_platform_application_arn=sns_gcm_platform_application_arn, |
| 962 |
request_options=request_options, |
| 963 |
) |
| 964 |
return _response.data |
| 965 |
|
| 966 |
async def get_selected_provider( |
| 967 |
self, *, request_options: typing.Optional[RequestOptions] = None |
| 968 |
) -> GetGuardianFactorsProviderPushNotificationResponseContent: |
| 969 |
""" |
| 970 |
Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. |
| 971 |
|
| 972 |
Parameters |
| 973 |
---------- |
| 974 |
request_options : typing.Optional[RequestOptions] |
| 975 |
Request-specific configuration. |
| 976 |
|
| 977 |
Returns |
| 978 |
------- |
| 979 |
GetGuardianFactorsProviderPushNotificationResponseContent |
| 980 |
Returns selected push notification provider |
| 981 |
|
| 982 |
Examples |
| 983 |
-------- |
| 984 |
import asyncio |
| 985 |
|
| 986 |
from auth0 import AsyncAuth0 |
| 987 |
|
| 988 |
client = AsyncAuth0( |
| 989 |
token="YOUR_TOKEN", |
| 990 |
) |
| 991 |
|
| 992 |
|
| 993 |
async def main() -> None: |
| 994 |
await client.guardian.factors.push_notification.get_selected_provider() |
| 995 |
|
| 996 |
|
| 997 |
asyncio.run(main()) |
| 998 |
""" |
| 999 |
_response = await self._raw_client.get_selected_provider(request_options=request_options) |
| 1000 |
return _response.data |
| 1001 |
|
| 1002 |
async def set_provider( |
| 1003 |
self, |
| 1004 |
*, |
| 1005 |
provider: GuardianFactorsProviderPushNotificationProviderDataEnum, |
| 1006 |
request_options: typing.Optional[RequestOptions] = None, |
| 1007 |
) -> SetGuardianFactorsProviderPushNotificationResponseContent: |
| 1008 |
""" |
| 1009 |
Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. |
| 1010 |
|
| 1011 |
Parameters |
| 1012 |
---------- |
| 1013 |
provider : GuardianFactorsProviderPushNotificationProviderDataEnum |
| 1014 |
|
| 1015 |
request_options : typing.Optional[RequestOptions] |
| 1016 |
Request-specific configuration. |
| 1017 |
|
| 1018 |
Returns |
| 1019 |
------- |
| 1020 |
SetGuardianFactorsProviderPushNotificationResponseContent |
| 1021 |
Returns selected push notification provider configuration |
| 1022 |
|
| 1023 |
Examples |
| 1024 |
-------- |
| 1025 |
import asyncio |
| 1026 |
|
| 1027 |
from auth0 import AsyncAuth0 |
| 1028 |
|
| 1029 |
client = AsyncAuth0( |
| 1030 |
token="YOUR_TOKEN", |
| 1031 |
) |
| 1032 |
|
| 1033 |
|
| 1034 |
async def main() -> None: |
| 1035 |
await client.guardian.factors.push_notification.set_provider( |
| 1036 |
provider="guardian", |
| 1037 |
) |
| 1038 |
|
| 1039 |
|
| 1040 |
asyncio.run(main()) |
| 1041 |
""" |
| 1042 |
_response = await self._raw_client.set_provider(provider=provider, request_options=request_options) |
| 1043 |
return _response.data |