auth0 6.2.0 → 6.3.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 +3 -3
- data/.fern/replay.lock +7 -1
- data/.version +1 -1
- data/CHANGELOG.md +7 -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 +2 -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 +19 -0
- data/lib/auth0/experimentation/experiments/client.rb +63 -0
- data/lib/auth0/experimentation/experiments/types/advance_ramp_request_content.rb +15 -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 -5
- 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/organization_template/client.rb +16 -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 +4 -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 +4 -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/anonymous_sessions.rb +10 -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/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_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/create_resource_server_response_content.rb +4 -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_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 +4 -0
- data/lib/auth0/types/get_tenant_settings_response_content.rb +2 -0
- data/lib/auth0/types/oauth_scope.rb +1 -2
- 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 +4 -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 +53 -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/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_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/update_resource_server_response_content.rb +4 -0
- data/lib/auth0/types/update_tenant_settings_response_content.rb +2 -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 +54 -9
- 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 +46 -16
- data/wiremock/wiremock-mappings.json +333 -191
- metadata +40 -10
- 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/types/list_organization_templates_paginated_response_content.rb +0 -11
- data/lib/auth0/types/organization_template_assigned_organization.rb +0 -10
|
@@ -19,6 +19,9 @@ module Auth0
|
|
|
19
19
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
20
20
|
# @option request_options [Integer] :timeout_in_seconds
|
|
21
21
|
#
|
|
22
|
+
# @example
|
|
23
|
+
# client.branding.templates.get_universal_login
|
|
24
|
+
#
|
|
22
25
|
# @return [Auth0::Types::GetUniversalLoginTemplateResponseContent]
|
|
23
26
|
def get_universal_login(request_options: {}, **_params)
|
|
24
27
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -34,7 +37,7 @@ module Auth0
|
|
|
34
37
|
end
|
|
35
38
|
code = response.code.to_i
|
|
36
39
|
if code.between?(200, 299)
|
|
37
|
-
Auth0::Types::GetUniversalLoginTemplateResponseContent.load(response.body)
|
|
40
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetUniversalLoginTemplateResponseContent.load(response.body))
|
|
38
41
|
else
|
|
39
42
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
40
43
|
raise error_class.new(response.body, code: code)
|
|
@@ -76,6 +79,9 @@ module Auth0
|
|
|
76
79
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
77
80
|
# @option request_options [Integer] :timeout_in_seconds
|
|
78
81
|
#
|
|
82
|
+
# @example
|
|
83
|
+
# client.branding.templates.update_universal_login(request: "string")
|
|
84
|
+
#
|
|
79
85
|
# @return [untyped]
|
|
80
86
|
def update_universal_login(request_options: {}, **params)
|
|
81
87
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -106,6 +112,9 @@ module Auth0
|
|
|
106
112
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
107
113
|
# @option request_options [Integer] :timeout_in_seconds
|
|
108
114
|
#
|
|
115
|
+
# @example
|
|
116
|
+
# client.branding.templates.delete_universal_login
|
|
117
|
+
#
|
|
109
118
|
# @return [untyped]
|
|
110
119
|
def delete_universal_login(request_options: {}, **_params)
|
|
111
120
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -21,6 +21,80 @@ 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.branding.themes.create(
|
|
26
|
+
# borders: {
|
|
27
|
+
# button_border_radius: 1.1,
|
|
28
|
+
# button_border_weight: 1.1,
|
|
29
|
+
# buttons_style: "pill",
|
|
30
|
+
# input_border_radius: 1.1,
|
|
31
|
+
# input_border_weight: 1.1,
|
|
32
|
+
# inputs_style: "pill",
|
|
33
|
+
# show_widget_shadow: true,
|
|
34
|
+
# widget_border_weight: 1.1,
|
|
35
|
+
# widget_corner_radius: 1.1
|
|
36
|
+
# },
|
|
37
|
+
# colors: {
|
|
38
|
+
# body_text: "body_text",
|
|
39
|
+
# error: "error",
|
|
40
|
+
# header: "header",
|
|
41
|
+
# icons: "icons",
|
|
42
|
+
# input_background: "input_background",
|
|
43
|
+
# input_border: "input_border",
|
|
44
|
+
# input_filled_text: "input_filled_text",
|
|
45
|
+
# input_labels_placeholders: "input_labels_placeholders",
|
|
46
|
+
# links_focused_components: "links_focused_components",
|
|
47
|
+
# primary_button: "primary_button",
|
|
48
|
+
# primary_button_label: "primary_button_label",
|
|
49
|
+
# secondary_button_border: "secondary_button_border",
|
|
50
|
+
# secondary_button_label: "secondary_button_label",
|
|
51
|
+
# success: "success",
|
|
52
|
+
# widget_background: "widget_background",
|
|
53
|
+
# widget_border: "widget_border"
|
|
54
|
+
# },
|
|
55
|
+
# fonts: {
|
|
56
|
+
# body_text: {
|
|
57
|
+
# bold: true,
|
|
58
|
+
# size: 1.1
|
|
59
|
+
# },
|
|
60
|
+
# buttons_text: {
|
|
61
|
+
# bold: true,
|
|
62
|
+
# size: 1.1
|
|
63
|
+
# },
|
|
64
|
+
# font_url: "font_url",
|
|
65
|
+
# input_labels: {
|
|
66
|
+
# bold: true,
|
|
67
|
+
# size: 1.1
|
|
68
|
+
# },
|
|
69
|
+
# links: {
|
|
70
|
+
# bold: true,
|
|
71
|
+
# size: 1.1
|
|
72
|
+
# },
|
|
73
|
+
# links_style: "normal",
|
|
74
|
+
# reference_text_size: 1.1,
|
|
75
|
+
# subtitle: {
|
|
76
|
+
# bold: true,
|
|
77
|
+
# size: 1.1
|
|
78
|
+
# },
|
|
79
|
+
# title: {
|
|
80
|
+
# bold: true,
|
|
81
|
+
# size: 1.1
|
|
82
|
+
# }
|
|
83
|
+
# },
|
|
84
|
+
# page_background: {
|
|
85
|
+
# background_color: "background_color",
|
|
86
|
+
# background_image_url: "background_image_url",
|
|
87
|
+
# page_layout: "center"
|
|
88
|
+
# },
|
|
89
|
+
# widget: {
|
|
90
|
+
# header_text_alignment: "center",
|
|
91
|
+
# logo_height: 1.1,
|
|
92
|
+
# logo_position: "center",
|
|
93
|
+
# logo_url: "logo_url",
|
|
94
|
+
# social_buttons_layout: "bottom"
|
|
95
|
+
# }
|
|
96
|
+
# )
|
|
97
|
+
#
|
|
24
98
|
# @return [Auth0::Types::CreateBrandingThemeResponseContent]
|
|
25
99
|
def create(request_options: {}, **params)
|
|
26
100
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -38,7 +112,7 @@ module Auth0
|
|
|
38
112
|
end
|
|
39
113
|
code = response.code.to_i
|
|
40
114
|
if code.between?(200, 299)
|
|
41
|
-
Auth0::Types::CreateBrandingThemeResponseContent.load(response.body)
|
|
115
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateBrandingThemeResponseContent.load(response.body))
|
|
42
116
|
else
|
|
43
117
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
44
118
|
raise error_class.new(response.body, code: code)
|
|
@@ -55,6 +129,9 @@ module Auth0
|
|
|
55
129
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
56
130
|
# @option request_options [Integer] :timeout_in_seconds
|
|
57
131
|
#
|
|
132
|
+
# @example
|
|
133
|
+
# client.branding.themes.get_default
|
|
134
|
+
#
|
|
58
135
|
# @return [Auth0::Types::GetBrandingDefaultThemeResponseContent]
|
|
59
136
|
def get_default(request_options: {}, **_params)
|
|
60
137
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -70,7 +147,7 @@ module Auth0
|
|
|
70
147
|
end
|
|
71
148
|
code = response.code.to_i
|
|
72
149
|
if code.between?(200, 299)
|
|
73
|
-
Auth0::Types::GetBrandingDefaultThemeResponseContent.load(response.body)
|
|
150
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetBrandingDefaultThemeResponseContent.load(response.body))
|
|
74
151
|
else
|
|
75
152
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
76
153
|
raise error_class.new(response.body, code: code)
|
|
@@ -88,6 +165,9 @@ module Auth0
|
|
|
88
165
|
# @option request_options [Integer] :timeout_in_seconds
|
|
89
166
|
# @option params [String] :theme_id
|
|
90
167
|
#
|
|
168
|
+
# @example
|
|
169
|
+
# client.branding.themes.get(theme_id: "themeId")
|
|
170
|
+
#
|
|
91
171
|
# @return [Auth0::Types::GetBrandingThemeResponseContent]
|
|
92
172
|
def get(request_options: {}, **params)
|
|
93
173
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -104,7 +184,7 @@ module Auth0
|
|
|
104
184
|
end
|
|
105
185
|
code = response.code.to_i
|
|
106
186
|
if code.between?(200, 299)
|
|
107
|
-
Auth0::Types::GetBrandingThemeResponseContent.load(response.body)
|
|
187
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetBrandingThemeResponseContent.load(response.body))
|
|
108
188
|
else
|
|
109
189
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
110
190
|
raise error_class.new(response.body, code: code)
|
|
@@ -122,6 +202,9 @@ module Auth0
|
|
|
122
202
|
# @option request_options [Integer] :timeout_in_seconds
|
|
123
203
|
# @option params [String] :theme_id
|
|
124
204
|
#
|
|
205
|
+
# @example
|
|
206
|
+
# client.branding.themes.delete(theme_id: "themeId")
|
|
207
|
+
#
|
|
125
208
|
# @return [untyped]
|
|
126
209
|
def delete(request_options: {}, **params)
|
|
127
210
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -154,6 +237,81 @@ module Auth0
|
|
|
154
237
|
# @option request_options [Integer] :timeout_in_seconds
|
|
155
238
|
# @option params [String] :theme_id
|
|
156
239
|
#
|
|
240
|
+
# @example
|
|
241
|
+
# client.branding.themes.update(
|
|
242
|
+
# theme_id: "themeId",
|
|
243
|
+
# borders: {
|
|
244
|
+
# button_border_radius: 1.1,
|
|
245
|
+
# button_border_weight: 1.1,
|
|
246
|
+
# buttons_style: "pill",
|
|
247
|
+
# input_border_radius: 1.1,
|
|
248
|
+
# input_border_weight: 1.1,
|
|
249
|
+
# inputs_style: "pill",
|
|
250
|
+
# show_widget_shadow: true,
|
|
251
|
+
# widget_border_weight: 1.1,
|
|
252
|
+
# widget_corner_radius: 1.1
|
|
253
|
+
# },
|
|
254
|
+
# colors: {
|
|
255
|
+
# body_text: "body_text",
|
|
256
|
+
# error: "error",
|
|
257
|
+
# header: "header",
|
|
258
|
+
# icons: "icons",
|
|
259
|
+
# input_background: "input_background",
|
|
260
|
+
# input_border: "input_border",
|
|
261
|
+
# input_filled_text: "input_filled_text",
|
|
262
|
+
# input_labels_placeholders: "input_labels_placeholders",
|
|
263
|
+
# links_focused_components: "links_focused_components",
|
|
264
|
+
# primary_button: "primary_button",
|
|
265
|
+
# primary_button_label: "primary_button_label",
|
|
266
|
+
# secondary_button_border: "secondary_button_border",
|
|
267
|
+
# secondary_button_label: "secondary_button_label",
|
|
268
|
+
# success: "success",
|
|
269
|
+
# widget_background: "widget_background",
|
|
270
|
+
# widget_border: "widget_border"
|
|
271
|
+
# },
|
|
272
|
+
# fonts: {
|
|
273
|
+
# body_text: {
|
|
274
|
+
# bold: true,
|
|
275
|
+
# size: 1.1
|
|
276
|
+
# },
|
|
277
|
+
# buttons_text: {
|
|
278
|
+
# bold: true,
|
|
279
|
+
# size: 1.1
|
|
280
|
+
# },
|
|
281
|
+
# font_url: "font_url",
|
|
282
|
+
# input_labels: {
|
|
283
|
+
# bold: true,
|
|
284
|
+
# size: 1.1
|
|
285
|
+
# },
|
|
286
|
+
# links: {
|
|
287
|
+
# bold: true,
|
|
288
|
+
# size: 1.1
|
|
289
|
+
# },
|
|
290
|
+
# links_style: "normal",
|
|
291
|
+
# reference_text_size: 1.1,
|
|
292
|
+
# subtitle: {
|
|
293
|
+
# bold: true,
|
|
294
|
+
# size: 1.1
|
|
295
|
+
# },
|
|
296
|
+
# title: {
|
|
297
|
+
# bold: true,
|
|
298
|
+
# size: 1.1
|
|
299
|
+
# }
|
|
300
|
+
# },
|
|
301
|
+
# page_background: {
|
|
302
|
+
# background_color: "background_color",
|
|
303
|
+
# background_image_url: "background_image_url",
|
|
304
|
+
# page_layout: "center"
|
|
305
|
+
# },
|
|
306
|
+
# widget: {
|
|
307
|
+
# header_text_alignment: "center",
|
|
308
|
+
# logo_height: 1.1,
|
|
309
|
+
# logo_position: "center",
|
|
310
|
+
# logo_url: "logo_url",
|
|
311
|
+
# social_buttons_layout: "bottom"
|
|
312
|
+
# }
|
|
313
|
+
# )
|
|
314
|
+
#
|
|
157
315
|
# @return [Auth0::Types::UpdateBrandingThemeResponseContent]
|
|
158
316
|
def update(request_options: {}, **params)
|
|
159
317
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -175,7 +333,7 @@ module Auth0
|
|
|
175
333
|
end
|
|
176
334
|
code = response.code.to_i
|
|
177
335
|
if code.between?(200, 299)
|
|
178
|
-
Auth0::Types::UpdateBrandingThemeResponseContent.load(response.body)
|
|
336
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateBrandingThemeResponseContent.load(response.body))
|
|
179
337
|
else
|
|
180
338
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
181
339
|
raise error_class.new(response.body, code: code)
|
data/lib/auth0/client.rb
CHANGED
|
@@ -103,6 +103,11 @@ module Auth0
|
|
|
103
103
|
@groups ||= Auth0::Groups::Client.new(client: @raw_client)
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
+
# @return [Auth0::Guardian::Client]
|
|
107
|
+
def guardian
|
|
108
|
+
@guardian ||= Auth0::Guardian::Client.new(client: @raw_client)
|
|
109
|
+
end
|
|
110
|
+
|
|
106
111
|
# @return [Auth0::Hooks::Client]
|
|
107
112
|
def hooks
|
|
108
113
|
@hooks ||= Auth0::Hooks::Client.new(client: @raw_client)
|
|
@@ -128,11 +133,6 @@ module Auth0
|
|
|
128
133
|
@network_acls ||= Auth0::NetworkACLs::Client.new(client: @raw_client)
|
|
129
134
|
end
|
|
130
135
|
|
|
131
|
-
# @return [Auth0::OrganizationTemplates::Client]
|
|
132
|
-
def organization_templates
|
|
133
|
-
@organization_templates ||= Auth0::OrganizationTemplates::Client.new(client: @raw_client)
|
|
134
|
-
end
|
|
135
|
-
|
|
136
136
|
# @return [Auth0::Organizations::Client]
|
|
137
137
|
def organizations
|
|
138
138
|
@organizations ||= Auth0::Organizations::Client.new(client: @raw_client)
|
|
@@ -233,9 +233,9 @@ module Auth0
|
|
|
233
233
|
@emails ||= Auth0::Emails::Client.new(client: @raw_client)
|
|
234
234
|
end
|
|
235
235
|
|
|
236
|
-
# @return [Auth0::
|
|
237
|
-
def
|
|
238
|
-
@
|
|
236
|
+
# @return [Auth0::Experimentation::Client]
|
|
237
|
+
def experimentation
|
|
238
|
+
@experimentation ||= Auth0::Experimentation::Client.new(client: @raw_client)
|
|
239
239
|
end
|
|
240
240
|
|
|
241
241
|
# @return [Auth0::Keys::Client]
|
|
@@ -30,6 +30,18 @@ module Auth0
|
|
|
30
30
|
# @option params [Auth0::Types::ClientGrantSubjectTypeEnum, nil] :subject_type
|
|
31
31
|
# @option params [Auth0::Types::ClientGrantDefaultForEnum, nil] :default_for
|
|
32
32
|
#
|
|
33
|
+
# @example
|
|
34
|
+
# client.client_grants.list(
|
|
35
|
+
# include_totals: true,
|
|
36
|
+
# from: "from",
|
|
37
|
+
# take: 1,
|
|
38
|
+
# audience: "audience",
|
|
39
|
+
# client_id: "client_id",
|
|
40
|
+
# allow_any_organization: true,
|
|
41
|
+
# subject_type: "client",
|
|
42
|
+
# default_for: "third_party_clients"
|
|
43
|
+
# )
|
|
44
|
+
#
|
|
33
45
|
# @return [Auth0::Types::ListClientGrantPaginatedResponseContent]
|
|
34
46
|
def list(request_options: {}, **params)
|
|
35
47
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -63,7 +75,7 @@ module Auth0
|
|
|
63
75
|
end
|
|
64
76
|
code = response.code.to_i
|
|
65
77
|
if code.between?(200, 299)
|
|
66
|
-
parsed_response = Auth0::Types::ListClientGrantPaginatedResponseContent.load(response.body)
|
|
78
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListClientGrantPaginatedResponseContent.load(response.body))
|
|
67
79
|
[parsed_response, response]
|
|
68
80
|
else
|
|
69
81
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -83,6 +95,9 @@ module Auth0
|
|
|
83
95
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
84
96
|
# @option request_options [Integer] :timeout_in_seconds
|
|
85
97
|
#
|
|
98
|
+
# @example
|
|
99
|
+
# client.client_grants.create(audience: "audience")
|
|
100
|
+
#
|
|
86
101
|
# @return [Auth0::Types::CreateClientGrantResponseContent]
|
|
87
102
|
def create(request_options: {}, **params)
|
|
88
103
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -100,7 +115,7 @@ module Auth0
|
|
|
100
115
|
end
|
|
101
116
|
code = response.code.to_i
|
|
102
117
|
if code.between?(200, 299)
|
|
103
|
-
Auth0::Types::CreateClientGrantResponseContent.load(response.body)
|
|
118
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateClientGrantResponseContent.load(response.body))
|
|
104
119
|
else
|
|
105
120
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
106
121
|
raise error_class.new(response.body, code: code)
|
|
@@ -120,6 +135,9 @@ module Auth0
|
|
|
120
135
|
# @option request_options [Integer] :timeout_in_seconds
|
|
121
136
|
# @option params [String] :id
|
|
122
137
|
#
|
|
138
|
+
# @example
|
|
139
|
+
# client.client_grants.get(id: "id")
|
|
140
|
+
#
|
|
123
141
|
# @return [Auth0::Types::GetClientGrantResponseContent]
|
|
124
142
|
def get(request_options: {}, **params)
|
|
125
143
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -136,7 +154,7 @@ module Auth0
|
|
|
136
154
|
end
|
|
137
155
|
code = response.code.to_i
|
|
138
156
|
if code.between?(200, 299)
|
|
139
|
-
Auth0::Types::GetClientGrantResponseContent.load(response.body)
|
|
157
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetClientGrantResponseContent.load(response.body))
|
|
140
158
|
else
|
|
141
159
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
142
160
|
raise error_class.new(response.body, code: code)
|
|
@@ -156,6 +174,9 @@ module Auth0
|
|
|
156
174
|
# @option request_options [Integer] :timeout_in_seconds
|
|
157
175
|
# @option params [String] :id
|
|
158
176
|
#
|
|
177
|
+
# @example
|
|
178
|
+
# client.client_grants.delete(id: "id")
|
|
179
|
+
#
|
|
159
180
|
# @return [untyped]
|
|
160
181
|
def delete(request_options: {}, **params)
|
|
161
182
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -188,6 +209,9 @@ module Auth0
|
|
|
188
209
|
# @option request_options [Integer] :timeout_in_seconds
|
|
189
210
|
# @option params [String] :id
|
|
190
211
|
#
|
|
212
|
+
# @example
|
|
213
|
+
# client.client_grants.update(id: "id")
|
|
214
|
+
#
|
|
191
215
|
# @return [Auth0::Types::UpdateClientGrantResponseContent]
|
|
192
216
|
def update(request_options: {}, **params)
|
|
193
217
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -209,7 +233,7 @@ module Auth0
|
|
|
209
233
|
end
|
|
210
234
|
code = response.code.to_i
|
|
211
235
|
if code.between?(200, 299)
|
|
212
|
-
Auth0::Types::UpdateClientGrantResponseContent.load(response.body)
|
|
236
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateClientGrantResponseContent.load(response.body))
|
|
213
237
|
else
|
|
214
238
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
215
239
|
raise error_class.new(response.body, code: code)
|
|
@@ -23,6 +23,14 @@ module Auth0
|
|
|
23
23
|
# @option params [String, nil] :from
|
|
24
24
|
# @option params [Integer, nil] :take
|
|
25
25
|
#
|
|
26
|
+
# @example
|
|
27
|
+
# client.client_grants.organizations.list(
|
|
28
|
+
# id: "id",
|
|
29
|
+
# include_totals: true,
|
|
30
|
+
# from: "from",
|
|
31
|
+
# take: 1
|
|
32
|
+
# )
|
|
33
|
+
#
|
|
26
34
|
# @return [Auth0::Types::ListClientGrantOrganizationsPaginatedResponseContent]
|
|
27
35
|
def list(request_options: {}, **params)
|
|
28
36
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -51,7 +59,7 @@ module Auth0
|
|
|
51
59
|
end
|
|
52
60
|
code = response.code.to_i
|
|
53
61
|
if code.between?(200, 299)
|
|
54
|
-
parsed_response = Auth0::Types::ListClientGrantOrganizationsPaginatedResponseContent.load(response.body)
|
|
62
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListClientGrantOrganizationsPaginatedResponseContent.load(response.body))
|
|
55
63
|
[parsed_response, response]
|
|
56
64
|
else
|
|
57
65
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
data/lib/auth0/clients/client.rb
CHANGED
|
@@ -56,6 +56,20 @@ module Auth0
|
|
|
56
56
|
# @option params [String, nil] :external_client_id
|
|
57
57
|
# @option params [String, nil] :q
|
|
58
58
|
#
|
|
59
|
+
# @example
|
|
60
|
+
# client.clients.list(
|
|
61
|
+
# fields: "fields",
|
|
62
|
+
# include_fields: true,
|
|
63
|
+
# page: 1,
|
|
64
|
+
# per_page: 1,
|
|
65
|
+
# include_totals: true,
|
|
66
|
+
# is_global: true,
|
|
67
|
+
# is_first_party: true,
|
|
68
|
+
# app_type: "app_type",
|
|
69
|
+
# external_client_id: "external_client_id",
|
|
70
|
+
# q: "q"
|
|
71
|
+
# )
|
|
72
|
+
#
|
|
59
73
|
# @return [Auth0::Types::ListClientsOffsetPaginatedResponseContent]
|
|
60
74
|
def list(request_options: {}, **params)
|
|
61
75
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -92,7 +106,7 @@ module Auth0
|
|
|
92
106
|
end
|
|
93
107
|
code = response.code.to_i
|
|
94
108
|
if code.between?(200, 299)
|
|
95
|
-
parsed_response = Auth0::Types::ListClientsOffsetPaginatedResponseContent.load(response.body)
|
|
109
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListClientsOffsetPaginatedResponseContent.load(response.body))
|
|
96
110
|
[parsed_response, response]
|
|
97
111
|
else
|
|
98
112
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -128,6 +142,9 @@ module Auth0
|
|
|
128
142
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
129
143
|
# @option request_options [Integer] :timeout_in_seconds
|
|
130
144
|
#
|
|
145
|
+
# @example
|
|
146
|
+
# client.clients.create(name: "name")
|
|
147
|
+
#
|
|
131
148
|
# @return [Auth0::Types::CreateClientResponseContent]
|
|
132
149
|
def create(request_options: {}, **params)
|
|
133
150
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -145,7 +162,7 @@ module Auth0
|
|
|
145
162
|
end
|
|
146
163
|
code = response.code.to_i
|
|
147
164
|
if code.between?(200, 299)
|
|
148
|
-
Auth0::Types::CreateClientResponseContent.load(response.body)
|
|
165
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateClientResponseContent.load(response.body))
|
|
149
166
|
else
|
|
150
167
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
151
168
|
raise error_class.new(response.body, code: code)
|
|
@@ -166,6 +183,9 @@ module Auth0
|
|
|
166
183
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
167
184
|
# @option request_options [Integer] :timeout_in_seconds
|
|
168
185
|
#
|
|
186
|
+
# @example
|
|
187
|
+
# client.clients.preview_cimd_metadata(external_client_id: "external_client_id")
|
|
188
|
+
#
|
|
169
189
|
# @return [Auth0::Types::PreviewCimdMetadataResponseContent]
|
|
170
190
|
def preview_cimd_metadata(request_options: {}, **params)
|
|
171
191
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -183,7 +203,7 @@ module Auth0
|
|
|
183
203
|
end
|
|
184
204
|
code = response.code.to_i
|
|
185
205
|
if code.between?(200, 299)
|
|
186
|
-
Auth0::Types::PreviewCimdMetadataResponseContent.load(response.body)
|
|
206
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::PreviewCimdMetadataResponseContent.load(response.body))
|
|
187
207
|
else
|
|
188
208
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
189
209
|
raise error_class.new(response.body, code: code)
|
|
@@ -210,6 +230,9 @@ module Auth0
|
|
|
210
230
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
211
231
|
# @option request_options [Integer] :timeout_in_seconds
|
|
212
232
|
#
|
|
233
|
+
# @example
|
|
234
|
+
# client.clients.register_cimd_client(external_client_id: "external_client_id")
|
|
235
|
+
#
|
|
213
236
|
# @return [Auth0::Types::RegisterCimdClientResponseContent]
|
|
214
237
|
def register_cimd_client(request_options: {}, **params)
|
|
215
238
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -227,7 +250,7 @@ module Auth0
|
|
|
227
250
|
end
|
|
228
251
|
code = response.code.to_i
|
|
229
252
|
if code.between?(200, 299)
|
|
230
|
-
Auth0::Types::RegisterCimdClientResponseContent.load(response.body)
|
|
253
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::RegisterCimdClientResponseContent.load(response.body))
|
|
231
254
|
else
|
|
232
255
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
233
256
|
raise error_class.new(response.body, code: code)
|
|
@@ -273,6 +296,13 @@ module Auth0
|
|
|
273
296
|
# @option params [String, nil] :fields
|
|
274
297
|
# @option params [Boolean, nil] :include_fields
|
|
275
298
|
#
|
|
299
|
+
# @example
|
|
300
|
+
# client.clients.get(
|
|
301
|
+
# id: "id",
|
|
302
|
+
# fields: "fields",
|
|
303
|
+
# include_fields: true
|
|
304
|
+
# )
|
|
305
|
+
#
|
|
276
306
|
# @return [Auth0::Types::GetClientResponseContent]
|
|
277
307
|
def get(request_options: {}, **params)
|
|
278
308
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -294,7 +324,7 @@ module Auth0
|
|
|
294
324
|
end
|
|
295
325
|
code = response.code.to_i
|
|
296
326
|
if code.between?(200, 299)
|
|
297
|
-
Auth0::Types::GetClientResponseContent.load(response.body)
|
|
327
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetClientResponseContent.load(response.body))
|
|
298
328
|
else
|
|
299
329
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
300
330
|
raise error_class.new(response.body, code: code)
|
|
@@ -312,6 +342,9 @@ module Auth0
|
|
|
312
342
|
# @option request_options [Integer] :timeout_in_seconds
|
|
313
343
|
# @option params [String] :id
|
|
314
344
|
#
|
|
345
|
+
# @example
|
|
346
|
+
# client.clients.delete(id: "id")
|
|
347
|
+
#
|
|
315
348
|
# @return [untyped]
|
|
316
349
|
def delete(request_options: {}, **params)
|
|
317
350
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -359,6 +392,9 @@ module Auth0
|
|
|
359
392
|
# @option request_options [Integer] :timeout_in_seconds
|
|
360
393
|
# @option params [String] :id
|
|
361
394
|
#
|
|
395
|
+
# @example
|
|
396
|
+
# client.clients.update(id: "id")
|
|
397
|
+
#
|
|
362
398
|
# @return [Auth0::Types::UpdateClientResponseContent]
|
|
363
399
|
def update(request_options: {}, **params)
|
|
364
400
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -380,7 +416,7 @@ module Auth0
|
|
|
380
416
|
end
|
|
381
417
|
code = response.code.to_i
|
|
382
418
|
if code.between?(200, 299)
|
|
383
|
-
Auth0::Types::UpdateClientResponseContent.load(response.body)
|
|
419
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateClientResponseContent.load(response.body))
|
|
384
420
|
else
|
|
385
421
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
386
422
|
raise error_class.new(response.body, code: code)
|
|
@@ -404,6 +440,9 @@ module Auth0
|
|
|
404
440
|
# @option request_options [Integer] :timeout_in_seconds
|
|
405
441
|
# @option params [String] :id
|
|
406
442
|
#
|
|
443
|
+
# @example
|
|
444
|
+
# client.clients.rotate_secret(id: "id")
|
|
445
|
+
#
|
|
407
446
|
# @return [Auth0::Types::RotateClientSecretResponseContent]
|
|
408
447
|
def rotate_secret(request_options: {}, **params)
|
|
409
448
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -420,7 +459,7 @@ module Auth0
|
|
|
420
459
|
end
|
|
421
460
|
code = response.code.to_i
|
|
422
461
|
if code.between?(200, 299)
|
|
423
|
-
Auth0::Types::RotateClientSecretResponseContent.load(response.body)
|
|
462
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::RotateClientSecretResponseContent.load(response.body))
|
|
424
463
|
else
|
|
425
464
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
426
465
|
raise error_class.new(response.body, code: code)
|
|
@@ -34,6 +34,16 @@ module Auth0
|
|
|
34
34
|
# @option params [String, nil] :fields
|
|
35
35
|
# @option params [Boolean, nil] :include_fields
|
|
36
36
|
#
|
|
37
|
+
# @example
|
|
38
|
+
# client.clients.connections.get(
|
|
39
|
+
# id: "id",
|
|
40
|
+
# strategy: ["ad"],
|
|
41
|
+
# from: "from",
|
|
42
|
+
# take: 1,
|
|
43
|
+
# fields: "fields",
|
|
44
|
+
# include_fields: true
|
|
45
|
+
# )
|
|
46
|
+
#
|
|
37
47
|
# @return [Auth0::Types::ListClientConnectionsResponseContent]
|
|
38
48
|
def get(request_options: {}, **params)
|
|
39
49
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -64,7 +74,7 @@ module Auth0
|
|
|
64
74
|
end
|
|
65
75
|
code = response.code.to_i
|
|
66
76
|
if code.between?(200, 299)
|
|
67
|
-
parsed_response = Auth0::Types::ListClientConnectionsResponseContent.load(response.body)
|
|
77
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListClientConnectionsResponseContent.load(response.body))
|
|
68
78
|
[parsed_response, response]
|
|
69
79
|
else
|
|
70
80
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|