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
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)
|
|
@@ -25,31 +25,39 @@ module Auth0
|
|
|
25
25
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
26
26
|
# @option request_options [Integer] :timeout_in_seconds
|
|
27
27
|
#
|
|
28
|
+
# @example
|
|
29
|
+
# client.jobs.users_imports.create
|
|
30
|
+
#
|
|
28
31
|
# @return [Auth0::Types::CreateImportUsersResponseContent]
|
|
29
32
|
def create(request_options: {}, **params)
|
|
30
33
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
31
34
|
body = Internal::Multipart::FormData.new
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
if params[:users]
|
|
37
|
+
body.add_file(
|
|
38
|
+
name: "users",
|
|
39
|
+
file: params[:users]
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
unless params[:connection_id].nil?
|
|
35
43
|
body.add(
|
|
36
44
|
name: "connection_id",
|
|
37
45
|
value: params[:connection_id]
|
|
38
46
|
)
|
|
39
47
|
end
|
|
40
|
-
|
|
48
|
+
unless params[:upsert].nil?
|
|
41
49
|
body.add(
|
|
42
50
|
name: "upsert",
|
|
43
51
|
value: params[:upsert]
|
|
44
52
|
)
|
|
45
53
|
end
|
|
46
|
-
|
|
54
|
+
unless params[:external_id].nil?
|
|
47
55
|
body.add(
|
|
48
56
|
name: "external_id",
|
|
49
57
|
value: params[:external_id]
|
|
50
58
|
)
|
|
51
59
|
end
|
|
52
|
-
|
|
60
|
+
unless params[:send_completion_email].nil?
|
|
53
61
|
body.add(
|
|
54
62
|
name: "send_completion_email",
|
|
55
63
|
value: params[:send_completion_email]
|
|
@@ -70,7 +78,7 @@ module Auth0
|
|
|
70
78
|
end
|
|
71
79
|
code = response.code.to_i
|
|
72
80
|
if code.between?(200, 299)
|
|
73
|
-
Auth0::Types::CreateImportUsersResponseContent.load(response.body)
|
|
81
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateImportUsersResponseContent.load(response.body))
|
|
74
82
|
else
|
|
75
83
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
76
84
|
raise error_class.new(response.body, code: code)
|
|
@@ -24,6 +24,9 @@ module Auth0
|
|
|
24
24
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
25
25
|
# @option request_options [Integer] :timeout_in_seconds
|
|
26
26
|
#
|
|
27
|
+
# @example
|
|
28
|
+
# client.jobs.verification_email.create(user_id: "user_id")
|
|
29
|
+
#
|
|
27
30
|
# @return [Auth0::Types::CreateVerificationEmailResponseContent]
|
|
28
31
|
def create(request_options: {}, **params)
|
|
29
32
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -41,7 +44,7 @@ module Auth0
|
|
|
41
44
|
end
|
|
42
45
|
code = response.code.to_i
|
|
43
46
|
if code.between?(200, 299)
|
|
44
|
-
Auth0::Types::CreateVerificationEmailResponseContent.load(response.body)
|
|
47
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateVerificationEmailResponseContent.load(response.body))
|
|
45
48
|
else
|
|
46
49
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
47
50
|
raise error_class.new(response.body, code: code)
|
|
@@ -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.keys.custom_signing.get
|
|
26
|
+
#
|
|
24
27
|
# @return [Auth0::Types::GetCustomSigningKeysResponseContent]
|
|
25
28
|
def get(request_options: {}, **_params)
|
|
26
29
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -36,7 +39,7 @@ module Auth0
|
|
|
36
39
|
end
|
|
37
40
|
code = response.code.to_i
|
|
38
41
|
if code.between?(200, 299)
|
|
39
|
-
Auth0::Types::GetCustomSigningKeysResponseContent.load(response.body)
|
|
42
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetCustomSigningKeysResponseContent.load(response.body))
|
|
40
43
|
else
|
|
41
44
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
42
45
|
raise error_class.new(response.body, code: code)
|
|
@@ -53,6 +56,11 @@ module Auth0
|
|
|
53
56
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
54
57
|
# @option request_options [Integer] :timeout_in_seconds
|
|
55
58
|
#
|
|
59
|
+
# @example
|
|
60
|
+
# client.keys.custom_signing.set(keys: [{
|
|
61
|
+
# kty: "EC"
|
|
62
|
+
# }])
|
|
63
|
+
#
|
|
56
64
|
# @return [Auth0::Types::SetCustomSigningKeysResponseContent]
|
|
57
65
|
def set(request_options: {}, **params)
|
|
58
66
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -70,7 +78,7 @@ module Auth0
|
|
|
70
78
|
end
|
|
71
79
|
code = response.code.to_i
|
|
72
80
|
if code.between?(200, 299)
|
|
73
|
-
Auth0::Types::SetCustomSigningKeysResponseContent.load(response.body)
|
|
81
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::SetCustomSigningKeysResponseContent.load(response.body))
|
|
74
82
|
else
|
|
75
83
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
76
84
|
raise error_class.new(response.body, code: code)
|
|
@@ -87,6 +95,9 @@ module Auth0
|
|
|
87
95
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
88
96
|
# @option request_options [Integer] :timeout_in_seconds
|
|
89
97
|
#
|
|
98
|
+
# @example
|
|
99
|
+
# client.keys.custom_signing.delete
|
|
100
|
+
#
|
|
90
101
|
# @return [untyped]
|
|
91
102
|
def delete(request_options: {}, **_params)
|
|
92
103
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -24,6 +24,13 @@ module Auth0
|
|
|
24
24
|
# @option params [Integer, nil] :per_page
|
|
25
25
|
# @option params [Boolean, nil] :include_totals
|
|
26
26
|
#
|
|
27
|
+
# @example
|
|
28
|
+
# client.keys.encryption.list(
|
|
29
|
+
# page: 1,
|
|
30
|
+
# per_page: 1,
|
|
31
|
+
# include_totals: true
|
|
32
|
+
# )
|
|
33
|
+
#
|
|
27
34
|
# @return [Auth0::Types::ListEncryptionKeyOffsetPaginatedResponseContent]
|
|
28
35
|
def list(request_options: {}, **params)
|
|
29
36
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -53,7 +60,7 @@ module Auth0
|
|
|
53
60
|
end
|
|
54
61
|
code = response.code.to_i
|
|
55
62
|
if code.between?(200, 299)
|
|
56
|
-
parsed_response = Auth0::Types::ListEncryptionKeyOffsetPaginatedResponseContent.load(response.body)
|
|
63
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListEncryptionKeyOffsetPaginatedResponseContent.load(response.body))
|
|
57
64
|
[parsed_response, response]
|
|
58
65
|
else
|
|
59
66
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -72,6 +79,9 @@ module Auth0
|
|
|
72
79
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
73
80
|
# @option request_options [Integer] :timeout_in_seconds
|
|
74
81
|
#
|
|
82
|
+
# @example
|
|
83
|
+
# client.keys.encryption.create(type: "customer-provided-root-key")
|
|
84
|
+
#
|
|
75
85
|
# @return [Auth0::Types::CreateEncryptionKeyResponseContent]
|
|
76
86
|
def create(request_options: {}, **params)
|
|
77
87
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -89,7 +99,7 @@ module Auth0
|
|
|
89
99
|
end
|
|
90
100
|
code = response.code.to_i
|
|
91
101
|
if code.between?(200, 299)
|
|
92
|
-
Auth0::Types::CreateEncryptionKeyResponseContent.load(response.body)
|
|
102
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateEncryptionKeyResponseContent.load(response.body))
|
|
93
103
|
else
|
|
94
104
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
95
105
|
raise error_class.new(response.body, code: code)
|
|
@@ -106,6 +116,9 @@ module Auth0
|
|
|
106
116
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
107
117
|
# @option request_options [Integer] :timeout_in_seconds
|
|
108
118
|
#
|
|
119
|
+
# @example
|
|
120
|
+
# client.keys.encryption.rekey
|
|
121
|
+
#
|
|
109
122
|
# @return [untyped]
|
|
110
123
|
def rekey(request_options: {}, **_params)
|
|
111
124
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -137,6 +150,9 @@ module Auth0
|
|
|
137
150
|
# @option request_options [Integer] :timeout_in_seconds
|
|
138
151
|
# @option params [String] :kid
|
|
139
152
|
#
|
|
153
|
+
# @example
|
|
154
|
+
# client.keys.encryption.get(kid: "kid")
|
|
155
|
+
#
|
|
140
156
|
# @return [Auth0::Types::GetEncryptionKeyResponseContent]
|
|
141
157
|
def get(request_options: {}, **params)
|
|
142
158
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -153,7 +169,7 @@ module Auth0
|
|
|
153
169
|
end
|
|
154
170
|
code = response.code.to_i
|
|
155
171
|
if code.between?(200, 299)
|
|
156
|
-
Auth0::Types::GetEncryptionKeyResponseContent.load(response.body)
|
|
172
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetEncryptionKeyResponseContent.load(response.body))
|
|
157
173
|
else
|
|
158
174
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
159
175
|
raise error_class.new(response.body, code: code)
|
|
@@ -171,6 +187,12 @@ module Auth0
|
|
|
171
187
|
# @option request_options [Integer] :timeout_in_seconds
|
|
172
188
|
# @option params [String] :kid
|
|
173
189
|
#
|
|
190
|
+
# @example
|
|
191
|
+
# client.keys.encryption.import(
|
|
192
|
+
# kid: "kid",
|
|
193
|
+
# wrapped_key: "wrapped_key"
|
|
194
|
+
# )
|
|
195
|
+
#
|
|
174
196
|
# @return [Auth0::Types::ImportEncryptionKeyResponseContent]
|
|
175
197
|
def import(request_options: {}, **params)
|
|
176
198
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -192,7 +214,7 @@ module Auth0
|
|
|
192
214
|
end
|
|
193
215
|
code = response.code.to_i
|
|
194
216
|
if code.between?(200, 299)
|
|
195
|
-
Auth0::Types::ImportEncryptionKeyResponseContent.load(response.body)
|
|
217
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::ImportEncryptionKeyResponseContent.load(response.body))
|
|
196
218
|
else
|
|
197
219
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
198
220
|
raise error_class.new(response.body, code: code)
|
|
@@ -210,6 +232,9 @@ module Auth0
|
|
|
210
232
|
# @option request_options [Integer] :timeout_in_seconds
|
|
211
233
|
# @option params [String] :kid
|
|
212
234
|
#
|
|
235
|
+
# @example
|
|
236
|
+
# client.keys.encryption.delete(kid: "kid")
|
|
237
|
+
#
|
|
213
238
|
# @return [untyped]
|
|
214
239
|
def delete(request_options: {}, **params)
|
|
215
240
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -242,6 +267,9 @@ module Auth0
|
|
|
242
267
|
# @option request_options [Integer] :timeout_in_seconds
|
|
243
268
|
# @option params [String] :kid
|
|
244
269
|
#
|
|
270
|
+
# @example
|
|
271
|
+
# client.keys.encryption.create_public_wrapping_key(kid: "kid")
|
|
272
|
+
#
|
|
245
273
|
# @return [Auth0::Types::CreateEncryptionKeyPublicWrappingResponseContent]
|
|
246
274
|
def create_public_wrapping_key(request_options: {}, **params)
|
|
247
275
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -258,7 +286,7 @@ module Auth0
|
|
|
258
286
|
end
|
|
259
287
|
code = response.code.to_i
|
|
260
288
|
if code.between?(200, 299)
|
|
261
|
-
Auth0::Types::CreateEncryptionKeyPublicWrappingResponseContent.load(response.body)
|
|
289
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateEncryptionKeyPublicWrappingResponseContent.load(response.body))
|
|
262
290
|
else
|
|
263
291
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
264
292
|
raise error_class.new(response.body, code: code)
|
|
@@ -22,6 +22,9 @@ module Auth0
|
|
|
22
22
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
23
23
|
# @option request_options [Integer] :timeout_in_seconds
|
|
24
24
|
#
|
|
25
|
+
# @example
|
|
26
|
+
# client.keys.network_acls.list
|
|
27
|
+
#
|
|
25
28
|
# @return [Auth0::Types::GetAllKeysNetworkACLsResponseContent]
|
|
26
29
|
def list(request_options: {}, **_params)
|
|
27
30
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -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::GetAllKeysNetworkACLsResponseContent.load(response.body)
|
|
43
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetAllKeysNetworkACLsResponseContent.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)
|
|
@@ -54,6 +57,13 @@ module Auth0
|
|
|
54
57
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
55
58
|
# @option request_options [Integer] :timeout_in_seconds
|
|
56
59
|
#
|
|
60
|
+
# @example
|
|
61
|
+
# client.keys.network_acls.create(
|
|
62
|
+
# name: "name",
|
|
63
|
+
# alg: "hmac-sha256",
|
|
64
|
+
# value: "value"
|
|
65
|
+
# )
|
|
66
|
+
#
|
|
57
67
|
# @return [Auth0::Types::CreateKeysNetworkACLsResponseContent]
|
|
58
68
|
def create(request_options: {}, **params)
|
|
59
69
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -71,7 +81,7 @@ module Auth0
|
|
|
71
81
|
end
|
|
72
82
|
code = response.code.to_i
|
|
73
83
|
if code.between?(200, 299)
|
|
74
|
-
Auth0::Types::CreateKeysNetworkACLsResponseContent.load(response.body)
|
|
84
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateKeysNetworkACLsResponseContent.load(response.body))
|
|
75
85
|
else
|
|
76
86
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
77
87
|
raise error_class.new(response.body, code: code)
|
|
@@ -89,6 +99,9 @@ module Auth0
|
|
|
89
99
|
# @option request_options [Integer] :timeout_in_seconds
|
|
90
100
|
# @option params [String] :id
|
|
91
101
|
#
|
|
102
|
+
# @example
|
|
103
|
+
# client.keys.network_acls.get(id: "id")
|
|
104
|
+
#
|
|
92
105
|
# @return [Auth0::Types::NetworkACLKey]
|
|
93
106
|
def get(request_options: {}, **params)
|
|
94
107
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -105,7 +118,7 @@ module Auth0
|
|
|
105
118
|
end
|
|
106
119
|
code = response.code.to_i
|
|
107
120
|
if code.between?(200, 299)
|
|
108
|
-
Auth0::Types::NetworkACLKey.load(response.body)
|
|
121
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::NetworkACLKey.load(response.body))
|
|
109
122
|
else
|
|
110
123
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
111
124
|
raise error_class.new(response.body, code: code)
|
|
@@ -123,6 +136,9 @@ module Auth0
|
|
|
123
136
|
# @option request_options [Integer] :timeout_in_seconds
|
|
124
137
|
# @option params [String] :id
|
|
125
138
|
#
|
|
139
|
+
# @example
|
|
140
|
+
# client.keys.network_acls.delete(id: "id")
|
|
141
|
+
#
|
|
126
142
|
# @return [untyped]
|
|
127
143
|
def delete(request_options: {}, **params)
|
|
128
144
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -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.keys.signing.list
|
|
26
|
+
#
|
|
24
27
|
# @return [Array[Auth0::Types::SigningKeys]]
|
|
25
28
|
def list(request_options: {}, **_params)
|
|
26
29
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -35,10 +38,12 @@ module Auth0
|
|
|
35
38
|
raise Auth0::Errors::TimeoutError
|
|
36
39
|
end
|
|
37
40
|
code = response.code.to_i
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
if code.between?(200, 299)
|
|
42
|
+
Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::SigningKeys], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true)))
|
|
43
|
+
else
|
|
44
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
45
|
+
raise error_class.new(response.body, code: code)
|
|
46
|
+
end
|
|
42
47
|
end
|
|
43
48
|
|
|
44
49
|
# Rotate the application signing key of your tenant.
|
|
@@ -51,6 +56,9 @@ module Auth0
|
|
|
51
56
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
52
57
|
# @option request_options [Integer] :timeout_in_seconds
|
|
53
58
|
#
|
|
59
|
+
# @example
|
|
60
|
+
# client.keys.signing.rotate
|
|
61
|
+
#
|
|
54
62
|
# @return [Auth0::Types::RotateSigningKeysResponseContent]
|
|
55
63
|
def rotate(request_options: {}, **_params)
|
|
56
64
|
request = Auth0::Internal::JSON::Request.new(
|
|
@@ -66,7 +74,7 @@ module Auth0
|
|
|
66
74
|
end
|
|
67
75
|
code = response.code.to_i
|
|
68
76
|
if code.between?(200, 299)
|
|
69
|
-
Auth0::Types::RotateSigningKeysResponseContent.load(response.body)
|
|
77
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::RotateSigningKeysResponseContent.load(response.body))
|
|
70
78
|
else
|
|
71
79
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
72
80
|
raise error_class.new(response.body, code: code)
|
|
@@ -84,6 +92,9 @@ module Auth0
|
|
|
84
92
|
# @option request_options [Integer] :timeout_in_seconds
|
|
85
93
|
# @option params [String] :kid
|
|
86
94
|
#
|
|
95
|
+
# @example
|
|
96
|
+
# client.keys.signing.get(kid: "kid")
|
|
97
|
+
#
|
|
87
98
|
# @return [Auth0::Types::GetSigningKeysResponseContent]
|
|
88
99
|
def get(request_options: {}, **params)
|
|
89
100
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -100,7 +111,7 @@ module Auth0
|
|
|
100
111
|
end
|
|
101
112
|
code = response.code.to_i
|
|
102
113
|
if code.between?(200, 299)
|
|
103
|
-
Auth0::Types::GetSigningKeysResponseContent.load(response.body)
|
|
114
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetSigningKeysResponseContent.load(response.body))
|
|
104
115
|
else
|
|
105
116
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
106
117
|
raise error_class.new(response.body, code: code)
|
|
@@ -118,6 +129,9 @@ module Auth0
|
|
|
118
129
|
# @option request_options [Integer] :timeout_in_seconds
|
|
119
130
|
# @option params [String] :kid
|
|
120
131
|
#
|
|
132
|
+
# @example
|
|
133
|
+
# client.keys.signing.revoke(kid: "kid")
|
|
134
|
+
#
|
|
121
135
|
# @return [Auth0::Types::RevokedSigningKeysResponseContent]
|
|
122
136
|
def revoke(request_options: {}, **params)
|
|
123
137
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -134,7 +148,7 @@ module Auth0
|
|
|
134
148
|
end
|
|
135
149
|
code = response.code.to_i
|
|
136
150
|
if code.between?(200, 299)
|
|
137
|
-
Auth0::Types::RevokedSigningKeysResponseContent.load(response.body)
|
|
151
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::RevokedSigningKeysResponseContent.load(response.body))
|
|
138
152
|
else
|
|
139
153
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
140
154
|
raise error_class.new(response.body, code: code)
|