auth0 6.2.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.fern/metadata.json +6 -5
- data/.fern/replay.lock +13 -1
- data/.version +1 -1
- data/CHANGELOG.md +13 -0
- data/EXAMPLES.md +44 -0
- data/examples/ruby-api/Gemfile.lock +1 -1
- data/lib/auth0/actions/client.rb +47 -6
- data/lib/auth0/actions/executions/client.rb +4 -1
- data/lib/auth0/actions/modules/client.rb +40 -6
- data/lib/auth0/actions/modules/versions/client.rb +19 -3
- data/lib/auth0/actions/triggers/bindings/client.rb +12 -2
- data/lib/auth0/actions/triggers/client.rb +4 -1
- data/lib/auth0/actions/versions/client.rb +27 -4
- data/lib/auth0/agents/client.rb +22 -4
- data/lib/auth0/anomaly/blocks/client.rb +6 -0
- data/lib/auth0/api/authentication_endpoints.rb +40 -0
- data/lib/auth0/attack_protection/bot_detection/client.rb +8 -2
- data/lib/auth0/attack_protection/breached_password_detection/client.rb +8 -2
- data/lib/auth0/attack_protection/brute_force_protection/client.rb +8 -2
- data/lib/auth0/attack_protection/captcha/client.rb +8 -2
- data/lib/auth0/attack_protection/phone_provider_protection/client.rb +8 -2
- data/lib/auth0/attack_protection/suspicious_ip_throttling/client.rb +8 -2
- data/lib/auth0/branding/client.rb +8 -2
- data/lib/auth0/branding/phone/providers/client.rb +31 -5
- data/lib/auth0/branding/phone/templates/client.rb +39 -7
- data/lib/auth0/branding/templates/client.rb +10 -1
- data/lib/auth0/branding/themes/client.rb +162 -4
- data/lib/auth0/client.rb +8 -8
- data/lib/auth0/client_grants/client.rb +28 -4
- data/lib/auth0/client_grants/organizations/client.rb +9 -1
- data/lib/auth0/clients/client.rb +46 -7
- data/lib/auth0/clients/connections/client.rb +11 -1
- data/lib/auth0/clients/credentials/client.rb +36 -7
- data/lib/auth0/clients/types/create_client_request_content.rb +4 -0
- data/lib/auth0/clients/types/update_client_request_content.rb +2 -0
- data/lib/auth0/connection_profiles/client.rb +30 -6
- data/lib/auth0/connections/client.rb +37 -4
- data/lib/auth0/connections/clients/client.rb +21 -2
- data/lib/auth0/connections/directory_provisioning/client.rb +73 -8
- data/lib/auth0/connections/directory_provisioning/synchronizations/client.rb +4 -1
- data/lib/auth0/connections/keys/client.rb +31 -8
- data/lib/auth0/connections/scim_configuration/client.rb +37 -6
- data/lib/auth0/connections/scim_configuration/tokens/client.rb +14 -2
- data/lib/auth0/connections/users/client.rb +6 -0
- data/lib/auth0/custom_domains/client.rb +43 -8
- data/lib/auth0/device_credentials/client.rb +25 -2
- data/lib/auth0/email_templates/client.rb +19 -4
- data/lib/auth0/emails/provider/client.rb +23 -3
- data/lib/auth0/event_streams/client.rb +38 -5
- data/lib/auth0/event_streams/deliveries/client.rb +19 -2
- data/lib/auth0/event_streams/redeliveries/client.rb +10 -1
- data/lib/auth0/events/client.rb +7 -0
- data/lib/auth0/experimentation/client.rb +29 -0
- data/lib/auth0/experimentation/experiments/client.rb +367 -0
- data/lib/auth0/experimentation/experiments/types/advance_ramp_request_content.rb +15 -0
- data/lib/auth0/experimentation/experiments/types/create_experiment_request_content.rb +27 -0
- data/lib/auth0/experimentation/experiments/types/list_experiments_request_parameters.rb +21 -0
- data/lib/auth0/experimentation/experiments/types/update_experiment_request_parameters.rb +25 -0
- data/lib/auth0/experimentation/experiments/types/update_experiment_status_request_content.rb +15 -0
- data/lib/auth0/experimentation/feature_flags/client.rb +280 -0
- data/lib/auth0/experimentation/feature_flags/types/create_feature_flag_request_content.rb +17 -0
- data/lib/auth0/experimentation/feature_flags/types/list_feature_flags_request_parameters.rb +19 -0
- data/lib/auth0/experimentation/feature_flags/types/update_feature_flag_request_content.rb +19 -0
- data/lib/auth0/experimentation/feature_flags/types/update_feature_flag_status_request_content.rb +15 -0
- data/lib/auth0/experimentation/feature_flags/variations/client.rb +230 -0
- data/lib/auth0/experimentation/feature_flags/variations/types/create_variation_request_content.rb +21 -0
- data/lib/auth0/experimentation/feature_flags/variations/types/update_variation_request_content.rb +23 -0
- data/lib/auth0/experimentation/segments/client.rb +228 -0
- data/lib/auth0/experimentation/segments/types/create_segment_request_content.rb +17 -0
- data/lib/auth0/experimentation/segments/types/list_segments_request_parameters.rb +17 -0
- data/lib/auth0/experimentation/segments/types/update_segment_request_content.rb +19 -0
- data/lib/auth0/flows/client.rb +28 -4
- data/lib/auth0/flows/executions/client.rb +23 -2
- data/lib/auth0/flows/vault/connections/client.rb +31 -4
- data/lib/auth0/forms/client.rb +27 -4
- data/lib/auth0/groups/client.rb +21 -2
- data/lib/auth0/groups/members/client.rb +10 -1
- data/lib/auth0/groups/roles/client.rb +20 -1
- data/lib/auth0/guardian/client.rb +77 -0
- data/lib/auth0/guardian/enrollments/client.rb +11 -2
- data/lib/auth0/guardian/factors/client.rb +21 -5
- data/lib/auth0/guardian/factors/duo/settings/client.rb +12 -3
- data/lib/auth0/guardian/factors/email/client.rb +93 -0
- data/lib/auth0/guardian/factors/email/types/set_email_factor_settings_request_content.rb +17 -0
- data/lib/auth0/guardian/factors/phone/client.rb +110 -8
- data/lib/auth0/guardian/factors/phone/types/set_phone_factor_settings_request_content.rb +17 -0
- data/lib/auth0/guardian/factors/push_notification/client.rb +48 -12
- data/lib/auth0/guardian/factors/sms/client.rb +32 -9
- data/lib/auth0/guardian/policies/client.rb +8 -2
- data/lib/auth0/guardian/types/set_guardian_settings_request_content.rb +17 -0
- data/lib/auth0/hooks/client.rb +33 -4
- data/lib/auth0/hooks/secrets/client.rb +38 -4
- data/lib/auth0/jobs/client.rb +4 -1
- data/lib/auth0/jobs/errors/client.rb +9 -4
- data/lib/auth0/jobs/users_exports/client.rb +4 -1
- data/lib/auth0/jobs/users_imports/client.rb +14 -6
- data/lib/auth0/jobs/verification_email/client.rb +4 -1
- data/lib/auth0/keys/custom_signing/client.rb +13 -2
- data/lib/auth0/keys/encryption/client.rb +33 -5
- data/lib/auth0/keys/network_acls/client.rb +19 -3
- data/lib/auth0/keys/signing/client.rb +21 -7
- data/lib/auth0/log_streams/client.rb +29 -7
- data/lib/auth0/logs/client.rb +16 -2
- data/lib/auth0/network_acls/client.rb +41 -4
- data/lib/auth0/organizations/client.rb +109 -10
- data/lib/auth0/organizations/client_grants/client.rb +25 -2
- data/lib/auth0/organizations/clients/client.rb +38 -4
- data/lib/auth0/organizations/connections/client.rb +37 -4
- data/lib/auth0/organizations/connections/types/create_organization_all_connection_request_parameters.rb +2 -0
- data/lib/auth0/organizations/connections/types/update_organization_connection_request_parameters.rb +2 -0
- data/lib/auth0/organizations/discovery_domains/client.rb +42 -5
- data/lib/auth0/organizations/enabled_connections/client.rb +36 -4
- data/lib/auth0/organizations/groups/client.rb +8 -1
- data/lib/auth0/organizations/groups/roles/client.rb +23 -1
- data/lib/auth0/organizations/invitations/client.rb +40 -3
- data/lib/auth0/organizations/members/client.rb +23 -1
- data/lib/auth0/organizations/members/effective_roles/client.rb +9 -1
- data/lib/auth0/organizations/members/effective_roles/sources/groups/client.rb +10 -1
- data/lib/auth0/organizations/members/roles/client.rb +24 -1
- data/lib/auth0/organizations/roles/groups/client.rb +9 -1
- data/lib/auth0/organizations/roles/members/client.rb +11 -1
- data/lib/auth0/organizations/types/search_organizations_request_parameters.rb +19 -0
- data/lib/auth0/prompts/client.rb +8 -2
- data/lib/auth0/prompts/custom_text/client.rb +20 -2
- data/lib/auth0/prompts/partials/client.rb +16 -2
- data/lib/auth0/prompts/rendering/client.rb +34 -4
- data/lib/auth0/rate_limit_policies/client.rb +37 -4
- data/lib/auth0/refresh_tokens/client.rb +25 -3
- data/lib/auth0/resource_servers/client.rb +102 -4
- data/lib/auth0/resource_servers/types/create_resource_server_request_content.rb +6 -0
- data/lib/auth0/resource_servers/types/search_resource_servers_request_parameters.rb +23 -0
- data/lib/auth0/resource_servers/types/update_resource_server_request_content.rb +6 -0
- data/lib/auth0/risk_assessments/settings/client.rb +8 -2
- data/lib/auth0/risk_assessments/settings/new_device/client.rb +8 -2
- data/lib/auth0/roles/client.rb +26 -4
- data/lib/auth0/roles/groups/client.rb +20 -1
- data/lib/auth0/roles/permissions/client.rb +27 -1
- data/lib/auth0/roles/users/client.rb +15 -1
- data/lib/auth0/rules/client.rb +33 -4
- data/lib/auth0/rules_configs/client.rb +19 -5
- data/lib/auth0/self_service_profiles/client.rb +23 -4
- data/lib/auth0/self_service_profiles/custom_text/client.rb +23 -3
- data/lib/auth0/self_service_profiles/sso_ticket/client.rb +10 -1
- data/lib/auth0/sessions/client.rb +14 -2
- data/lib/auth0/stats/client.rb +16 -5
- data/lib/auth0/supplemental_signals/client.rb +8 -2
- data/lib/auth0/tenants/settings/client.rb +11 -2
- data/lib/auth0/tenants/settings/types/update_tenant_settings_request_content.rb +2 -0
- data/lib/auth0/tickets/client.rb +8 -2
- data/lib/auth0/token_exchange_profiles/client.rb +26 -3
- data/lib/auth0/types/advance_ramp_response_content.rb +15 -0
- data/lib/auth0/types/allocation_item.rb +27 -0
- data/lib/auth0/types/allocation_request_item.rb +19 -0
- data/lib/auth0/types/{connection_deletion_behavior_enum.rb → allocation_strategy_enum.rb} +3 -3
- data/lib/auth0/types/anonymous_sessions.rb +10 -0
- data/lib/auth0/types/async_approval_notifications_channels_enum.rb +1 -0
- data/lib/auth0/types/authentication_flow_enum.rb +16 -0
- data/lib/auth0/types/client.rb +6 -0
- data/lib/auth0/types/client_my_organization_patch_configuration.rb +4 -0
- data/lib/auth0/types/client_my_organization_post_configuration.rb +4 -0
- data/lib/auth0/types/client_my_organization_response_configuration.rb +4 -0
- data/lib/auth0/types/client_oidc_backchannel_logout_initiators_enum.rb +1 -0
- data/lib/auth0/types/client_oidc_support_allowed_scopes_enum.rb +14 -0
- data/lib/auth0/types/client_oidc_support_post.rb +15 -0
- data/lib/auth0/types/connection_identity_provider_enum.rb +4 -13
- data/lib/auth0/types/connection_options_ad.rb +2 -0
- data/lib/auth0/types/connection_options_adfs.rb +2 -0
- data/lib/auth0/types/connection_options_azure_ad.rb +2 -0
- data/lib/auth0/types/connection_options_common_saml.rb +2 -0
- data/lib/auth0/types/connection_options_ping_federate.rb +2 -0
- data/lib/auth0/types/connection_options_saml.rb +2 -0
- data/lib/auth0/types/connection_properties_options.rb +4 -0
- data/lib/auth0/types/connection_strategy_enum.rb +4 -13
- data/lib/auth0/types/connection_thumbprints_sha384.rb +23 -0
- data/lib/auth0/types/connection_thumbprints_sha384ad.rb +23 -0
- data/lib/auth0/types/connection_thumbprints_sha384saml.rb +23 -0
- data/lib/auth0/types/create_anonymous_sessions.rb +10 -0
- data/lib/auth0/types/create_client_response_content.rb +6 -0
- data/lib/auth0/types/create_experiment_response_content.rb +45 -0
- data/lib/auth0/types/create_feature_flag_parameters.rb +23 -0
- data/lib/auth0/types/create_feature_flag_response_content.rb +23 -0
- data/lib/auth0/types/create_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/create_resource_server_response_content.rb +6 -0
- data/lib/auth0/types/create_segment_response_content.rb +21 -0
- data/lib/auth0/types/create_variation_response_content.rb +21 -0
- data/lib/auth0/types/{organization_deletion_behavior_enum.rb → default_config_enum.rb} +3 -3
- data/lib/auth0/types/experiment_list_item.rb +45 -0
- data/lib/auth0/types/experiment_status_enum.rb +15 -0
- data/lib/auth0/types/experiment_transition_status_enum.rb +14 -0
- data/lib/auth0/types/experiment_validation_error.rb +11 -0
- data/lib/auth0/types/feature_flag.rb +23 -0
- data/lib/auth0/types/feature_flag_config_param.rb +13 -0
- data/lib/auth0/types/feature_flag_config_param_type_enum.rb +15 -0
- data/lib/auth0/types/feature_flag_config_params.rb +23 -0
- data/lib/auth0/types/feature_flag_status_enum.rb +13 -0
- data/lib/auth0/types/feature_flag_type_enum.rb +12 -0
- data/lib/auth0/types/get_client_response_content.rb +6 -0
- data/lib/auth0/types/get_email_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/get_experiment_response_content.rb +45 -0
- data/lib/auth0/types/get_feature_flag_response_content.rb +23 -0
- data/lib/auth0/types/get_guardian_settings_response_content.rb +15 -0
- data/lib/auth0/types/get_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/get_phone_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/get_resource_server_response_content.rb +6 -0
- data/lib/auth0/types/get_segment_response_content.rb +21 -0
- data/lib/auth0/types/get_tenant_settings_response_content.rb +2 -0
- data/lib/auth0/types/get_variation_response_content.rb +21 -0
- data/lib/auth0/types/list_experiments_response_content.rb +11 -0
- data/lib/auth0/types/list_feature_flags_response_content.rb +11 -0
- data/lib/auth0/types/list_segments_response_content.rb +11 -0
- data/lib/auth0/types/list_variations_response_content.rb +9 -0
- data/lib/auth0/types/oauth_scope.rb +4 -3
- data/lib/auth0/types/organization_all_connection_post.rb +2 -0
- data/lib/auth0/types/organization_member_access_level_enum.rb +14 -0
- data/lib/auth0/types/organization_member_access_level_enum_with_null.rb +14 -0
- data/lib/auth0/types/organization_sort_field_enum.rb +13 -0
- data/lib/auth0/types/resource_server.rb +6 -0
- data/lib/auth0/types/resource_server_access_token.rb +10 -0
- data/lib/auth0/types/resource_server_access_token_claims_mapping.rb +10 -0
- data/lib/auth0/types/resource_server_access_token_custom_claims_mapping.rb +23 -0
- data/lib/auth0/types/resource_server_access_token_custom_claims_mapping_rule.rb +11 -0
- data/lib/auth0/types/resource_server_search_response.rb +55 -0
- data/lib/auth0/types/resource_server_sort_field_enum.rb +13 -0
- data/lib/auth0/types/resource_server_subject_type_authorization.rb +2 -0
- data/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user.rb +10 -0
- data/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user_policy_enum.rb +12 -0
- data/lib/auth0/types/rotate_client_secret_response_content.rb +6 -0
- data/lib/auth0/types/search_organization.rb +23 -0
- data/lib/auth0/types/{list_template_organizations_paginated_response_content.rb → search_organizations_paginated_response_content.rb} +3 -3
- data/lib/auth0/types/search_parser_enum.rb +12 -0
- data/lib/auth0/types/search_resource_servers_response_content.rb +11 -0
- data/lib/auth0/types/segment.rb +21 -0
- data/lib/auth0/types/segment_contains_expression.rb +9 -0
- data/lib/auth0/types/segment_ends_with_expression.rb +9 -0
- data/lib/auth0/types/segment_exists_expression.rb +9 -0
- data/lib/auth0/types/segment_match_conditions.rb +30 -0
- data/lib/auth0/types/segment_match_expression.rb +19 -0
- data/lib/auth0/types/segment_not_match_conditions.rb +30 -0
- data/lib/auth0/types/segment_rule.rb +11 -0
- data/lib/auth0/types/segment_starts_with_expression.rb +9 -0
- data/lib/auth0/types/segment_type_enum.rb +12 -0
- data/lib/auth0/types/segment_type_filter_enum.rb +12 -0
- data/lib/auth0/types/set_email_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/set_guardian_settings_response_content.rb +15 -0
- data/lib/auth0/types/set_phone_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/tenant_settings_sessions.rb +2 -0
- data/lib/auth0/types/tenant_settings_sessions_anonymous.rb +12 -0
- data/lib/auth0/types/update_anonymous_sessions.rb +10 -0
- data/lib/auth0/types/update_client_response_content.rb +6 -0
- data/lib/auth0/types/update_connection_options.rb +4 -0
- data/lib/auth0/types/update_experiment_response_content.rb +45 -0
- data/lib/auth0/types/update_experiment_status_response_content.rb +45 -0
- data/lib/auth0/types/update_feature_flag_parameters.rb +23 -0
- data/lib/auth0/types/update_feature_flag_response_content.rb +23 -0
- data/lib/auth0/types/update_feature_flag_status_response_content.rb +23 -0
- data/lib/auth0/types/update_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/update_resource_server_response_content.rb +6 -0
- data/lib/auth0/types/update_segment_response_content.rb +21 -0
- data/lib/auth0/types/update_tenant_settings_response_content.rb +2 -0
- data/lib/auth0/types/update_variation_overrides_map.rb +23 -0
- data/lib/auth0/types/update_variation_response_content.rb +21 -0
- data/lib/auth0/types/validate_experiment_response_content.rb +11 -0
- data/lib/auth0/types/variation.rb +21 -0
- data/lib/auth0/types/variation_overrides_map.rb +23 -0
- data/lib/auth0/user_attribute_profiles/client.rb +40 -6
- data/lib/auth0/user_blocks/client.rb +20 -2
- data/lib/auth0/user_grants/client.rb +17 -1
- data/lib/auth0/users/authentication_methods/client.rb +57 -9
- data/lib/auth0/users/authenticators/client.rb +3 -0
- data/lib/auth0/users/client.rb +75 -23
- data/lib/auth0/users/connected_accounts/client.rb +8 -1
- data/lib/auth0/users/effective_permissions/client.rb +9 -1
- data/lib/auth0/users/effective_permissions/sources/roles/client.rb +10 -1
- data/lib/auth0/users/effective_roles/client.rb +8 -1
- data/lib/auth0/users/effective_roles/sources/groups/client.rb +9 -1
- data/lib/auth0/users/enrollments/client.rb +9 -4
- data/lib/auth0/users/groups/client.rb +11 -1
- data/lib/auth0/users/identities/client.rb +17 -5
- data/lib/auth0/users/logs/client.rb +10 -1
- data/lib/auth0/users/multifactor/client.rb +9 -0
- data/lib/auth0/users/organizations/client.rb +9 -1
- data/lib/auth0/users/permissions/client.rb +27 -1
- data/lib/auth0/users/refresh_token/client.rb +12 -1
- data/lib/auth0/users/risk_assessments/client.rb +7 -0
- data/lib/auth0/users/roles/client.rb +21 -1
- data/lib/auth0/users/sessions/client.rb +12 -1
- data/lib/auth0/verifiable_credentials/verification/templates/client.rb +32 -4
- data/lib/auth0/version.rb +1 -1
- data/lib/auth0.rb +107 -18
- data/wiremock/wiremock-mappings.json +1246 -366
- metadata +108 -19
- data/lib/auth0/organization_templates/client.rb +0 -220
- data/lib/auth0/organization_templates/types/create_organization_template_request_content.rb +0 -35
- data/lib/auth0/organization_templates/types/list_organization_templates_request_parameters.rb +0 -13
- data/lib/auth0/organization_templates/types/list_template_organizations_request_parameters.rb +0 -15
- data/lib/auth0/organization_templates/types/update_organization_template_request_content.rb +0 -37
- data/lib/auth0/organizations/organization_template/client.rb +0 -117
- data/lib/auth0/types/list_organization_templates_paginated_response_content.rb +0 -11
- data/lib/auth0/types/organization_template.rb +0 -39
- data/lib/auth0/types/organization_template_allowed_strategy_enum.rb +0 -17
- data/lib/auth0/types/organization_template_assigned_organization.rb +0 -10
- data/lib/auth0/types/organization_template_role_visibility_enum.rb +0 -13
- data/lib/auth0/types/organization_template_role_visibility_override.rb +0 -12
- data/lib/auth0/types/organization_template_role_visibility_policy.rb +0 -12
- data/lib/auth0/types/organization_template_use_for_organization_discovery.rb +0 -12
|
@@ -23,6 +23,9 @@ module Auth0
|
|
|
23
23
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
24
24
|
# @option request_options [Integer] :timeout_in_seconds
|
|
25
25
|
#
|
|
26
|
+
# @example
|
|
27
|
+
# client.guardian.factors.push_notification.get_apns_provider
|
|
28
|
+
#
|
|
26
29
|
# @return [Auth0::Types::GetGuardianFactorsProviderApnsResponseContent]
|
|
27
30
|
def get_apns_provider(request_options: {}, **_params)
|
|
28
31
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -38,7 +41,7 @@ module Auth0
|
|
|
38
41
|
end
|
|
39
42
|
code = response.code.to_i
|
|
40
43
|
if code.between?(200, 299)
|
|
41
|
-
Auth0::Types::GetGuardianFactorsProviderApnsResponseContent.load(response.body)
|
|
44
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderApnsResponseContent.load(response.body))
|
|
42
45
|
else
|
|
43
46
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
44
47
|
raise error_class.new(response.body, code: code)
|
|
@@ -56,6 +59,9 @@ module Auth0
|
|
|
56
59
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
57
60
|
# @option request_options [Integer] :timeout_in_seconds
|
|
58
61
|
#
|
|
62
|
+
# @example
|
|
63
|
+
# client.guardian.factors.push_notification.set_apns_provider
|
|
64
|
+
#
|
|
59
65
|
# @return [Auth0::Types::SetGuardianFactorsProviderPushNotificationApnsResponseContent]
|
|
60
66
|
def set_apns_provider(request_options: {}, **params)
|
|
61
67
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -73,7 +79,7 @@ module Auth0
|
|
|
73
79
|
end
|
|
74
80
|
code = response.code.to_i
|
|
75
81
|
if code.between?(200, 299)
|
|
76
|
-
Auth0::Types::SetGuardianFactorsProviderPushNotificationApnsResponseContent.load(response.body)
|
|
82
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPushNotificationApnsResponseContent.load(response.body))
|
|
77
83
|
else
|
|
78
84
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
79
85
|
raise error_class.new(response.body, code: code)
|
|
@@ -90,6 +96,9 @@ module Auth0
|
|
|
90
96
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
91
97
|
# @option request_options [Integer] :timeout_in_seconds
|
|
92
98
|
#
|
|
99
|
+
# @example
|
|
100
|
+
# client.guardian.factors.push_notification.update_apns_provider
|
|
101
|
+
#
|
|
93
102
|
# @return [Auth0::Types::UpdateGuardianFactorsProviderPushNotificationApnsResponseContent]
|
|
94
103
|
def update_apns_provider(request_options: {}, **params)
|
|
95
104
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -107,7 +116,7 @@ module Auth0
|
|
|
107
116
|
end
|
|
108
117
|
code = response.code.to_i
|
|
109
118
|
if code.between?(200, 299)
|
|
110
|
-
Auth0::Types::UpdateGuardianFactorsProviderPushNotificationApnsResponseContent.load(response.body)
|
|
119
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateGuardianFactorsProviderPushNotificationApnsResponseContent.load(response.body))
|
|
111
120
|
else
|
|
112
121
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
113
122
|
raise error_class.new(response.body, code: code)
|
|
@@ -125,6 +134,9 @@ module Auth0
|
|
|
125
134
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
126
135
|
# @option request_options [Integer] :timeout_in_seconds
|
|
127
136
|
#
|
|
137
|
+
# @example
|
|
138
|
+
# client.guardian.factors.push_notification.set_fcm_provider
|
|
139
|
+
#
|
|
128
140
|
# @return [Hash[String, Object]]
|
|
129
141
|
def set_fcm_provider(request_options: {}, **params)
|
|
130
142
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -142,7 +154,7 @@ module Auth0
|
|
|
142
154
|
end
|
|
143
155
|
code = response.code.to_i
|
|
144
156
|
if code.between?(200, 299)
|
|
145
|
-
Auth0::Types::SetGuardianFactorsProviderPushNotificationFcmResponseContent.load(response.body)
|
|
157
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPushNotificationFcmResponseContent.load(response.body))
|
|
146
158
|
else
|
|
147
159
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
148
160
|
raise error_class.new(response.body, code: code)
|
|
@@ -159,6 +171,9 @@ module Auth0
|
|
|
159
171
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
160
172
|
# @option request_options [Integer] :timeout_in_seconds
|
|
161
173
|
#
|
|
174
|
+
# @example
|
|
175
|
+
# client.guardian.factors.push_notification.update_fcm_provider
|
|
176
|
+
#
|
|
162
177
|
# @return [Hash[String, Object]]
|
|
163
178
|
def update_fcm_provider(request_options: {}, **params)
|
|
164
179
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -176,7 +191,7 @@ module Auth0
|
|
|
176
191
|
end
|
|
177
192
|
code = response.code.to_i
|
|
178
193
|
if code.between?(200, 299)
|
|
179
|
-
Auth0::Types::UpdateGuardianFactorsProviderPushNotificationFcmResponseContent.load(response.body)
|
|
194
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateGuardianFactorsProviderPushNotificationFcmResponseContent.load(response.body))
|
|
180
195
|
else
|
|
181
196
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
182
197
|
raise error_class.new(response.body, code: code)
|
|
@@ -194,6 +209,9 @@ module Auth0
|
|
|
194
209
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
195
210
|
# @option request_options [Integer] :timeout_in_seconds
|
|
196
211
|
#
|
|
212
|
+
# @example
|
|
213
|
+
# client.guardian.factors.push_notification.set_fcmv1provider
|
|
214
|
+
#
|
|
197
215
|
# @return [Hash[String, Object]]
|
|
198
216
|
def set_fcmv1provider(request_options: {}, **params)
|
|
199
217
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -211,7 +229,7 @@ module Auth0
|
|
|
211
229
|
end
|
|
212
230
|
code = response.code.to_i
|
|
213
231
|
if code.between?(200, 299)
|
|
214
|
-
Auth0::Types::SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent.load(response.body)
|
|
232
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent.load(response.body))
|
|
215
233
|
else
|
|
216
234
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
217
235
|
raise error_class.new(response.body, code: code)
|
|
@@ -228,6 +246,9 @@ module Auth0
|
|
|
228
246
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
229
247
|
# @option request_options [Integer] :timeout_in_seconds
|
|
230
248
|
#
|
|
249
|
+
# @example
|
|
250
|
+
# client.guardian.factors.push_notification.update_fcmv1provider
|
|
251
|
+
#
|
|
231
252
|
# @return [Hash[String, Object]]
|
|
232
253
|
def update_fcmv1provider(request_options: {}, **params)
|
|
233
254
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -245,7 +266,7 @@ module Auth0
|
|
|
245
266
|
end
|
|
246
267
|
code = response.code.to_i
|
|
247
268
|
if code.between?(200, 299)
|
|
248
|
-
Auth0::Types::UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent.load(response.body)
|
|
269
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent.load(response.body))
|
|
249
270
|
else
|
|
250
271
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
251
272
|
raise error_class.new(response.body, code: code)
|
|
@@ -264,6 +285,9 @@ module Auth0
|
|
|
264
285
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
265
286
|
# @option request_options [Integer] :timeout_in_seconds
|
|
266
287
|
#
|
|
288
|
+
# @example
|
|
289
|
+
# client.guardian.factors.push_notification.get_sns_provider
|
|
290
|
+
#
|
|
267
291
|
# @return [Auth0::Types::GetGuardianFactorsProviderSnsResponseContent]
|
|
268
292
|
def get_sns_provider(request_options: {}, **_params)
|
|
269
293
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -279,7 +303,7 @@ module Auth0
|
|
|
279
303
|
end
|
|
280
304
|
code = response.code.to_i
|
|
281
305
|
if code.between?(200, 299)
|
|
282
|
-
Auth0::Types::GetGuardianFactorsProviderSnsResponseContent.load(response.body)
|
|
306
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderSnsResponseContent.load(response.body))
|
|
283
307
|
else
|
|
284
308
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
285
309
|
raise error_class.new(response.body, code: code)
|
|
@@ -298,6 +322,9 @@ module Auth0
|
|
|
298
322
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
299
323
|
# @option request_options [Integer] :timeout_in_seconds
|
|
300
324
|
#
|
|
325
|
+
# @example
|
|
326
|
+
# client.guardian.factors.push_notification.set_sns_provider
|
|
327
|
+
#
|
|
301
328
|
# @return [Auth0::Types::SetGuardianFactorsProviderPushNotificationSnsResponseContent]
|
|
302
329
|
def set_sns_provider(request_options: {}, **params)
|
|
303
330
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -315,7 +342,7 @@ module Auth0
|
|
|
315
342
|
end
|
|
316
343
|
code = response.code.to_i
|
|
317
344
|
if code.between?(200, 299)
|
|
318
|
-
Auth0::Types::SetGuardianFactorsProviderPushNotificationSnsResponseContent.load(response.body)
|
|
345
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPushNotificationSnsResponseContent.load(response.body))
|
|
319
346
|
else
|
|
320
347
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
321
348
|
raise error_class.new(response.body, code: code)
|
|
@@ -334,6 +361,9 @@ module Auth0
|
|
|
334
361
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
335
362
|
# @option request_options [Integer] :timeout_in_seconds
|
|
336
363
|
#
|
|
364
|
+
# @example
|
|
365
|
+
# client.guardian.factors.push_notification.update_sns_provider
|
|
366
|
+
#
|
|
337
367
|
# @return [Auth0::Types::UpdateGuardianFactorsProviderPushNotificationSnsResponseContent]
|
|
338
368
|
def update_sns_provider(request_options: {}, **params)
|
|
339
369
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -351,7 +381,7 @@ module Auth0
|
|
|
351
381
|
end
|
|
352
382
|
code = response.code.to_i
|
|
353
383
|
if code.between?(200, 299)
|
|
354
|
-
Auth0::Types::UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.load(response.body)
|
|
384
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.load(response.body))
|
|
355
385
|
else
|
|
356
386
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
357
387
|
raise error_class.new(response.body, code: code)
|
|
@@ -370,6 +400,9 @@ module Auth0
|
|
|
370
400
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
371
401
|
# @option request_options [Integer] :timeout_in_seconds
|
|
372
402
|
#
|
|
403
|
+
# @example
|
|
404
|
+
# client.guardian.factors.push_notification.get_selected_provider
|
|
405
|
+
#
|
|
373
406
|
# @return [Auth0::Types::GetGuardianFactorsProviderPushNotificationResponseContent]
|
|
374
407
|
def get_selected_provider(request_options: {}, **_params)
|
|
375
408
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -385,7 +418,7 @@ module Auth0
|
|
|
385
418
|
end
|
|
386
419
|
code = response.code.to_i
|
|
387
420
|
if code.between?(200, 299)
|
|
388
|
-
Auth0::Types::GetGuardianFactorsProviderPushNotificationResponseContent.load(response.body)
|
|
421
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderPushNotificationResponseContent.load(response.body))
|
|
389
422
|
else
|
|
390
423
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
391
424
|
raise error_class.new(response.body, code: code)
|
|
@@ -404,6 +437,9 @@ module Auth0
|
|
|
404
437
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
405
438
|
# @option request_options [Integer] :timeout_in_seconds
|
|
406
439
|
#
|
|
440
|
+
# @example
|
|
441
|
+
# client.guardian.factors.push_notification.set_provider(provider: "guardian")
|
|
442
|
+
#
|
|
407
443
|
# @return [Auth0::Types::SetGuardianFactorsProviderPushNotificationResponseContent]
|
|
408
444
|
def set_provider(request_options: {}, **params)
|
|
409
445
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -421,7 +457,7 @@ module Auth0
|
|
|
421
457
|
end
|
|
422
458
|
code = response.code.to_i
|
|
423
459
|
if code.between?(200, 299)
|
|
424
|
-
Auth0::Types::SetGuardianFactorsProviderPushNotificationResponseContent.load(response.body)
|
|
460
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPushNotificationResponseContent.load(response.body))
|
|
425
461
|
else
|
|
426
462
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
427
463
|
raise error_class.new(response.body, code: code)
|
|
@@ -27,6 +27,9 @@ module Auth0
|
|
|
27
27
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
28
28
|
# @option request_options [Integer] :timeout_in_seconds
|
|
29
29
|
#
|
|
30
|
+
# @example
|
|
31
|
+
# client.guardian.factors.sms.get_twilio_provider
|
|
32
|
+
#
|
|
30
33
|
# @return [Auth0::Types::GetGuardianFactorsProviderSmsTwilioResponseContent]
|
|
31
34
|
def get_twilio_provider(request_options: {}, **_params)
|
|
32
35
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -42,7 +45,7 @@ module Auth0
|
|
|
42
45
|
end
|
|
43
46
|
code = response.code.to_i
|
|
44
47
|
if code.between?(200, 299)
|
|
45
|
-
Auth0::Types::GetGuardianFactorsProviderSmsTwilioResponseContent.load(response.body)
|
|
48
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderSmsTwilioResponseContent.load(response.body))
|
|
46
49
|
else
|
|
47
50
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
48
51
|
raise error_class.new(response.body, code: code)
|
|
@@ -63,6 +66,9 @@ module Auth0
|
|
|
63
66
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
64
67
|
# @option request_options [Integer] :timeout_in_seconds
|
|
65
68
|
#
|
|
69
|
+
# @example
|
|
70
|
+
# client.guardian.factors.sms.set_twilio_provider
|
|
71
|
+
#
|
|
66
72
|
# @return [Auth0::Types::SetGuardianFactorsProviderSmsTwilioResponseContent]
|
|
67
73
|
def set_twilio_provider(request_options: {}, **params)
|
|
68
74
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -80,7 +86,7 @@ module Auth0
|
|
|
80
86
|
end
|
|
81
87
|
code = response.code.to_i
|
|
82
88
|
if code.between?(200, 299)
|
|
83
|
-
Auth0::Types::SetGuardianFactorsProviderSmsTwilioResponseContent.load(response.body)
|
|
89
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderSmsTwilioResponseContent.load(response.body))
|
|
84
90
|
else
|
|
85
91
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
86
92
|
raise error_class.new(response.body, code: code)
|
|
@@ -102,6 +108,9 @@ module Auth0
|
|
|
102
108
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
103
109
|
# @option request_options [Integer] :timeout_in_seconds
|
|
104
110
|
#
|
|
111
|
+
# @example
|
|
112
|
+
# client.guardian.factors.sms.get_selected_provider
|
|
113
|
+
#
|
|
105
114
|
# @return [Auth0::Types::GetGuardianFactorsProviderSmsResponseContent]
|
|
106
115
|
def get_selected_provider(request_options: {}, **_params)
|
|
107
116
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -117,7 +126,7 @@ module Auth0
|
|
|
117
126
|
end
|
|
118
127
|
code = response.code.to_i
|
|
119
128
|
if code.between?(200, 299)
|
|
120
|
-
Auth0::Types::GetGuardianFactorsProviderSmsResponseContent.load(response.body)
|
|
129
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderSmsResponseContent.load(response.body))
|
|
121
130
|
else
|
|
122
131
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
123
132
|
raise error_class.new(response.body, code: code)
|
|
@@ -139,6 +148,9 @@ module Auth0
|
|
|
139
148
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
140
149
|
# @option request_options [Integer] :timeout_in_seconds
|
|
141
150
|
#
|
|
151
|
+
# @example
|
|
152
|
+
# client.guardian.factors.sms.set_provider(provider: "auth0")
|
|
153
|
+
#
|
|
142
154
|
# @return [Auth0::Types::SetGuardianFactorsProviderSmsResponseContent]
|
|
143
155
|
def set_provider(request_options: {}, **params)
|
|
144
156
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -156,7 +168,7 @@ module Auth0
|
|
|
156
168
|
end
|
|
157
169
|
code = response.code.to_i
|
|
158
170
|
if code.between?(200, 299)
|
|
159
|
-
Auth0::Types::SetGuardianFactorsProviderSmsResponseContent.load(response.body)
|
|
171
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderSmsResponseContent.load(response.body))
|
|
160
172
|
else
|
|
161
173
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
162
174
|
raise error_class.new(response.body, code: code)
|
|
@@ -178,6 +190,9 @@ module Auth0
|
|
|
178
190
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
179
191
|
# @option request_options [Integer] :timeout_in_seconds
|
|
180
192
|
#
|
|
193
|
+
# @example
|
|
194
|
+
# client.guardian.factors.sms.get_templates
|
|
195
|
+
#
|
|
181
196
|
# @return [Auth0::Types::GetGuardianFactorSmsTemplatesResponseContent, nil]
|
|
182
197
|
def get_templates(request_options: {}, **_params)
|
|
183
198
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -192,10 +207,12 @@ module Auth0
|
|
|
192
207
|
raise Auth0::Errors::TimeoutError
|
|
193
208
|
end
|
|
194
209
|
code = response.code.to_i
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
210
|
+
if code.between?(200, 299)
|
|
211
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorSmsTemplatesResponseContent.load(response.body))
|
|
212
|
+
else
|
|
213
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
214
|
+
raise error_class.new(response.body, code: code)
|
|
215
|
+
end
|
|
199
216
|
end
|
|
200
217
|
|
|
201
218
|
# This endpoint has been deprecated. To complete this action, use the <a
|
|
@@ -212,6 +229,12 @@ module Auth0
|
|
|
212
229
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
213
230
|
# @option request_options [Integer] :timeout_in_seconds
|
|
214
231
|
#
|
|
232
|
+
# @example
|
|
233
|
+
# client.guardian.factors.sms.set_templates(
|
|
234
|
+
# enrollment_message: "enrollment_message",
|
|
235
|
+
# verification_message: "verification_message"
|
|
236
|
+
# )
|
|
237
|
+
#
|
|
215
238
|
# @return [Auth0::Types::SetGuardianFactorSmsTemplatesResponseContent]
|
|
216
239
|
def set_templates(request_options: {}, **params)
|
|
217
240
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -229,7 +252,7 @@ module Auth0
|
|
|
229
252
|
end
|
|
230
253
|
code = response.code.to_i
|
|
231
254
|
if code.between?(200, 299)
|
|
232
|
-
Auth0::Types::SetGuardianFactorSmsTemplatesResponseContent.load(response.body)
|
|
255
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorSmsTemplatesResponseContent.load(response.body))
|
|
233
256
|
else
|
|
234
257
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
235
258
|
raise error_class.new(response.body, code: code)
|
|
@@ -31,6 +31,9 @@ module Auth0
|
|
|
31
31
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
32
32
|
# @option request_options [Integer] :timeout_in_seconds
|
|
33
33
|
#
|
|
34
|
+
# @example
|
|
35
|
+
# client.guardian.policies.list
|
|
36
|
+
#
|
|
34
37
|
# @return [Array[Auth0::Types::MfaPolicyEnum]]
|
|
35
38
|
def list(request_options: {}, **_params)
|
|
36
39
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -46,7 +49,7 @@ module Auth0
|
|
|
46
49
|
end
|
|
47
50
|
code = response.code.to_i
|
|
48
51
|
if code.between?(200, 299)
|
|
49
|
-
Auth0::Types::ListGuardianPoliciesResponseContent.load(response.body)
|
|
52
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::ListGuardianPoliciesResponseContent.load(response.body))
|
|
50
53
|
else
|
|
51
54
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
52
55
|
raise error_class.new(response.body, code: code)
|
|
@@ -73,6 +76,9 @@ module Auth0
|
|
|
73
76
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
74
77
|
# @option request_options [Integer] :timeout_in_seconds
|
|
75
78
|
#
|
|
79
|
+
# @example
|
|
80
|
+
# client.guardian.policies.set(request: ["all-applications"])
|
|
81
|
+
#
|
|
76
82
|
# @return [Array[Auth0::Types::MfaPolicyEnum]]
|
|
77
83
|
def set(request_options: {}, **params)
|
|
78
84
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -90,7 +96,7 @@ module Auth0
|
|
|
90
96
|
end
|
|
91
97
|
code = response.code.to_i
|
|
92
98
|
if code.between?(200, 299)
|
|
93
|
-
Auth0::Types::SetGuardianPoliciesResponseContent.load(response.body)
|
|
99
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianPoliciesResponseContent.load(response.body))
|
|
94
100
|
else
|
|
95
101
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
96
102
|
raise error_class.new(response.body, code: code)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module Guardian
|
|
5
|
+
module Types
|
|
6
|
+
class SetGuardianSettingsRequestContent < Internal::Types::Model
|
|
7
|
+
field :display_remember_me_checkbox, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :remember_me_default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :mfa_session_inactivity_timeout, -> { Integer }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :mfa_session_overall_timeout, -> { Integer }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
data/lib/auth0/hooks/client.rb
CHANGED
|
@@ -27,6 +27,16 @@ module Auth0
|
|
|
27
27
|
# @option params [String, nil] :fields
|
|
28
28
|
# @option params [Auth0::Types::HookTriggerIDEnum, nil] :trigger_id
|
|
29
29
|
#
|
|
30
|
+
# @example
|
|
31
|
+
# client.hooks.list(
|
|
32
|
+
# page: 1,
|
|
33
|
+
# per_page: 1,
|
|
34
|
+
# include_totals: true,
|
|
35
|
+
# enabled: true,
|
|
36
|
+
# fields: "fields",
|
|
37
|
+
# trigger_id: "credentials-exchange"
|
|
38
|
+
# )
|
|
39
|
+
#
|
|
30
40
|
# @return [Auth0::Types::ListHooksOffsetPaginatedResponseContent]
|
|
31
41
|
def list(request_options: {}, **params)
|
|
32
42
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -59,7 +69,7 @@ module Auth0
|
|
|
59
69
|
end
|
|
60
70
|
code = response.code.to_i
|
|
61
71
|
if code.between?(200, 299)
|
|
62
|
-
parsed_response = Auth0::Types::ListHooksOffsetPaginatedResponseContent.load(response.body)
|
|
72
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListHooksOffsetPaginatedResponseContent.load(response.body))
|
|
63
73
|
[parsed_response, response]
|
|
64
74
|
else
|
|
65
75
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -78,6 +88,13 @@ module Auth0
|
|
|
78
88
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
79
89
|
# @option request_options [Integer] :timeout_in_seconds
|
|
80
90
|
#
|
|
91
|
+
# @example
|
|
92
|
+
# client.hooks.create(
|
|
93
|
+
# name: "name",
|
|
94
|
+
# script: "script",
|
|
95
|
+
# trigger_id: "credentials-exchange"
|
|
96
|
+
# )
|
|
97
|
+
#
|
|
81
98
|
# @return [Auth0::Types::CreateHookResponseContent]
|
|
82
99
|
def create(request_options: {}, **params)
|
|
83
100
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -95,7 +112,7 @@ module Auth0
|
|
|
95
112
|
end
|
|
96
113
|
code = response.code.to_i
|
|
97
114
|
if code.between?(200, 299)
|
|
98
|
-
Auth0::Types::CreateHookResponseContent.load(response.body)
|
|
115
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateHookResponseContent.load(response.body))
|
|
99
116
|
else
|
|
100
117
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
101
118
|
raise error_class.new(response.body, code: code)
|
|
@@ -114,6 +131,12 @@ module Auth0
|
|
|
114
131
|
# @option params [String] :id
|
|
115
132
|
# @option params [String, nil] :fields
|
|
116
133
|
#
|
|
134
|
+
# @example
|
|
135
|
+
# client.hooks.get(
|
|
136
|
+
# id: "id",
|
|
137
|
+
# fields: "fields"
|
|
138
|
+
# )
|
|
139
|
+
#
|
|
117
140
|
# @return [Auth0::Types::GetHookResponseContent]
|
|
118
141
|
def get(request_options: {}, **params)
|
|
119
142
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -134,7 +157,7 @@ module Auth0
|
|
|
134
157
|
end
|
|
135
158
|
code = response.code.to_i
|
|
136
159
|
if code.between?(200, 299)
|
|
137
|
-
Auth0::Types::GetHookResponseContent.load(response.body)
|
|
160
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetHookResponseContent.load(response.body))
|
|
138
161
|
else
|
|
139
162
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
140
163
|
raise error_class.new(response.body, code: code)
|
|
@@ -152,6 +175,9 @@ module Auth0
|
|
|
152
175
|
# @option request_options [Integer] :timeout_in_seconds
|
|
153
176
|
# @option params [String] :id
|
|
154
177
|
#
|
|
178
|
+
# @example
|
|
179
|
+
# client.hooks.delete(id: "id")
|
|
180
|
+
#
|
|
155
181
|
# @return [untyped]
|
|
156
182
|
def delete(request_options: {}, **params)
|
|
157
183
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -184,6 +210,9 @@ module Auth0
|
|
|
184
210
|
# @option request_options [Integer] :timeout_in_seconds
|
|
185
211
|
# @option params [String] :id
|
|
186
212
|
#
|
|
213
|
+
# @example
|
|
214
|
+
# client.hooks.update(id: "id")
|
|
215
|
+
#
|
|
187
216
|
# @return [Auth0::Types::UpdateHookResponseContent]
|
|
188
217
|
def update(request_options: {}, **params)
|
|
189
218
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -205,7 +234,7 @@ module Auth0
|
|
|
205
234
|
end
|
|
206
235
|
code = response.code.to_i
|
|
207
236
|
if code.between?(200, 299)
|
|
208
|
-
Auth0::Types::UpdateHookResponseContent.load(response.body)
|
|
237
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateHookResponseContent.load(response.body))
|
|
209
238
|
else
|
|
210
239
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
211
240
|
raise error_class.new(response.body, code: code)
|
|
@@ -22,6 +22,9 @@ module Auth0
|
|
|
22
22
|
# @option request_options [Integer] :timeout_in_seconds
|
|
23
23
|
# @option params [String] :id
|
|
24
24
|
#
|
|
25
|
+
# @example
|
|
26
|
+
# client.hooks.secrets.get(id: "id")
|
|
27
|
+
#
|
|
25
28
|
# @return [Hash[String, String]]
|
|
26
29
|
def get(request_options: {}, **params)
|
|
27
30
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -38,7 +41,7 @@ module Auth0
|
|
|
38
41
|
end
|
|
39
42
|
code = response.code.to_i
|
|
40
43
|
if code.between?(200, 299)
|
|
41
|
-
Auth0::Types::GetHookSecretResponseContent.load(response.body)
|
|
44
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetHookSecretResponseContent.load(response.body))
|
|
42
45
|
else
|
|
43
46
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
44
47
|
raise error_class.new(response.body, code: code)
|
|
@@ -57,14 +60,25 @@ module Auth0
|
|
|
57
60
|
# @option request_options [Integer] :timeout_in_seconds
|
|
58
61
|
# @option params [String] :id
|
|
59
62
|
#
|
|
63
|
+
# @example
|
|
64
|
+
# client.hooks.secrets.create(
|
|
65
|
+
# id: "id",
|
|
66
|
+
# request: {
|
|
67
|
+
# key: "value"
|
|
68
|
+
# }
|
|
69
|
+
# )
|
|
70
|
+
#
|
|
60
71
|
# @return [untyped]
|
|
61
72
|
def create(request_options: {}, **params)
|
|
62
73
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
74
|
+
path_param_names = %i[id]
|
|
75
|
+
body_params = params.except(*path_param_names)
|
|
76
|
+
|
|
63
77
|
request = Auth0::Internal::JSON::Request.new(
|
|
64
78
|
base_url: request_options[:base_url],
|
|
65
79
|
method: "POST",
|
|
66
80
|
path: "hooks/#{URI.encode_uri_component(params[:id].to_s)}/secrets",
|
|
67
|
-
body:
|
|
81
|
+
body: body_params,
|
|
68
82
|
request_options: request_options
|
|
69
83
|
)
|
|
70
84
|
begin
|
|
@@ -90,14 +104,23 @@ module Auth0
|
|
|
90
104
|
# @option request_options [Integer] :timeout_in_seconds
|
|
91
105
|
# @option params [String] :id
|
|
92
106
|
#
|
|
107
|
+
# @example
|
|
108
|
+
# client.hooks.secrets.delete(
|
|
109
|
+
# id: "id",
|
|
110
|
+
# request: ["string"]
|
|
111
|
+
# )
|
|
112
|
+
#
|
|
93
113
|
# @return [untyped]
|
|
94
114
|
def delete(request_options: {}, **params)
|
|
95
115
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
116
|
+
path_param_names = %i[id]
|
|
117
|
+
body_params = params.except(*path_param_names)
|
|
118
|
+
|
|
96
119
|
request = Auth0::Internal::JSON::Request.new(
|
|
97
120
|
base_url: request_options[:base_url],
|
|
98
121
|
method: "DELETE",
|
|
99
122
|
path: "hooks/#{URI.encode_uri_component(params[:id].to_s)}/secrets",
|
|
100
|
-
body:
|
|
123
|
+
body: body_params,
|
|
101
124
|
request_options: request_options
|
|
102
125
|
)
|
|
103
126
|
begin
|
|
@@ -124,14 +147,25 @@ module Auth0
|
|
|
124
147
|
# @option request_options [Integer] :timeout_in_seconds
|
|
125
148
|
# @option params [String] :id
|
|
126
149
|
#
|
|
150
|
+
# @example
|
|
151
|
+
# client.hooks.secrets.update(
|
|
152
|
+
# id: "id",
|
|
153
|
+
# request: {
|
|
154
|
+
# key: "value"
|
|
155
|
+
# }
|
|
156
|
+
# )
|
|
157
|
+
#
|
|
127
158
|
# @return [untyped]
|
|
128
159
|
def update(request_options: {}, **params)
|
|
129
160
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
161
|
+
path_param_names = %i[id]
|
|
162
|
+
body_params = params.except(*path_param_names)
|
|
163
|
+
|
|
130
164
|
request = Auth0::Internal::JSON::Request.new(
|
|
131
165
|
base_url: request_options[:base_url],
|
|
132
166
|
method: "PATCH",
|
|
133
167
|
path: "hooks/#{URI.encode_uri_component(params[:id].to_s)}/secrets",
|
|
134
|
-
body:
|
|
168
|
+
body: body_params,
|
|
135
169
|
request_options: request_options
|
|
136
170
|
)
|
|
137
171
|
begin
|
data/lib/auth0/jobs/client.rb
CHANGED
|
@@ -21,6 +21,9 @@ module Auth0
|
|
|
21
21
|
# @option request_options [Integer] :timeout_in_seconds
|
|
22
22
|
# @option params [String] :id
|
|
23
23
|
#
|
|
24
|
+
# @example
|
|
25
|
+
# client.jobs.get(id: "id")
|
|
26
|
+
#
|
|
24
27
|
# @return [Auth0::Types::GetJobResponseContent]
|
|
25
28
|
def get(request_options: {}, **params)
|
|
26
29
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -37,7 +40,7 @@ module Auth0
|
|
|
37
40
|
end
|
|
38
41
|
code = response.code.to_i
|
|
39
42
|
if code.between?(200, 299)
|
|
40
|
-
Auth0::Types::GetJobResponseContent.load(response.body)
|
|
43
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetJobResponseContent.load(response.body))
|
|
41
44
|
else
|
|
42
45
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
43
46
|
raise error_class.new(response.body, code: code)
|
|
@@ -22,6 +22,9 @@ module Auth0
|
|
|
22
22
|
# @option request_options [Integer] :timeout_in_seconds
|
|
23
23
|
# @option params [String] :id
|
|
24
24
|
#
|
|
25
|
+
# @example
|
|
26
|
+
# client.jobs.errors.get(id: "id")
|
|
27
|
+
#
|
|
25
28
|
# @return [Auth0::Jobs::Errors::Types::ErrorsGetResponse, nil]
|
|
26
29
|
def get(request_options: {}, **params)
|
|
27
30
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -37,10 +40,12 @@ module Auth0
|
|
|
37
40
|
raise Auth0::Errors::TimeoutError
|
|
38
41
|
end
|
|
39
42
|
code = response.code.to_i
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
if code.between?(200, 299)
|
|
44
|
+
(response.body.to_s.empty? ? nil : Auth0::Jobs::Errors::Types::ErrorsGetResponse.load(response.body))
|
|
45
|
+
else
|
|
46
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
47
|
+
raise error_class.new(response.body, code: code)
|
|
48
|
+
end
|
|
44
49
|
end
|
|
45
50
|
end
|
|
46
51
|
end
|
|
@@ -21,6 +21,9 @@ module Auth0
|
|
|
21
21
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
22
22
|
# @option request_options [Integer] :timeout_in_seconds
|
|
23
23
|
#
|
|
24
|
+
# @example
|
|
25
|
+
# client.jobs.users_exports.create
|
|
26
|
+
#
|
|
24
27
|
# @return [Auth0::Types::CreateExportUsersResponseContent]
|
|
25
28
|
def create(request_options: {}, **params)
|
|
26
29
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -38,7 +41,7 @@ module Auth0
|
|
|
38
41
|
end
|
|
39
42
|
code = response.code.to_i
|
|
40
43
|
if code.between?(200, 299)
|
|
41
|
-
Auth0::Types::CreateExportUsersResponseContent.load(response.body)
|
|
44
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateExportUsersResponseContent.load(response.body))
|
|
42
45
|
else
|
|
43
46
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
44
47
|
raise error_class.new(response.body, code: code)
|