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/users/client.rb
CHANGED
|
@@ -51,6 +51,20 @@ module Auth0
|
|
|
51
51
|
# @option params [Auth0::Types::SearchEngineVersionsEnum, nil] :search_engine
|
|
52
52
|
# @option params [Boolean, nil] :primary_order
|
|
53
53
|
#
|
|
54
|
+
# @example
|
|
55
|
+
# client.users.list(
|
|
56
|
+
# page: 1,
|
|
57
|
+
# per_page: 1,
|
|
58
|
+
# include_totals: true,
|
|
59
|
+
# sort: "sort",
|
|
60
|
+
# connection: "connection",
|
|
61
|
+
# fields: "fields",
|
|
62
|
+
# include_fields: true,
|
|
63
|
+
# q: "q",
|
|
64
|
+
# search_engine: "v1",
|
|
65
|
+
# primary_order: true
|
|
66
|
+
# )
|
|
67
|
+
#
|
|
54
68
|
# @return [Auth0::Types::ListUsersOffsetPaginatedResponseContent]
|
|
55
69
|
def list(request_options: {}, **params)
|
|
56
70
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -87,7 +101,7 @@ module Auth0
|
|
|
87
101
|
end
|
|
88
102
|
code = response.code.to_i
|
|
89
103
|
if code.between?(200, 299)
|
|
90
|
-
parsed_response = Auth0::Types::ListUsersOffsetPaginatedResponseContent.load(response.body)
|
|
104
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUsersOffsetPaginatedResponseContent.load(response.body))
|
|
91
105
|
[parsed_response, response]
|
|
92
106
|
else
|
|
93
107
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -110,6 +124,9 @@ module Auth0
|
|
|
110
124
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
111
125
|
# @option request_options [Integer] :timeout_in_seconds
|
|
112
126
|
#
|
|
127
|
+
# @example
|
|
128
|
+
# client.users.create(connection: "connection")
|
|
129
|
+
#
|
|
113
130
|
# @return [Auth0::Types::CreateUserResponseContent]
|
|
114
131
|
def create(request_options: {}, **params)
|
|
115
132
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -127,7 +144,7 @@ module Auth0
|
|
|
127
144
|
end
|
|
128
145
|
code = response.code.to_i
|
|
129
146
|
if code.between?(200, 299)
|
|
130
|
-
Auth0::Types::CreateUserResponseContent.load(response.body)
|
|
147
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateUserResponseContent.load(response.body))
|
|
131
148
|
else
|
|
132
149
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
133
150
|
raise error_class.new(response.body, code: code)
|
|
@@ -154,6 +171,13 @@ module Auth0
|
|
|
154
171
|
# @option params [Boolean, nil] :include_fields
|
|
155
172
|
# @option params [String] :email
|
|
156
173
|
#
|
|
174
|
+
# @example
|
|
175
|
+
# client.users.list_users_by_email(
|
|
176
|
+
# fields: "fields",
|
|
177
|
+
# include_fields: true,
|
|
178
|
+
# email: "email"
|
|
179
|
+
# )
|
|
180
|
+
#
|
|
157
181
|
# @return [Array[Auth0::Types::UserResponseSchema]]
|
|
158
182
|
def list_users_by_email(request_options: {}, **params)
|
|
159
183
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -175,10 +199,12 @@ module Auth0
|
|
|
175
199
|
raise Auth0::Errors::TimeoutError
|
|
176
200
|
end
|
|
177
201
|
code = response.code.to_i
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
202
|
+
if code.between?(200, 299)
|
|
203
|
+
Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::UserResponseSchema], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true)))
|
|
204
|
+
else
|
|
205
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
206
|
+
raise error_class.new(response.body, code: code)
|
|
207
|
+
end
|
|
182
208
|
end
|
|
183
209
|
|
|
184
210
|
# Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see
|
|
@@ -196,6 +222,13 @@ module Auth0
|
|
|
196
222
|
# @option params [String, nil] :fields
|
|
197
223
|
# @option params [Boolean, nil] :include_fields
|
|
198
224
|
#
|
|
225
|
+
# @example
|
|
226
|
+
# client.users.get(
|
|
227
|
+
# id: "id",
|
|
228
|
+
# fields: "fields",
|
|
229
|
+
# include_fields: true
|
|
230
|
+
# )
|
|
231
|
+
#
|
|
199
232
|
# @return [Auth0::Types::GetUserResponseContent]
|
|
200
233
|
def get(request_options: {}, **params)
|
|
201
234
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -217,7 +250,7 @@ module Auth0
|
|
|
217
250
|
end
|
|
218
251
|
code = response.code.to_i
|
|
219
252
|
if code.between?(200, 299)
|
|
220
|
-
Auth0::Types::GetUserResponseContent.load(response.body)
|
|
253
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetUserResponseContent.load(response.body))
|
|
221
254
|
else
|
|
222
255
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
223
256
|
raise error_class.new(response.body, code: code)
|
|
@@ -236,6 +269,9 @@ module Auth0
|
|
|
236
269
|
# @option request_options [Integer] :timeout_in_seconds
|
|
237
270
|
# @option params [String] :id
|
|
238
271
|
#
|
|
272
|
+
# @example
|
|
273
|
+
# client.users.delete(id: "id")
|
|
274
|
+
#
|
|
239
275
|
# @return [untyped]
|
|
240
276
|
def delete(request_options: {}, **params)
|
|
241
277
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -364,6 +400,9 @@ module Auth0
|
|
|
364
400
|
# @option request_options [Integer] :timeout_in_seconds
|
|
365
401
|
# @option params [String] :id
|
|
366
402
|
#
|
|
403
|
+
# @example
|
|
404
|
+
# client.users.update(id: "id")
|
|
405
|
+
#
|
|
367
406
|
# @return [Auth0::Types::UpdateUserResponseContent]
|
|
368
407
|
def update(request_options: {}, **params)
|
|
369
408
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -385,7 +424,7 @@ module Auth0
|
|
|
385
424
|
end
|
|
386
425
|
code = response.code.to_i
|
|
387
426
|
if code.between?(200, 299)
|
|
388
|
-
Auth0::Types::UpdateUserResponseContent.load(response.body)
|
|
427
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateUserResponseContent.load(response.body))
|
|
389
428
|
else
|
|
390
429
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
391
430
|
raise error_class.new(response.body, code: code)
|
|
@@ -406,6 +445,9 @@ module Auth0
|
|
|
406
445
|
# @option request_options [Integer] :timeout_in_seconds
|
|
407
446
|
# @option params [String] :id
|
|
408
447
|
#
|
|
448
|
+
# @example
|
|
449
|
+
# client.users.regenerate_recovery_code(id: "id")
|
|
450
|
+
#
|
|
409
451
|
# @return [Auth0::Types::RegenerateUsersRecoveryCodeResponseContent]
|
|
410
452
|
def regenerate_recovery_code(request_options: {}, **params)
|
|
411
453
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -422,7 +464,7 @@ module Auth0
|
|
|
422
464
|
end
|
|
423
465
|
code = response.code.to_i
|
|
424
466
|
if code.between?(200, 299)
|
|
425
|
-
Auth0::Types::RegenerateUsersRecoveryCodeResponseContent.load(response.body)
|
|
467
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::RegenerateUsersRecoveryCodeResponseContent.load(response.body))
|
|
426
468
|
else
|
|
427
469
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
428
470
|
raise error_class.new(response.body, code: code)
|
|
@@ -440,6 +482,9 @@ module Auth0
|
|
|
440
482
|
# @option request_options [Integer] :timeout_in_seconds
|
|
441
483
|
# @option params [String] :id
|
|
442
484
|
#
|
|
485
|
+
# @example
|
|
486
|
+
# client.users.revoke_access(id: "id")
|
|
487
|
+
#
|
|
443
488
|
# @return [untyped]
|
|
444
489
|
def revoke_access(request_options: {}, **params)
|
|
445
490
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -24,6 +24,13 @@ module Auth0
|
|
|
24
24
|
# @option params [String, nil] :from
|
|
25
25
|
# @option params [Integer, nil] :take
|
|
26
26
|
#
|
|
27
|
+
# @example
|
|
28
|
+
# client.users.connected_accounts.list(
|
|
29
|
+
# id: "id",
|
|
30
|
+
# from: "from",
|
|
31
|
+
# take: 1
|
|
32
|
+
# )
|
|
33
|
+
#
|
|
27
34
|
# @return [Auth0::Types::ListUserConnectedAccountsResponseContent]
|
|
28
35
|
def list(request_options: {}, **params)
|
|
29
36
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -51,7 +58,7 @@ module Auth0
|
|
|
51
58
|
end
|
|
52
59
|
code = response.code.to_i
|
|
53
60
|
if code.between?(200, 299)
|
|
54
|
-
parsed_response = Auth0::Types::ListUserConnectedAccountsResponseContent.load(response.body)
|
|
61
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserConnectedAccountsResponseContent.load(response.body))
|
|
55
62
|
[parsed_response, response]
|
|
56
63
|
else
|
|
57
64
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -26,6 +26,14 @@ module Auth0
|
|
|
26
26
|
# @option params [Integer, nil] :take
|
|
27
27
|
# @option params [String] :resource_server_identifier
|
|
28
28
|
#
|
|
29
|
+
# @example
|
|
30
|
+
# client.users.effective_permissions.list(
|
|
31
|
+
# id: "id",
|
|
32
|
+
# from: "from",
|
|
33
|
+
# take: 1,
|
|
34
|
+
# resource_server_identifier: "resource_server_identifier"
|
|
35
|
+
# )
|
|
36
|
+
#
|
|
29
37
|
# @return [Auth0::Types::ListUserEffectivePermissionsResponseContent]
|
|
30
38
|
def list(request_options: {}, **params)
|
|
31
39
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -54,7 +62,7 @@ module Auth0
|
|
|
54
62
|
end
|
|
55
63
|
code = response.code.to_i
|
|
56
64
|
if code.between?(200, 299)
|
|
57
|
-
parsed_response = Auth0::Types::ListUserEffectivePermissionsResponseContent.load(response.body)
|
|
65
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserEffectivePermissionsResponseContent.load(response.body))
|
|
58
66
|
[parsed_response, response]
|
|
59
67
|
else
|
|
60
68
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -29,6 +29,15 @@ module Auth0
|
|
|
29
29
|
# @option params [String] :resource_server_identifier
|
|
30
30
|
# @option params [String] :permission_name
|
|
31
31
|
#
|
|
32
|
+
# @example
|
|
33
|
+
# client.users.effective_permissions.sources.roles.list(
|
|
34
|
+
# id: "id",
|
|
35
|
+
# from: "from",
|
|
36
|
+
# take: 1,
|
|
37
|
+
# resource_server_identifier: "resource_server_identifier",
|
|
38
|
+
# permission_name: "permission_name"
|
|
39
|
+
# )
|
|
40
|
+
#
|
|
32
41
|
# @return [Auth0::Types::ListUserEffectivePermissionRoleSourcesResponseContent]
|
|
33
42
|
def list(request_options: {}, **params)
|
|
34
43
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -58,7 +67,7 @@ module Auth0
|
|
|
58
67
|
end
|
|
59
68
|
code = response.code.to_i
|
|
60
69
|
if code.between?(200, 299)
|
|
61
|
-
parsed_response = Auth0::Types::ListUserEffectivePermissionRoleSourcesResponseContent.load(response.body)
|
|
70
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserEffectivePermissionRoleSourcesResponseContent.load(response.body))
|
|
62
71
|
[parsed_response, response]
|
|
63
72
|
else
|
|
64
73
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -25,6 +25,13 @@ module Auth0
|
|
|
25
25
|
# @option params [String, nil] :from
|
|
26
26
|
# @option params [Integer, nil] :take
|
|
27
27
|
#
|
|
28
|
+
# @example
|
|
29
|
+
# client.users.effective_roles.list(
|
|
30
|
+
# id: "id",
|
|
31
|
+
# from: "from",
|
|
32
|
+
# take: 1
|
|
33
|
+
# )
|
|
34
|
+
#
|
|
28
35
|
# @return [Auth0::Types::ListUserEffectiveRolesResponseContent]
|
|
29
36
|
def list(request_options: {}, **params)
|
|
30
37
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -52,7 +59,7 @@ module Auth0
|
|
|
52
59
|
end
|
|
53
60
|
code = response.code.to_i
|
|
54
61
|
if code.between?(200, 299)
|
|
55
|
-
parsed_response = Auth0::Types::ListUserEffectiveRolesResponseContent.load(response.body)
|
|
62
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserEffectiveRolesResponseContent.load(response.body))
|
|
56
63
|
[parsed_response, response]
|
|
57
64
|
else
|
|
58
65
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -27,6 +27,14 @@ module Auth0
|
|
|
27
27
|
# @option params [String, nil] :from
|
|
28
28
|
# @option params [Integer, nil] :take
|
|
29
29
|
#
|
|
30
|
+
# @example
|
|
31
|
+
# client.users.effective_roles.sources.groups.list(
|
|
32
|
+
# id: "id",
|
|
33
|
+
# role_id: "role_id",
|
|
34
|
+
# from: "from",
|
|
35
|
+
# take: 1
|
|
36
|
+
# )
|
|
37
|
+
#
|
|
30
38
|
# @return [Auth0::Types::ListUserRoleSourceGroupsResponseContent]
|
|
31
39
|
def list(request_options: {}, **params)
|
|
32
40
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -55,7 +63,7 @@ module Auth0
|
|
|
55
63
|
end
|
|
56
64
|
code = response.code.to_i
|
|
57
65
|
if code.between?(200, 299)
|
|
58
|
-
parsed_response = Auth0::Types::ListUserRoleSourceGroupsResponseContent.load(response.body)
|
|
66
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserRoleSourceGroupsResponseContent.load(response.body))
|
|
59
67
|
[parsed_response, response]
|
|
60
68
|
else
|
|
61
69
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -24,6 +24,9 @@ module Auth0
|
|
|
24
24
|
# @option request_options [Integer] :timeout_in_seconds
|
|
25
25
|
# @option params [String] :id
|
|
26
26
|
#
|
|
27
|
+
# @example
|
|
28
|
+
# client.users.enrollments.get(id: "id")
|
|
29
|
+
#
|
|
27
30
|
# @return [Array[Auth0::Types::UsersEnrollment]]
|
|
28
31
|
def get(request_options: {}, **params)
|
|
29
32
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -39,10 +42,12 @@ module Auth0
|
|
|
39
42
|
raise Auth0::Errors::TimeoutError
|
|
40
43
|
end
|
|
41
44
|
code = response.code.to_i
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
if code.between?(200, 299)
|
|
46
|
+
Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::UsersEnrollment], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true)))
|
|
47
|
+
else
|
|
48
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
49
|
+
raise error_class.new(response.body, code: code)
|
|
50
|
+
end
|
|
46
51
|
end
|
|
47
52
|
end
|
|
48
53
|
end
|
|
@@ -27,6 +27,16 @@ module Auth0
|
|
|
27
27
|
# @option params [String, nil] :from
|
|
28
28
|
# @option params [Integer, nil] :take
|
|
29
29
|
#
|
|
30
|
+
# @example
|
|
31
|
+
# client.users.groups.get(
|
|
32
|
+
# id: "id",
|
|
33
|
+
# fields: "fields",
|
|
34
|
+
# include_fields: true,
|
|
35
|
+
# include_totals: true,
|
|
36
|
+
# from: "from",
|
|
37
|
+
# take: 1
|
|
38
|
+
# )
|
|
39
|
+
#
|
|
30
40
|
# @return [Auth0::Types::GetUserGroupsPaginatedResponseContent]
|
|
31
41
|
def get(request_options: {}, **params)
|
|
32
42
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -57,7 +67,7 @@ module Auth0
|
|
|
57
67
|
end
|
|
58
68
|
code = response.code.to_i
|
|
59
69
|
if code.between?(200, 299)
|
|
60
|
-
parsed_response = Auth0::Types::GetUserGroupsPaginatedResponseContent.load(response.body)
|
|
70
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetUserGroupsPaginatedResponseContent.load(response.body))
|
|
61
71
|
[parsed_response, response]
|
|
62
72
|
else
|
|
63
73
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -55,6 +55,9 @@ module Auth0
|
|
|
55
55
|
# @option request_options [Integer] :timeout_in_seconds
|
|
56
56
|
# @option params [String] :id
|
|
57
57
|
#
|
|
58
|
+
# @example
|
|
59
|
+
# client.users.identities.link(id: "id")
|
|
60
|
+
#
|
|
58
61
|
# @return [Array[Auth0::Types::UserIdentity]]
|
|
59
62
|
def link(request_options: {}, **params)
|
|
60
63
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -75,10 +78,12 @@ module Auth0
|
|
|
75
78
|
raise Auth0::Errors::TimeoutError
|
|
76
79
|
end
|
|
77
80
|
code = response.code.to_i
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
if code.between?(200, 299)
|
|
82
|
+
Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::UserIdentity], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true)))
|
|
83
|
+
else
|
|
84
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
85
|
+
raise error_class.new(response.body, code: code)
|
|
86
|
+
end
|
|
82
87
|
end
|
|
83
88
|
|
|
84
89
|
# Unlink a specific secondary account from a target user. This action requires the ID of both the target user
|
|
@@ -99,6 +104,13 @@ module Auth0
|
|
|
99
104
|
# @option params [Auth0::Types::UserIdentityProviderEnum] :provider
|
|
100
105
|
# @option params [String] :user_id
|
|
101
106
|
#
|
|
107
|
+
# @example
|
|
108
|
+
# client.users.identities.delete(
|
|
109
|
+
# id: "id",
|
|
110
|
+
# provider: "ad",
|
|
111
|
+
# user_id: "user_id"
|
|
112
|
+
# )
|
|
113
|
+
#
|
|
102
114
|
# @return [Array[Auth0::Types::DeleteUserIdentityResponseContentItem]]
|
|
103
115
|
def delete(request_options: {}, **params)
|
|
104
116
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -115,7 +127,7 @@ module Auth0
|
|
|
115
127
|
end
|
|
116
128
|
code = response.code.to_i
|
|
117
129
|
if code.between?(200, 299)
|
|
118
|
-
Auth0::Types::DeleteUserIdentityResponseContent.load(response.body)
|
|
130
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::DeleteUserIdentityResponseContent.load(response.body))
|
|
119
131
|
else
|
|
120
132
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
121
133
|
raise error_class.new(response.body, code: code)
|
|
@@ -36,6 +36,15 @@ module Auth0
|
|
|
36
36
|
# @option params [String, nil] :sort
|
|
37
37
|
# @option params [Boolean, nil] :include_totals
|
|
38
38
|
#
|
|
39
|
+
# @example
|
|
40
|
+
# client.users.logs.list(
|
|
41
|
+
# id: "id",
|
|
42
|
+
# page: 1,
|
|
43
|
+
# per_page: 1,
|
|
44
|
+
# sort: "sort",
|
|
45
|
+
# include_totals: true
|
|
46
|
+
# )
|
|
47
|
+
#
|
|
39
48
|
# @return [Auth0::Types::UserListLogOffsetPaginatedResponseContent]
|
|
40
49
|
def list(request_options: {}, **params)
|
|
41
50
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -66,7 +75,7 @@ module Auth0
|
|
|
66
75
|
end
|
|
67
76
|
code = response.code.to_i
|
|
68
77
|
if code.between?(200, 299)
|
|
69
|
-
parsed_response = Auth0::Types::UserListLogOffsetPaginatedResponseContent.load(response.body)
|
|
78
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::UserListLogOffsetPaginatedResponseContent.load(response.body))
|
|
70
79
|
[parsed_response, response]
|
|
71
80
|
else
|
|
72
81
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -23,6 +23,9 @@ module Auth0
|
|
|
23
23
|
# @option request_options [Integer] :timeout_in_seconds
|
|
24
24
|
# @option params [String] :id
|
|
25
25
|
#
|
|
26
|
+
# @example
|
|
27
|
+
# client.users.multifactor.invalidate_remember_browser(id: "id")
|
|
28
|
+
#
|
|
26
29
|
# @return [untyped]
|
|
27
30
|
def invalidate_remember_browser(request_options: {}, **params)
|
|
28
31
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -57,6 +60,12 @@ module Auth0
|
|
|
57
60
|
# @option params [String] :id
|
|
58
61
|
# @option params [Auth0::Types::UserMultifactorProviderEnum] :provider
|
|
59
62
|
#
|
|
63
|
+
# @example
|
|
64
|
+
# client.users.multifactor.delete_provider(
|
|
65
|
+
# id: "id",
|
|
66
|
+
# provider: "duo"
|
|
67
|
+
# )
|
|
68
|
+
#
|
|
60
69
|
# @return [untyped]
|
|
61
70
|
def delete_provider(request_options: {}, **params)
|
|
62
71
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -44,6 +44,14 @@ module Auth0
|
|
|
44
44
|
# @option params [Integer, nil] :per_page
|
|
45
45
|
# @option params [Boolean, nil] :include_totals
|
|
46
46
|
#
|
|
47
|
+
# @example
|
|
48
|
+
# client.users.organizations.list(
|
|
49
|
+
# id: "id",
|
|
50
|
+
# page: 1,
|
|
51
|
+
# per_page: 1,
|
|
52
|
+
# include_totals: true
|
|
53
|
+
# )
|
|
54
|
+
#
|
|
47
55
|
# @return [Auth0::Types::ListUserOrganizationsOffsetPaginatedResponseContent]
|
|
48
56
|
def list(request_options: {}, **params)
|
|
49
57
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -73,7 +81,7 @@ module Auth0
|
|
|
73
81
|
end
|
|
74
82
|
code = response.code.to_i
|
|
75
83
|
if code.between?(200, 299)
|
|
76
|
-
parsed_response = Auth0::Types::ListUserOrganizationsOffsetPaginatedResponseContent.load(response.body)
|
|
84
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserOrganizationsOffsetPaginatedResponseContent.load(response.body))
|
|
77
85
|
[parsed_response, response]
|
|
78
86
|
else
|
|
79
87
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -28,6 +28,14 @@ module Auth0
|
|
|
28
28
|
# @option params [Integer, nil] :page
|
|
29
29
|
# @option params [Boolean, nil] :include_totals
|
|
30
30
|
#
|
|
31
|
+
# @example
|
|
32
|
+
# client.users.permissions.list(
|
|
33
|
+
# id: "id",
|
|
34
|
+
# per_page: 1,
|
|
35
|
+
# page: 1,
|
|
36
|
+
# include_totals: true
|
|
37
|
+
# )
|
|
38
|
+
#
|
|
31
39
|
# @return [Auth0::Types::ListUserPermissionsOffsetPaginatedResponseContent]
|
|
32
40
|
def list(request_options: {}, **params)
|
|
33
41
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -57,7 +65,7 @@ module Auth0
|
|
|
57
65
|
end
|
|
58
66
|
code = response.code.to_i
|
|
59
67
|
if code.between?(200, 299)
|
|
60
|
-
parsed_response = Auth0::Types::ListUserPermissionsOffsetPaginatedResponseContent.load(response.body)
|
|
68
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserPermissionsOffsetPaginatedResponseContent.load(response.body))
|
|
61
69
|
[parsed_response, response]
|
|
62
70
|
else
|
|
63
71
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -77,6 +85,15 @@ module Auth0
|
|
|
77
85
|
# @option request_options [Integer] :timeout_in_seconds
|
|
78
86
|
# @option params [String] :id
|
|
79
87
|
#
|
|
88
|
+
# @example
|
|
89
|
+
# client.users.permissions.create(
|
|
90
|
+
# id: "id",
|
|
91
|
+
# permissions: [{
|
|
92
|
+
# resource_server_identifier: "resource_server_identifier",
|
|
93
|
+
# permission_name: "permission_name"
|
|
94
|
+
# }]
|
|
95
|
+
# )
|
|
96
|
+
#
|
|
80
97
|
# @return [untyped]
|
|
81
98
|
def create(request_options: {}, **params)
|
|
82
99
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -114,6 +131,15 @@ module Auth0
|
|
|
114
131
|
# @option request_options [Integer] :timeout_in_seconds
|
|
115
132
|
# @option params [String] :id
|
|
116
133
|
#
|
|
134
|
+
# @example
|
|
135
|
+
# client.users.permissions.delete(
|
|
136
|
+
# id: "id",
|
|
137
|
+
# permissions: [{
|
|
138
|
+
# resource_server_identifier: "resource_server_identifier",
|
|
139
|
+
# permission_name: "permission_name"
|
|
140
|
+
# }]
|
|
141
|
+
# )
|
|
142
|
+
#
|
|
117
143
|
# @return [untyped]
|
|
118
144
|
def delete(request_options: {}, **params)
|
|
119
145
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -25,6 +25,14 @@ module Auth0
|
|
|
25
25
|
# @option params [String, nil] :from
|
|
26
26
|
# @option params [Integer, nil] :take
|
|
27
27
|
#
|
|
28
|
+
# @example
|
|
29
|
+
# client.users.refresh_token.list(
|
|
30
|
+
# user_id: "user_id",
|
|
31
|
+
# include_totals: true,
|
|
32
|
+
# from: "from",
|
|
33
|
+
# take: 1
|
|
34
|
+
# )
|
|
35
|
+
#
|
|
28
36
|
# @return [Auth0::Types::ListRefreshTokensPaginatedResponseContent]
|
|
29
37
|
def list(request_options: {}, **params)
|
|
30
38
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -53,7 +61,7 @@ module Auth0
|
|
|
53
61
|
end
|
|
54
62
|
code = response.code.to_i
|
|
55
63
|
if code.between?(200, 299)
|
|
56
|
-
parsed_response = Auth0::Types::ListRefreshTokensPaginatedResponseContent.load(response.body)
|
|
64
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListRefreshTokensPaginatedResponseContent.load(response.body))
|
|
57
65
|
[parsed_response, response]
|
|
58
66
|
else
|
|
59
67
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -73,6 +81,9 @@ module Auth0
|
|
|
73
81
|
# @option request_options [Integer] :timeout_in_seconds
|
|
74
82
|
# @option params [String] :user_id
|
|
75
83
|
#
|
|
84
|
+
# @example
|
|
85
|
+
# client.users.refresh_token.delete(user_id: "user_id")
|
|
86
|
+
#
|
|
76
87
|
# @return [untyped]
|
|
77
88
|
def delete(request_options: {}, **params)
|
|
78
89
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -22,6 +22,13 @@ module Auth0
|
|
|
22
22
|
# @option request_options [Integer] :timeout_in_seconds
|
|
23
23
|
# @option params [String] :id
|
|
24
24
|
#
|
|
25
|
+
# @example
|
|
26
|
+
# client.users.risk_assessments.clear(
|
|
27
|
+
# id: "id",
|
|
28
|
+
# connection: "connection",
|
|
29
|
+
# assessors: ["new-device"]
|
|
30
|
+
# )
|
|
31
|
+
#
|
|
25
32
|
# @return [untyped]
|
|
26
33
|
def clear(request_options: {}, **params)
|
|
27
34
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -32,6 +32,14 @@ module Auth0
|
|
|
32
32
|
# @option params [Integer, nil] :page
|
|
33
33
|
# @option params [Boolean, nil] :include_totals
|
|
34
34
|
#
|
|
35
|
+
# @example
|
|
36
|
+
# client.users.roles.list(
|
|
37
|
+
# id: "id",
|
|
38
|
+
# per_page: 1,
|
|
39
|
+
# page: 1,
|
|
40
|
+
# include_totals: true
|
|
41
|
+
# )
|
|
42
|
+
#
|
|
35
43
|
# @return [Auth0::Types::ListUserRolesOffsetPaginatedResponseContent]
|
|
36
44
|
def list(request_options: {}, **params)
|
|
37
45
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -61,7 +69,7 @@ module Auth0
|
|
|
61
69
|
end
|
|
62
70
|
code = response.code.to_i
|
|
63
71
|
if code.between?(200, 299)
|
|
64
|
-
parsed_response = Auth0::Types::ListUserRolesOffsetPaginatedResponseContent.load(response.body)
|
|
72
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserRolesOffsetPaginatedResponseContent.load(response.body))
|
|
65
73
|
[parsed_response, response]
|
|
66
74
|
else
|
|
67
75
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -87,6 +95,12 @@ module Auth0
|
|
|
87
95
|
# @option request_options [Integer] :timeout_in_seconds
|
|
88
96
|
# @option params [String] :id
|
|
89
97
|
#
|
|
98
|
+
# @example
|
|
99
|
+
# client.users.roles.assign(
|
|
100
|
+
# id: "id",
|
|
101
|
+
# roles: ["roles"]
|
|
102
|
+
# )
|
|
103
|
+
#
|
|
90
104
|
# @return [untyped]
|
|
91
105
|
def assign(request_options: {}, **params)
|
|
92
106
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -129,6 +143,12 @@ module Auth0
|
|
|
129
143
|
# @option request_options [Integer] :timeout_in_seconds
|
|
130
144
|
# @option params [String] :id
|
|
131
145
|
#
|
|
146
|
+
# @example
|
|
147
|
+
# client.users.roles.delete(
|
|
148
|
+
# id: "id",
|
|
149
|
+
# roles: ["roles"]
|
|
150
|
+
# )
|
|
151
|
+
#
|
|
132
152
|
# @return [untyped]
|
|
133
153
|
def delete(request_options: {}, **params)
|
|
134
154
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -25,6 +25,14 @@ module Auth0
|
|
|
25
25
|
# @option params [String, nil] :from
|
|
26
26
|
# @option params [Integer, nil] :take
|
|
27
27
|
#
|
|
28
|
+
# @example
|
|
29
|
+
# client.users.sessions.list(
|
|
30
|
+
# user_id: "user_id",
|
|
31
|
+
# include_totals: true,
|
|
32
|
+
# from: "from",
|
|
33
|
+
# take: 1
|
|
34
|
+
# )
|
|
35
|
+
#
|
|
28
36
|
# @return [Auth0::Types::ListUserSessionsPaginatedResponseContent]
|
|
29
37
|
def list(request_options: {}, **params)
|
|
30
38
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -53,7 +61,7 @@ module Auth0
|
|
|
53
61
|
end
|
|
54
62
|
code = response.code.to_i
|
|
55
63
|
if code.between?(200, 299)
|
|
56
|
-
parsed_response = Auth0::Types::ListUserSessionsPaginatedResponseContent.load(response.body)
|
|
64
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserSessionsPaginatedResponseContent.load(response.body))
|
|
57
65
|
[parsed_response, response]
|
|
58
66
|
else
|
|
59
67
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -73,6 +81,9 @@ module Auth0
|
|
|
73
81
|
# @option request_options [Integer] :timeout_in_seconds
|
|
74
82
|
# @option params [String] :user_id
|
|
75
83
|
#
|
|
84
|
+
# @example
|
|
85
|
+
# client.users.sessions.delete(user_id: "user_id")
|
|
86
|
+
#
|
|
76
87
|
# @return [untyped]
|
|
77
88
|
def delete(request_options: {}, **params)
|
|
78
89
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|