auth0 6.2.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.fern/metadata.json +6 -5
- data/.fern/replay.lock +13 -1
- data/.version +1 -1
- data/CHANGELOG.md +13 -0
- data/EXAMPLES.md +44 -0
- data/examples/ruby-api/Gemfile.lock +1 -1
- data/lib/auth0/actions/client.rb +47 -6
- data/lib/auth0/actions/executions/client.rb +4 -1
- data/lib/auth0/actions/modules/client.rb +40 -6
- data/lib/auth0/actions/modules/versions/client.rb +19 -3
- data/lib/auth0/actions/triggers/bindings/client.rb +12 -2
- data/lib/auth0/actions/triggers/client.rb +4 -1
- data/lib/auth0/actions/versions/client.rb +27 -4
- data/lib/auth0/agents/client.rb +22 -4
- data/lib/auth0/anomaly/blocks/client.rb +6 -0
- data/lib/auth0/api/authentication_endpoints.rb +40 -0
- data/lib/auth0/attack_protection/bot_detection/client.rb +8 -2
- data/lib/auth0/attack_protection/breached_password_detection/client.rb +8 -2
- data/lib/auth0/attack_protection/brute_force_protection/client.rb +8 -2
- data/lib/auth0/attack_protection/captcha/client.rb +8 -2
- data/lib/auth0/attack_protection/phone_provider_protection/client.rb +8 -2
- data/lib/auth0/attack_protection/suspicious_ip_throttling/client.rb +8 -2
- data/lib/auth0/branding/client.rb +8 -2
- data/lib/auth0/branding/phone/providers/client.rb +31 -5
- data/lib/auth0/branding/phone/templates/client.rb +39 -7
- data/lib/auth0/branding/templates/client.rb +10 -1
- data/lib/auth0/branding/themes/client.rb +162 -4
- data/lib/auth0/client.rb +8 -8
- data/lib/auth0/client_grants/client.rb +28 -4
- data/lib/auth0/client_grants/organizations/client.rb +9 -1
- data/lib/auth0/clients/client.rb +46 -7
- data/lib/auth0/clients/connections/client.rb +11 -1
- data/lib/auth0/clients/credentials/client.rb +36 -7
- data/lib/auth0/clients/types/create_client_request_content.rb +4 -0
- data/lib/auth0/clients/types/update_client_request_content.rb +2 -0
- data/lib/auth0/connection_profiles/client.rb +30 -6
- data/lib/auth0/connections/client.rb +37 -4
- data/lib/auth0/connections/clients/client.rb +21 -2
- data/lib/auth0/connections/directory_provisioning/client.rb +73 -8
- data/lib/auth0/connections/directory_provisioning/synchronizations/client.rb +4 -1
- data/lib/auth0/connections/keys/client.rb +31 -8
- data/lib/auth0/connections/scim_configuration/client.rb +37 -6
- data/lib/auth0/connections/scim_configuration/tokens/client.rb +14 -2
- data/lib/auth0/connections/users/client.rb +6 -0
- data/lib/auth0/custom_domains/client.rb +43 -8
- data/lib/auth0/device_credentials/client.rb +25 -2
- data/lib/auth0/email_templates/client.rb +19 -4
- data/lib/auth0/emails/provider/client.rb +23 -3
- data/lib/auth0/event_streams/client.rb +38 -5
- data/lib/auth0/event_streams/deliveries/client.rb +19 -2
- data/lib/auth0/event_streams/redeliveries/client.rb +10 -1
- data/lib/auth0/events/client.rb +7 -0
- data/lib/auth0/experimentation/client.rb +29 -0
- data/lib/auth0/experimentation/experiments/client.rb +367 -0
- data/lib/auth0/experimentation/experiments/types/advance_ramp_request_content.rb +15 -0
- data/lib/auth0/experimentation/experiments/types/create_experiment_request_content.rb +27 -0
- data/lib/auth0/experimentation/experiments/types/list_experiments_request_parameters.rb +21 -0
- data/lib/auth0/experimentation/experiments/types/update_experiment_request_parameters.rb +25 -0
- data/lib/auth0/experimentation/experiments/types/update_experiment_status_request_content.rb +15 -0
- data/lib/auth0/experimentation/feature_flags/client.rb +280 -0
- data/lib/auth0/experimentation/feature_flags/types/create_feature_flag_request_content.rb +17 -0
- data/lib/auth0/experimentation/feature_flags/types/list_feature_flags_request_parameters.rb +19 -0
- data/lib/auth0/experimentation/feature_flags/types/update_feature_flag_request_content.rb +19 -0
- data/lib/auth0/experimentation/feature_flags/types/update_feature_flag_status_request_content.rb +15 -0
- data/lib/auth0/experimentation/feature_flags/variations/client.rb +230 -0
- data/lib/auth0/experimentation/feature_flags/variations/types/create_variation_request_content.rb +21 -0
- data/lib/auth0/experimentation/feature_flags/variations/types/update_variation_request_content.rb +23 -0
- data/lib/auth0/experimentation/segments/client.rb +228 -0
- data/lib/auth0/experimentation/segments/types/create_segment_request_content.rb +17 -0
- data/lib/auth0/experimentation/segments/types/list_segments_request_parameters.rb +17 -0
- data/lib/auth0/experimentation/segments/types/update_segment_request_content.rb +19 -0
- data/lib/auth0/flows/client.rb +28 -4
- data/lib/auth0/flows/executions/client.rb +23 -2
- data/lib/auth0/flows/vault/connections/client.rb +31 -4
- data/lib/auth0/forms/client.rb +27 -4
- data/lib/auth0/groups/client.rb +21 -2
- data/lib/auth0/groups/members/client.rb +10 -1
- data/lib/auth0/groups/roles/client.rb +20 -1
- data/lib/auth0/guardian/client.rb +77 -0
- data/lib/auth0/guardian/enrollments/client.rb +11 -2
- data/lib/auth0/guardian/factors/client.rb +21 -5
- data/lib/auth0/guardian/factors/duo/settings/client.rb +12 -3
- data/lib/auth0/guardian/factors/email/client.rb +93 -0
- data/lib/auth0/guardian/factors/email/types/set_email_factor_settings_request_content.rb +17 -0
- data/lib/auth0/guardian/factors/phone/client.rb +110 -8
- data/lib/auth0/guardian/factors/phone/types/set_phone_factor_settings_request_content.rb +17 -0
- data/lib/auth0/guardian/factors/push_notification/client.rb +48 -12
- data/lib/auth0/guardian/factors/sms/client.rb +32 -9
- data/lib/auth0/guardian/policies/client.rb +8 -2
- data/lib/auth0/guardian/types/set_guardian_settings_request_content.rb +17 -0
- data/lib/auth0/hooks/client.rb +33 -4
- data/lib/auth0/hooks/secrets/client.rb +38 -4
- data/lib/auth0/jobs/client.rb +4 -1
- data/lib/auth0/jobs/errors/client.rb +9 -4
- data/lib/auth0/jobs/users_exports/client.rb +4 -1
- data/lib/auth0/jobs/users_imports/client.rb +14 -6
- data/lib/auth0/jobs/verification_email/client.rb +4 -1
- data/lib/auth0/keys/custom_signing/client.rb +13 -2
- data/lib/auth0/keys/encryption/client.rb +33 -5
- data/lib/auth0/keys/network_acls/client.rb +19 -3
- data/lib/auth0/keys/signing/client.rb +21 -7
- data/lib/auth0/log_streams/client.rb +29 -7
- data/lib/auth0/logs/client.rb +16 -2
- data/lib/auth0/network_acls/client.rb +41 -4
- data/lib/auth0/organizations/client.rb +109 -10
- data/lib/auth0/organizations/client_grants/client.rb +25 -2
- data/lib/auth0/organizations/clients/client.rb +38 -4
- data/lib/auth0/organizations/connections/client.rb +37 -4
- data/lib/auth0/organizations/connections/types/create_organization_all_connection_request_parameters.rb +2 -0
- data/lib/auth0/organizations/connections/types/update_organization_connection_request_parameters.rb +2 -0
- data/lib/auth0/organizations/discovery_domains/client.rb +42 -5
- data/lib/auth0/organizations/enabled_connections/client.rb +36 -4
- data/lib/auth0/organizations/groups/client.rb +8 -1
- data/lib/auth0/organizations/groups/roles/client.rb +23 -1
- data/lib/auth0/organizations/invitations/client.rb +40 -3
- data/lib/auth0/organizations/members/client.rb +23 -1
- data/lib/auth0/organizations/members/effective_roles/client.rb +9 -1
- data/lib/auth0/organizations/members/effective_roles/sources/groups/client.rb +10 -1
- data/lib/auth0/organizations/members/roles/client.rb +24 -1
- data/lib/auth0/organizations/roles/groups/client.rb +9 -1
- data/lib/auth0/organizations/roles/members/client.rb +11 -1
- data/lib/auth0/organizations/types/search_organizations_request_parameters.rb +19 -0
- data/lib/auth0/prompts/client.rb +8 -2
- data/lib/auth0/prompts/custom_text/client.rb +20 -2
- data/lib/auth0/prompts/partials/client.rb +16 -2
- data/lib/auth0/prompts/rendering/client.rb +34 -4
- data/lib/auth0/rate_limit_policies/client.rb +37 -4
- data/lib/auth0/refresh_tokens/client.rb +25 -3
- data/lib/auth0/resource_servers/client.rb +102 -4
- data/lib/auth0/resource_servers/types/create_resource_server_request_content.rb +6 -0
- data/lib/auth0/resource_servers/types/search_resource_servers_request_parameters.rb +23 -0
- data/lib/auth0/resource_servers/types/update_resource_server_request_content.rb +6 -0
- data/lib/auth0/risk_assessments/settings/client.rb +8 -2
- data/lib/auth0/risk_assessments/settings/new_device/client.rb +8 -2
- data/lib/auth0/roles/client.rb +26 -4
- data/lib/auth0/roles/groups/client.rb +20 -1
- data/lib/auth0/roles/permissions/client.rb +27 -1
- data/lib/auth0/roles/users/client.rb +15 -1
- data/lib/auth0/rules/client.rb +33 -4
- data/lib/auth0/rules_configs/client.rb +19 -5
- data/lib/auth0/self_service_profiles/client.rb +23 -4
- data/lib/auth0/self_service_profiles/custom_text/client.rb +23 -3
- data/lib/auth0/self_service_profiles/sso_ticket/client.rb +10 -1
- data/lib/auth0/sessions/client.rb +14 -2
- data/lib/auth0/stats/client.rb +16 -5
- data/lib/auth0/supplemental_signals/client.rb +8 -2
- data/lib/auth0/tenants/settings/client.rb +11 -2
- data/lib/auth0/tenants/settings/types/update_tenant_settings_request_content.rb +2 -0
- data/lib/auth0/tickets/client.rb +8 -2
- data/lib/auth0/token_exchange_profiles/client.rb +26 -3
- data/lib/auth0/types/advance_ramp_response_content.rb +15 -0
- data/lib/auth0/types/allocation_item.rb +27 -0
- data/lib/auth0/types/allocation_request_item.rb +19 -0
- data/lib/auth0/types/{connection_deletion_behavior_enum.rb → allocation_strategy_enum.rb} +3 -3
- data/lib/auth0/types/anonymous_sessions.rb +10 -0
- data/lib/auth0/types/async_approval_notifications_channels_enum.rb +1 -0
- data/lib/auth0/types/authentication_flow_enum.rb +16 -0
- data/lib/auth0/types/client.rb +6 -0
- data/lib/auth0/types/client_my_organization_patch_configuration.rb +4 -0
- data/lib/auth0/types/client_my_organization_post_configuration.rb +4 -0
- data/lib/auth0/types/client_my_organization_response_configuration.rb +4 -0
- data/lib/auth0/types/client_oidc_backchannel_logout_initiators_enum.rb +1 -0
- data/lib/auth0/types/client_oidc_support_allowed_scopes_enum.rb +14 -0
- data/lib/auth0/types/client_oidc_support_post.rb +15 -0
- data/lib/auth0/types/connection_identity_provider_enum.rb +4 -13
- data/lib/auth0/types/connection_options_ad.rb +2 -0
- data/lib/auth0/types/connection_options_adfs.rb +2 -0
- data/lib/auth0/types/connection_options_azure_ad.rb +2 -0
- data/lib/auth0/types/connection_options_common_saml.rb +2 -0
- data/lib/auth0/types/connection_options_ping_federate.rb +2 -0
- data/lib/auth0/types/connection_options_saml.rb +2 -0
- data/lib/auth0/types/connection_properties_options.rb +4 -0
- data/lib/auth0/types/connection_strategy_enum.rb +4 -13
- data/lib/auth0/types/connection_thumbprints_sha384.rb +23 -0
- data/lib/auth0/types/connection_thumbprints_sha384ad.rb +23 -0
- data/lib/auth0/types/connection_thumbprints_sha384saml.rb +23 -0
- data/lib/auth0/types/create_anonymous_sessions.rb +10 -0
- data/lib/auth0/types/create_client_response_content.rb +6 -0
- data/lib/auth0/types/create_experiment_response_content.rb +45 -0
- data/lib/auth0/types/create_feature_flag_parameters.rb +23 -0
- data/lib/auth0/types/create_feature_flag_response_content.rb +23 -0
- data/lib/auth0/types/create_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/create_resource_server_response_content.rb +6 -0
- data/lib/auth0/types/create_segment_response_content.rb +21 -0
- data/lib/auth0/types/create_variation_response_content.rb +21 -0
- data/lib/auth0/types/{organization_deletion_behavior_enum.rb → default_config_enum.rb} +3 -3
- data/lib/auth0/types/experiment_list_item.rb +45 -0
- data/lib/auth0/types/experiment_status_enum.rb +15 -0
- data/lib/auth0/types/experiment_transition_status_enum.rb +14 -0
- data/lib/auth0/types/experiment_validation_error.rb +11 -0
- data/lib/auth0/types/feature_flag.rb +23 -0
- data/lib/auth0/types/feature_flag_config_param.rb +13 -0
- data/lib/auth0/types/feature_flag_config_param_type_enum.rb +15 -0
- data/lib/auth0/types/feature_flag_config_params.rb +23 -0
- data/lib/auth0/types/feature_flag_status_enum.rb +13 -0
- data/lib/auth0/types/feature_flag_type_enum.rb +12 -0
- data/lib/auth0/types/get_client_response_content.rb +6 -0
- data/lib/auth0/types/get_email_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/get_experiment_response_content.rb +45 -0
- data/lib/auth0/types/get_feature_flag_response_content.rb +23 -0
- data/lib/auth0/types/get_guardian_settings_response_content.rb +15 -0
- data/lib/auth0/types/get_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/get_phone_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/get_resource_server_response_content.rb +6 -0
- data/lib/auth0/types/get_segment_response_content.rb +21 -0
- data/lib/auth0/types/get_tenant_settings_response_content.rb +2 -0
- data/lib/auth0/types/get_variation_response_content.rb +21 -0
- data/lib/auth0/types/list_experiments_response_content.rb +11 -0
- data/lib/auth0/types/list_feature_flags_response_content.rb +11 -0
- data/lib/auth0/types/list_segments_response_content.rb +11 -0
- data/lib/auth0/types/list_variations_response_content.rb +9 -0
- data/lib/auth0/types/oauth_scope.rb +4 -3
- data/lib/auth0/types/organization_all_connection_post.rb +2 -0
- data/lib/auth0/types/organization_member_access_level_enum.rb +14 -0
- data/lib/auth0/types/organization_member_access_level_enum_with_null.rb +14 -0
- data/lib/auth0/types/organization_sort_field_enum.rb +13 -0
- data/lib/auth0/types/resource_server.rb +6 -0
- data/lib/auth0/types/resource_server_access_token.rb +10 -0
- data/lib/auth0/types/resource_server_access_token_claims_mapping.rb +10 -0
- data/lib/auth0/types/resource_server_access_token_custom_claims_mapping.rb +23 -0
- data/lib/auth0/types/resource_server_access_token_custom_claims_mapping_rule.rb +11 -0
- data/lib/auth0/types/resource_server_search_response.rb +55 -0
- data/lib/auth0/types/resource_server_sort_field_enum.rb +13 -0
- data/lib/auth0/types/resource_server_subject_type_authorization.rb +2 -0
- data/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user.rb +10 -0
- data/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user_policy_enum.rb +12 -0
- data/lib/auth0/types/rotate_client_secret_response_content.rb +6 -0
- data/lib/auth0/types/search_organization.rb +23 -0
- data/lib/auth0/types/{list_template_organizations_paginated_response_content.rb → search_organizations_paginated_response_content.rb} +3 -3
- data/lib/auth0/types/search_parser_enum.rb +12 -0
- data/lib/auth0/types/search_resource_servers_response_content.rb +11 -0
- data/lib/auth0/types/segment.rb +21 -0
- data/lib/auth0/types/segment_contains_expression.rb +9 -0
- data/lib/auth0/types/segment_ends_with_expression.rb +9 -0
- data/lib/auth0/types/segment_exists_expression.rb +9 -0
- data/lib/auth0/types/segment_match_conditions.rb +30 -0
- data/lib/auth0/types/segment_match_expression.rb +19 -0
- data/lib/auth0/types/segment_not_match_conditions.rb +30 -0
- data/lib/auth0/types/segment_rule.rb +11 -0
- data/lib/auth0/types/segment_starts_with_expression.rb +9 -0
- data/lib/auth0/types/segment_type_enum.rb +12 -0
- data/lib/auth0/types/segment_type_filter_enum.rb +12 -0
- data/lib/auth0/types/set_email_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/set_guardian_settings_response_content.rb +15 -0
- data/lib/auth0/types/set_phone_factor_settings_response_content.rb +11 -0
- data/lib/auth0/types/tenant_settings_sessions.rb +2 -0
- data/lib/auth0/types/tenant_settings_sessions_anonymous.rb +12 -0
- data/lib/auth0/types/update_anonymous_sessions.rb +10 -0
- data/lib/auth0/types/update_client_response_content.rb +6 -0
- data/lib/auth0/types/update_connection_options.rb +4 -0
- data/lib/auth0/types/update_experiment_response_content.rb +45 -0
- data/lib/auth0/types/update_experiment_status_response_content.rb +45 -0
- data/lib/auth0/types/update_feature_flag_parameters.rb +23 -0
- data/lib/auth0/types/update_feature_flag_response_content.rb +23 -0
- data/lib/auth0/types/update_feature_flag_status_response_content.rb +23 -0
- data/lib/auth0/types/update_organization_all_connection_response_content.rb +2 -0
- data/lib/auth0/types/update_resource_server_response_content.rb +6 -0
- data/lib/auth0/types/update_segment_response_content.rb +21 -0
- data/lib/auth0/types/update_tenant_settings_response_content.rb +2 -0
- data/lib/auth0/types/update_variation_overrides_map.rb +23 -0
- data/lib/auth0/types/update_variation_response_content.rb +21 -0
- data/lib/auth0/types/validate_experiment_response_content.rb +11 -0
- data/lib/auth0/types/variation.rb +21 -0
- data/lib/auth0/types/variation_overrides_map.rb +23 -0
- data/lib/auth0/user_attribute_profiles/client.rb +40 -6
- data/lib/auth0/user_blocks/client.rb +20 -2
- data/lib/auth0/user_grants/client.rb +17 -1
- data/lib/auth0/users/authentication_methods/client.rb +57 -9
- data/lib/auth0/users/authenticators/client.rb +3 -0
- data/lib/auth0/users/client.rb +75 -23
- data/lib/auth0/users/connected_accounts/client.rb +8 -1
- data/lib/auth0/users/effective_permissions/client.rb +9 -1
- data/lib/auth0/users/effective_permissions/sources/roles/client.rb +10 -1
- data/lib/auth0/users/effective_roles/client.rb +8 -1
- data/lib/auth0/users/effective_roles/sources/groups/client.rb +9 -1
- data/lib/auth0/users/enrollments/client.rb +9 -4
- data/lib/auth0/users/groups/client.rb +11 -1
- data/lib/auth0/users/identities/client.rb +17 -5
- data/lib/auth0/users/logs/client.rb +10 -1
- data/lib/auth0/users/multifactor/client.rb +9 -0
- data/lib/auth0/users/organizations/client.rb +9 -1
- data/lib/auth0/users/permissions/client.rb +27 -1
- data/lib/auth0/users/refresh_token/client.rb +12 -1
- data/lib/auth0/users/risk_assessments/client.rb +7 -0
- data/lib/auth0/users/roles/client.rb +21 -1
- data/lib/auth0/users/sessions/client.rb +12 -1
- data/lib/auth0/verifiable_credentials/verification/templates/client.rb +32 -4
- data/lib/auth0/version.rb +1 -1
- data/lib/auth0.rb +107 -18
- data/wiremock/wiremock-mappings.json +1246 -366
- metadata +108 -19
- data/lib/auth0/organization_templates/client.rb +0 -220
- data/lib/auth0/organization_templates/types/create_organization_template_request_content.rb +0 -35
- data/lib/auth0/organization_templates/types/list_organization_templates_request_parameters.rb +0 -13
- data/lib/auth0/organization_templates/types/list_template_organizations_request_parameters.rb +0 -15
- data/lib/auth0/organization_templates/types/update_organization_template_request_content.rb +0 -37
- data/lib/auth0/organizations/organization_template/client.rb +0 -117
- data/lib/auth0/types/list_organization_templates_paginated_response_content.rb +0 -11
- data/lib/auth0/types/organization_template.rb +0 -39
- data/lib/auth0/types/organization_template_allowed_strategy_enum.rb +0 -17
- data/lib/auth0/types/organization_template_assigned_organization.rb +0 -10
- data/lib/auth0/types/organization_template_role_visibility_enum.rb +0 -13
- data/lib/auth0/types/organization_template_role_visibility_override.rb +0 -12
- data/lib/auth0/types/organization_template_role_visibility_policy.rb +0 -12
- data/lib/auth0/types/organization_template_use_for_organization_discovery.rb +0 -12
|
@@ -25,6 +25,14 @@ module Auth0
|
|
|
25
25
|
# @option params [Integer, nil] :per_page
|
|
26
26
|
# @option params [Boolean, nil] :include_totals
|
|
27
27
|
#
|
|
28
|
+
# @example
|
|
29
|
+
# client.users.authentication_methods.list(
|
|
30
|
+
# id: "id",
|
|
31
|
+
# page: 1,
|
|
32
|
+
# per_page: 1,
|
|
33
|
+
# include_totals: true
|
|
34
|
+
# )
|
|
35
|
+
#
|
|
28
36
|
# @return [Auth0::Types::ListUserAuthenticationMethodsOffsetPaginatedResponseContent]
|
|
29
37
|
def list(request_options: {}, **params)
|
|
30
38
|
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::ListUserAuthenticationMethodsOffsetPaginatedResponseContent.load(response.body)
|
|
65
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserAuthenticationMethodsOffsetPaginatedResponseContent.load(response.body))
|
|
58
66
|
[parsed_response, response]
|
|
59
67
|
else
|
|
60
68
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -75,6 +83,12 @@ module Auth0
|
|
|
75
83
|
# @option request_options [Integer] :timeout_in_seconds
|
|
76
84
|
# @option params [String] :id
|
|
77
85
|
#
|
|
86
|
+
# @example
|
|
87
|
+
# client.users.authentication_methods.create(
|
|
88
|
+
# id: "id",
|
|
89
|
+
# type: "phone"
|
|
90
|
+
# )
|
|
91
|
+
#
|
|
78
92
|
# @return [Auth0::Types::CreateUserAuthenticationMethodResponseContent]
|
|
79
93
|
def create(request_options: {}, **params)
|
|
80
94
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -96,7 +110,7 @@ module Auth0
|
|
|
96
110
|
end
|
|
97
111
|
code = response.code.to_i
|
|
98
112
|
if code.between?(200, 299)
|
|
99
|
-
Auth0::Types::CreateUserAuthenticationMethodResponseContent.load(response.body)
|
|
113
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateUserAuthenticationMethodResponseContent.load(response.body))
|
|
100
114
|
else
|
|
101
115
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
102
116
|
raise error_class.new(response.body, code: code)
|
|
@@ -119,14 +133,25 @@ module Auth0
|
|
|
119
133
|
# @option request_options [Integer] :timeout_in_seconds
|
|
120
134
|
# @option params [String] :id
|
|
121
135
|
#
|
|
136
|
+
# @example
|
|
137
|
+
# client.users.authentication_methods.set(
|
|
138
|
+
# id: "id",
|
|
139
|
+
# request: [{
|
|
140
|
+
# type: "phone"
|
|
141
|
+
# }]
|
|
142
|
+
# )
|
|
143
|
+
#
|
|
122
144
|
# @return [Array[Auth0::Types::SetUserAuthenticationMethodResponseContent]]
|
|
123
145
|
def set(request_options: {}, **params)
|
|
124
146
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
147
|
+
path_param_names = %i[id]
|
|
148
|
+
body_params = params.except(*path_param_names)
|
|
149
|
+
|
|
125
150
|
request = Auth0::Internal::JSON::Request.new(
|
|
126
151
|
base_url: request_options[:base_url],
|
|
127
152
|
method: "PUT",
|
|
128
153
|
path: "users/#{URI.encode_uri_component(params[:id].to_s)}/authentication-methods",
|
|
129
|
-
body:
|
|
154
|
+
body: body_params,
|
|
130
155
|
request_options: request_options
|
|
131
156
|
)
|
|
132
157
|
begin
|
|
@@ -135,10 +160,12 @@ module Auth0
|
|
|
135
160
|
raise Auth0::Errors::TimeoutError
|
|
136
161
|
end
|
|
137
162
|
code = response.code.to_i
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
163
|
+
if code.between?(200, 299)
|
|
164
|
+
Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::SetUserAuthenticationMethodResponseContent], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true)))
|
|
165
|
+
else
|
|
166
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
167
|
+
raise error_class.new(response.body, code: code)
|
|
168
|
+
end
|
|
142
169
|
end
|
|
143
170
|
|
|
144
171
|
# Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action
|
|
@@ -153,6 +180,9 @@ module Auth0
|
|
|
153
180
|
# @option request_options [Integer] :timeout_in_seconds
|
|
154
181
|
# @option params [String] :id
|
|
155
182
|
#
|
|
183
|
+
# @example
|
|
184
|
+
# client.users.authentication_methods.delete_all(id: "id")
|
|
185
|
+
#
|
|
156
186
|
# @return [untyped]
|
|
157
187
|
def delete_all(request_options: {}, **params)
|
|
158
188
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -184,6 +214,12 @@ module Auth0
|
|
|
184
214
|
# @option params [String] :id
|
|
185
215
|
# @option params [String] :authentication_method_id
|
|
186
216
|
#
|
|
217
|
+
# @example
|
|
218
|
+
# client.users.authentication_methods.get(
|
|
219
|
+
# id: "id",
|
|
220
|
+
# authentication_method_id: "authentication_method_id"
|
|
221
|
+
# )
|
|
222
|
+
#
|
|
187
223
|
# @return [Auth0::Types::GetUserAuthenticationMethodResponseContent]
|
|
188
224
|
def get(request_options: {}, **params)
|
|
189
225
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -200,7 +236,7 @@ module Auth0
|
|
|
200
236
|
end
|
|
201
237
|
code = response.code.to_i
|
|
202
238
|
if code.between?(200, 299)
|
|
203
|
-
Auth0::Types::GetUserAuthenticationMethodResponseContent.load(response.body)
|
|
239
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetUserAuthenticationMethodResponseContent.load(response.body))
|
|
204
240
|
else
|
|
205
241
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
206
242
|
raise error_class.new(response.body, code: code)
|
|
@@ -221,6 +257,12 @@ module Auth0
|
|
|
221
257
|
# @option params [String] :id
|
|
222
258
|
# @option params [String] :authentication_method_id
|
|
223
259
|
#
|
|
260
|
+
# @example
|
|
261
|
+
# client.users.authentication_methods.delete(
|
|
262
|
+
# id: "id",
|
|
263
|
+
# authentication_method_id: "authentication_method_id"
|
|
264
|
+
# )
|
|
265
|
+
#
|
|
224
266
|
# @return [untyped]
|
|
225
267
|
def delete(request_options: {}, **params)
|
|
226
268
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -256,6 +298,12 @@ module Auth0
|
|
|
256
298
|
# @option params [String] :id
|
|
257
299
|
# @option params [String] :authentication_method_id
|
|
258
300
|
#
|
|
301
|
+
# @example
|
|
302
|
+
# client.users.authentication_methods.update(
|
|
303
|
+
# id: "id",
|
|
304
|
+
# authentication_method_id: "authentication_method_id"
|
|
305
|
+
# )
|
|
306
|
+
#
|
|
259
307
|
# @return [Auth0::Types::UpdateUserAuthenticationMethodResponseContent]
|
|
260
308
|
def update(request_options: {}, **params)
|
|
261
309
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -277,7 +325,7 @@ module Auth0
|
|
|
277
325
|
end
|
|
278
326
|
code = response.code.to_i
|
|
279
327
|
if code.between?(200, 299)
|
|
280
|
-
Auth0::Types::UpdateUserAuthenticationMethodResponseContent.load(response.body)
|
|
328
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateUserAuthenticationMethodResponseContent.load(response.body))
|
|
281
329
|
else
|
|
282
330
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
283
331
|
raise error_class.new(response.body, 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.authenticators.delete_all(id: "id")
|
|
29
|
+
#
|
|
27
30
|
# @return [untyped]
|
|
28
31
|
def delete_all(request_options: {}, **params)
|
|
29
32
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
data/lib/auth0/users/client.rb
CHANGED
|
@@ -10,28 +10,35 @@ module Auth0
|
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where
|
|
14
|
+
# slightly stale results are acceptable. With it, you can:
|
|
14
15
|
#
|
|
15
|
-
# - Specify
|
|
16
|
+
# - Specify search criteria for users
|
|
16
17
|
# - Sort the users to be returned
|
|
17
18
|
# - Select the fields to be returned
|
|
18
19
|
# - Specify the number of users to retrieve per page and the page index
|
|
19
20
|
#
|
|
21
|
+
# This endpoint is **not suited for use in critical paths**. It is eventually consistent and runs under a short
|
|
22
|
+
# (~2 second) query time limit, so results can be stale and heavy queries can return a 503.
|
|
20
23
|
#
|
|
24
|
+
# - Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead,
|
|
25
|
+
# [look users up directly by ID or
|
|
26
|
+
# email](https://auth0.com/docs/manage-users/user-search/get-users-by-id-or-email#management-api) to get their
|
|
27
|
+
# current state.
|
|
28
|
+
# - Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to [Event
|
|
29
|
+
# Streams](https://auth0.com/docs/customize/events/sync-data-across-systems) to receive every change as it
|
|
30
|
+
# happens.
|
|
31
|
+
# - Do not use this endpoint to enumerate or export your entire user base. Instead, run a [bulk user
|
|
32
|
+
# export](https://auth0.com/docs/manage-users/user-migration/bulk-user-exports) to retrieve the full set.
|
|
21
33
|
#
|
|
22
|
-
#
|
|
23
|
-
# syntax
|
|
34
|
+
# Use the `q` query parameter to match users with [query string
|
|
35
|
+
# syntax](https://auth0.com/docs/manage-users/user-search/user-search-query-syntax). For full instructions and
|
|
36
|
+
# guidance, see [How to List and Search
|
|
37
|
+
# Users](https://auth0.com/docs/manage-users/user-search/list-and-search-users).
|
|
24
38
|
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
# endpoints for retrieving users.
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
# Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use
|
|
33
|
-
# the [export job](https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports), or the [User Import /
|
|
34
|
-
# Export](https://auth0.com/docs/extensions/user-import-export) extension.
|
|
39
|
+
# For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow
|
|
40
|
+
# and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in
|
|
41
|
+
# `app_metadata` or `user_metadata`) or using leading wildcards.
|
|
35
42
|
#
|
|
36
43
|
# @param request_options [Hash]
|
|
37
44
|
# @param params [Hash]
|
|
@@ -51,6 +58,20 @@ module Auth0
|
|
|
51
58
|
# @option params [Auth0::Types::SearchEngineVersionsEnum, nil] :search_engine
|
|
52
59
|
# @option params [Boolean, nil] :primary_order
|
|
53
60
|
#
|
|
61
|
+
# @example
|
|
62
|
+
# client.users.list(
|
|
63
|
+
# page: 1,
|
|
64
|
+
# per_page: 1,
|
|
65
|
+
# include_totals: true,
|
|
66
|
+
# sort: "sort",
|
|
67
|
+
# connection: "connection",
|
|
68
|
+
# fields: "fields",
|
|
69
|
+
# include_fields: true,
|
|
70
|
+
# q: "q",
|
|
71
|
+
# search_engine: "v1",
|
|
72
|
+
# primary_order: true
|
|
73
|
+
# )
|
|
74
|
+
#
|
|
54
75
|
# @return [Auth0::Types::ListUsersOffsetPaginatedResponseContent]
|
|
55
76
|
def list(request_options: {}, **params)
|
|
56
77
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -87,7 +108,7 @@ module Auth0
|
|
|
87
108
|
end
|
|
88
109
|
code = response.code.to_i
|
|
89
110
|
if code.between?(200, 299)
|
|
90
|
-
parsed_response = Auth0::Types::ListUsersOffsetPaginatedResponseContent.load(response.body)
|
|
111
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUsersOffsetPaginatedResponseContent.load(response.body))
|
|
91
112
|
[parsed_response, response]
|
|
92
113
|
else
|
|
93
114
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
@@ -110,6 +131,9 @@ module Auth0
|
|
|
110
131
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
111
132
|
# @option request_options [Integer] :timeout_in_seconds
|
|
112
133
|
#
|
|
134
|
+
# @example
|
|
135
|
+
# client.users.create(connection: "connection")
|
|
136
|
+
#
|
|
113
137
|
# @return [Auth0::Types::CreateUserResponseContent]
|
|
114
138
|
def create(request_options: {}, **params)
|
|
115
139
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -127,7 +151,7 @@ module Auth0
|
|
|
127
151
|
end
|
|
128
152
|
code = response.code.to_i
|
|
129
153
|
if code.between?(200, 299)
|
|
130
|
-
Auth0::Types::CreateUserResponseContent.load(response.body)
|
|
154
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::CreateUserResponseContent.load(response.body))
|
|
131
155
|
else
|
|
132
156
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
133
157
|
raise error_class.new(response.body, code: code)
|
|
@@ -154,6 +178,13 @@ module Auth0
|
|
|
154
178
|
# @option params [Boolean, nil] :include_fields
|
|
155
179
|
# @option params [String] :email
|
|
156
180
|
#
|
|
181
|
+
# @example
|
|
182
|
+
# client.users.list_users_by_email(
|
|
183
|
+
# fields: "fields",
|
|
184
|
+
# include_fields: true,
|
|
185
|
+
# email: "email"
|
|
186
|
+
# )
|
|
187
|
+
#
|
|
157
188
|
# @return [Array[Auth0::Types::UserResponseSchema]]
|
|
158
189
|
def list_users_by_email(request_options: {}, **params)
|
|
159
190
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -175,10 +206,12 @@ module Auth0
|
|
|
175
206
|
raise Auth0::Errors::TimeoutError
|
|
176
207
|
end
|
|
177
208
|
code = response.code.to_i
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
209
|
+
if code.between?(200, 299)
|
|
210
|
+
Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::UserResponseSchema], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true)))
|
|
211
|
+
else
|
|
212
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
213
|
+
raise error_class.new(response.body, code: code)
|
|
214
|
+
end
|
|
182
215
|
end
|
|
183
216
|
|
|
184
217
|
# Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see
|
|
@@ -196,6 +229,13 @@ module Auth0
|
|
|
196
229
|
# @option params [String, nil] :fields
|
|
197
230
|
# @option params [Boolean, nil] :include_fields
|
|
198
231
|
#
|
|
232
|
+
# @example
|
|
233
|
+
# client.users.get(
|
|
234
|
+
# id: "id",
|
|
235
|
+
# fields: "fields",
|
|
236
|
+
# include_fields: true
|
|
237
|
+
# )
|
|
238
|
+
#
|
|
199
239
|
# @return [Auth0::Types::GetUserResponseContent]
|
|
200
240
|
def get(request_options: {}, **params)
|
|
201
241
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -217,7 +257,7 @@ module Auth0
|
|
|
217
257
|
end
|
|
218
258
|
code = response.code.to_i
|
|
219
259
|
if code.between?(200, 299)
|
|
220
|
-
Auth0::Types::GetUserResponseContent.load(response.body)
|
|
260
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::GetUserResponseContent.load(response.body))
|
|
221
261
|
else
|
|
222
262
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
223
263
|
raise error_class.new(response.body, code: code)
|
|
@@ -236,6 +276,9 @@ module Auth0
|
|
|
236
276
|
# @option request_options [Integer] :timeout_in_seconds
|
|
237
277
|
# @option params [String] :id
|
|
238
278
|
#
|
|
279
|
+
# @example
|
|
280
|
+
# client.users.delete(id: "id")
|
|
281
|
+
#
|
|
239
282
|
# @return [untyped]
|
|
240
283
|
def delete(request_options: {}, **params)
|
|
241
284
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -364,6 +407,9 @@ module Auth0
|
|
|
364
407
|
# @option request_options [Integer] :timeout_in_seconds
|
|
365
408
|
# @option params [String] :id
|
|
366
409
|
#
|
|
410
|
+
# @example
|
|
411
|
+
# client.users.update(id: "id")
|
|
412
|
+
#
|
|
367
413
|
# @return [Auth0::Types::UpdateUserResponseContent]
|
|
368
414
|
def update(request_options: {}, **params)
|
|
369
415
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -385,7 +431,7 @@ module Auth0
|
|
|
385
431
|
end
|
|
386
432
|
code = response.code.to_i
|
|
387
433
|
if code.between?(200, 299)
|
|
388
|
-
Auth0::Types::UpdateUserResponseContent.load(response.body)
|
|
434
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::UpdateUserResponseContent.load(response.body))
|
|
389
435
|
else
|
|
390
436
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
391
437
|
raise error_class.new(response.body, code: code)
|
|
@@ -406,6 +452,9 @@ module Auth0
|
|
|
406
452
|
# @option request_options [Integer] :timeout_in_seconds
|
|
407
453
|
# @option params [String] :id
|
|
408
454
|
#
|
|
455
|
+
# @example
|
|
456
|
+
# client.users.regenerate_recovery_code(id: "id")
|
|
457
|
+
#
|
|
409
458
|
# @return [Auth0::Types::RegenerateUsersRecoveryCodeResponseContent]
|
|
410
459
|
def regenerate_recovery_code(request_options: {}, **params)
|
|
411
460
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -422,7 +471,7 @@ module Auth0
|
|
|
422
471
|
end
|
|
423
472
|
code = response.code.to_i
|
|
424
473
|
if code.between?(200, 299)
|
|
425
|
-
Auth0::Types::RegenerateUsersRecoveryCodeResponseContent.load(response.body)
|
|
474
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::RegenerateUsersRecoveryCodeResponseContent.load(response.body))
|
|
426
475
|
else
|
|
427
476
|
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
428
477
|
raise error_class.new(response.body, code: code)
|
|
@@ -440,6 +489,9 @@ module Auth0
|
|
|
440
489
|
# @option request_options [Integer] :timeout_in_seconds
|
|
441
490
|
# @option params [String] :id
|
|
442
491
|
#
|
|
492
|
+
# @example
|
|
493
|
+
# client.users.revoke_access(id: "id")
|
|
494
|
+
#
|
|
443
495
|
# @return [untyped]
|
|
444
496
|
def revoke_access(request_options: {}, **params)
|
|
445
497
|
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)
|