auth0 6.4.0 → 6.6.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 +10 -46
- data/.version +1 -1
- data/CHANGELOG.md +17 -0
- data/EXAMPLES.md +20 -0
- data/README.md +18 -0
- data/examples/ruby-api/Gemfile.lock +1 -1
- data/lib/auth0/attack_protection/brute_force_protection/types/update_brute_force_settings_request_content.rb +2 -0
- data/lib/auth0/auth_client.rb +27 -2
- data/lib/auth0/client.rb +20 -2
- data/lib/auth0/client_grants/client.rb +72 -0
- data/lib/auth0/client_grants/types/search_client_grants_request_parameters.rb +23 -0
- data/lib/auth0/client_profiles/client.rb +233 -0
- data/lib/auth0/client_profiles/types/create_client_profile_request_content.rb +17 -0
- data/lib/auth0/client_profiles/types/list_client_profiles_request_parameters.rb +13 -0
- data/lib/auth0/client_profiles/types/update_client_profile_request_content.rb +19 -0
- data/lib/auth0/clients/client.rb +84 -0
- data/lib/auth0/clients/types/create_client_request_content.rb +4 -0
- data/lib/auth0/clients/types/list_clients_request_parameters.rb +2 -0
- data/lib/auth0/clients/types/search_clients_request_parameters.rb +23 -0
- data/lib/auth0/clients/types/update_client_request_content.rb +6 -0
- data/lib/auth0/connections/keys/client.rb +5 -5
- data/lib/auth0/email_templates/client.rb +14 -2
- data/lib/auth0/experimentation/experiments/client.rb +2 -47
- data/lib/auth0/experimentation/experiments/types/create_experiment_request_content.rb +1 -1
- data/lib/auth0/experimentation/experiments/types/update_experiment_request_parameters.rb +2 -0
- data/lib/auth0/experimentation/feature_flags/client.rb +0 -45
- data/lib/auth0/experimentation/feature_flags/types/update_feature_flag_request_content.rb +2 -0
- data/lib/auth0/experimentation/segments/client.rb +4 -1
- data/lib/auth0/experimentation/segments/types/list_segments_request_parameters.rb +2 -0
- data/lib/auth0/experimentation/segments/types/update_segment_request_content.rb +2 -0
- data/lib/auth0/internal/http/rate_limit.rb +103 -0
- data/lib/auth0/internal/http/raw_client.rb +14 -2
- data/lib/auth0/internal/types/model.rb +15 -6
- data/lib/auth0/mixins/httpproxy.rb +9 -1
- data/lib/auth0/mixins/initializer.rb +5 -0
- data/lib/auth0/portals/client.rb +198 -0
- data/lib/auth0/portals/types/create_portal_request_content.rb +21 -0
- data/lib/auth0/portals/types/update_portal_request_content.rb +23 -0
- data/lib/auth0/resource_servers/types/create_resource_server_request_content.rb +4 -0
- data/lib/auth0/resource_servers/types/update_resource_server_request_content.rb +4 -0
- data/lib/auth0/roles/client.rb +2 -1
- data/lib/auth0/tenants/settings/types/update_tenant_settings_request_content.rb +4 -0
- data/lib/auth0/types/brute_force_protection_form_submission_mode_enum.rb +12 -0
- data/lib/auth0/types/cimd_external_metadata_created_by_enum.rb +12 -0
- data/lib/auth0/types/client.rb +8 -0
- data/lib/auth0/types/client_anonymous_session_transfer_network_binding_enum.rb +13 -0
- data/lib/auth0/types/client_external_metadata_status_enum.rb +12 -0
- data/lib/auth0/types/client_grant_sort_field_enum.rb +12 -0
- data/lib/auth0/types/client_oidc_support.rb +14 -0
- data/lib/auth0/types/client_oidc_support_patch.rb +14 -0
- data/lib/auth0/types/client_profile.rb +21 -0
- data/lib/auth0/types/client_profile_apply_policy.rb +12 -0
- data/lib/auth0/types/client_profile_apply_policy_external_metadata_created_by_enum.rb +11 -0
- data/lib/auth0/types/client_profile_apply_policy_external_metadata_type_enum.rb +11 -0
- data/lib/auth0/types/client_profile_client_configuration.rb +20 -0
- data/lib/auth0/types/client_profile_client_configuration_oidc_support.rb +10 -0
- data/lib/auth0/types/client_profile_client_configuration_oidc_support_allowed_scopes_enum.rb +14 -0
- data/lib/auth0/types/client_profile_client_configuration_oidc_support_default_value.rb +14 -0
- data/lib/auth0/types/client_profile_client_configuration_organization_discovery_method_enum.rb +12 -0
- data/lib/auth0/types/client_profile_client_configuration_organization_discovery_methods.rb +10 -0
- data/lib/auth0/types/client_profile_client_configuration_organization_require_behavior.rb +10 -0
- data/lib/auth0/types/client_profile_client_configuration_organization_require_behavior_enum.rb +13 -0
- data/lib/auth0/types/client_profile_client_configuration_organization_usage.rb +10 -0
- data/lib/auth0/types/client_profile_client_configuration_organization_usage_enum.rb +13 -0
- data/lib/auth0/types/client_profile_client_configuration_refresh_token.rb +14 -0
- data/lib/auth0/types/client_profile_client_configuration_require_proof_of_possession.rb +10 -0
- data/lib/auth0/types/client_profile_description.rb +23 -0
- data/lib/auth0/types/client_profile_id.rb +23 -0
- data/lib/auth0/types/client_profile_name.rb +23 -0
- data/lib/auth0/types/client_profile_refresh_token_idle_token_lifetime.rb +10 -0
- data/lib/auth0/types/client_profile_refresh_token_leeway.rb +10 -0
- data/lib/auth0/types/client_profile_refresh_token_token_lifetime.rb +10 -0
- data/lib/auth0/types/client_search_response.rb +143 -0
- data/lib/auth0/types/client_sort_field_enum.rb +12 -0
- data/lib/auth0/types/connection_client_id_samlxaa_requesting_app.rb +23 -0
- data/lib/auth0/types/connection_client_secret_samlxaa_requesting_app.rb +23 -0
- data/lib/auth0/types/connection_options_auth0.rb +2 -0
- data/lib/auth0/types/connection_options_saml.rb +10 -0
- data/lib/auth0/types/connection_otp_channel_settings.rb +12 -0
- data/lib/auth0/types/connection_otp_settings.rb +12 -0
- data/lib/auth0/types/connection_profile_provisioning.rb +2 -0
- data/lib/auth0/types/connection_profile_provisioning_google_workspace.rb +10 -0
- data/lib/auth0/types/connection_profile_provisioning_google_workspace_sync_users.rb +23 -0
- data/lib/auth0/types/connection_profile_strategy_overrides_provisioning.rb +2 -0
- data/lib/auth0/types/connection_properties_options.rb +2 -0
- data/lib/auth0/types/connection_response_common.rb +6 -6
- data/lib/auth0/types/connection_response_content_ad.rb +2 -2
- data/lib/auth0/types/connection_response_content_adfs.rb +2 -2
- data/lib/auth0/types/connection_response_content_amazon.rb +2 -2
- data/lib/auth0/types/connection_response_content_apple.rb +2 -2
- data/lib/auth0/types/connection_response_content_auth0.rb +2 -2
- data/lib/auth0/types/connection_response_content_auth0oidc.rb +2 -2
- data/lib/auth0/types/connection_response_content_azure_ad.rb +2 -2
- data/lib/auth0/types/connection_response_content_baidu.rb +2 -2
- data/lib/auth0/types/connection_response_content_bitbucket.rb +2 -2
- data/lib/auth0/types/connection_response_content_bitly.rb +2 -2
- data/lib/auth0/types/connection_response_content_box.rb +2 -2
- data/lib/auth0/types/connection_response_content_custom.rb +2 -2
- data/lib/auth0/types/connection_response_content_daccount.rb +2 -2
- data/lib/auth0/types/connection_response_content_dropbox.rb +2 -2
- data/lib/auth0/types/connection_response_content_dwolla.rb +2 -2
- data/lib/auth0/types/connection_response_content_email.rb +2 -2
- data/lib/auth0/types/connection_response_content_evernote.rb +2 -2
- data/lib/auth0/types/connection_response_content_evernote_sandbox.rb +2 -2
- data/lib/auth0/types/connection_response_content_exact.rb +2 -2
- data/lib/auth0/types/connection_response_content_facebook.rb +2 -2
- data/lib/auth0/types/connection_response_content_fitbit.rb +2 -2
- data/lib/auth0/types/connection_response_content_git_hub.rb +2 -2
- data/lib/auth0/types/connection_response_content_google_apps.rb +2 -2
- data/lib/auth0/types/connection_response_content_google_o_auth2.rb +2 -2
- data/lib/auth0/types/connection_response_content_instagram.rb +2 -2
- data/lib/auth0/types/connection_response_content_ip.rb +2 -2
- data/lib/auth0/types/connection_response_content_line.rb +2 -2
- data/lib/auth0/types/connection_response_content_linkedin.rb +2 -2
- data/lib/auth0/types/connection_response_content_o_auth1.rb +2 -2
- data/lib/auth0/types/connection_response_content_o_auth2.rb +2 -2
- data/lib/auth0/types/connection_response_content_office365.rb +2 -2
- data/lib/auth0/types/connection_response_content_oidc.rb +2 -2
- data/lib/auth0/types/connection_response_content_okta.rb +2 -2
- data/lib/auth0/types/connection_response_content_paypal.rb +2 -2
- data/lib/auth0/types/connection_response_content_paypal_sandbox.rb +2 -2
- data/lib/auth0/types/connection_response_content_ping_federate.rb +2 -2
- data/lib/auth0/types/connection_response_content_planning_center.rb +2 -2
- data/lib/auth0/types/connection_response_content_salesforce.rb +2 -2
- data/lib/auth0/types/connection_response_content_salesforce_community.rb +2 -2
- data/lib/auth0/types/connection_response_content_salesforce_sandbox.rb +2 -2
- data/lib/auth0/types/connection_response_content_saml.rb +4 -2
- data/lib/auth0/types/connection_response_content_sharepoint.rb +2 -2
- data/lib/auth0/types/connection_response_content_shop.rb +2 -2
- data/lib/auth0/types/connection_response_content_shopify.rb +2 -2
- data/lib/auth0/types/connection_response_content_sms.rb +2 -2
- data/lib/auth0/types/connection_response_content_soundcloud.rb +2 -2
- data/lib/auth0/types/connection_response_content_thirty_seven_signals.rb +2 -2
- data/lib/auth0/types/connection_response_content_twitter.rb +2 -2
- data/lib/auth0/types/connection_response_content_untappd.rb +2 -2
- data/lib/auth0/types/connection_response_content_vkontakte.rb +2 -2
- data/lib/auth0/types/connection_response_content_weibo.rb +2 -2
- data/lib/auth0/types/connection_response_content_windows_live.rb +2 -2
- data/lib/auth0/types/connection_response_content_wordpress.rb +2 -2
- data/lib/auth0/types/connection_response_content_yahoo.rb +2 -2
- data/lib/auth0/types/connection_response_content_yandex.rb +2 -2
- data/lib/auth0/types/consent_signing_key.rb +15 -0
- data/lib/auth0/types/create_client_response_content.rb +8 -0
- data/lib/auth0/types/create_connection_request_content_saml.rb +2 -0
- data/lib/auth0/types/create_resource_server_response_content.rb +4 -0
- data/lib/auth0/types/create_segment_response_content.rb +2 -0
- data/lib/auth0/types/enabled_features_enum.rb +1 -0
- data/lib/auth0/types/event_stream_cloud_event_connection_created_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_connection_deleted_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_connection_updated_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_context.rb +2 -0
- data/lib/auth0/types/event_stream_cloud_event_context_transaction.rb +30 -0
- data/lib/auth0/types/event_stream_cloud_event_context_transaction_protocol_enum.rb +24 -0
- data/lib/auth0/types/event_stream_cloud_event_context_transaction_response_mode_enum.rb +14 -0
- data/lib/auth0/types/event_stream_cloud_event_context_transaction_response_type_item_enum.rb +13 -0
- data/lib/auth0/types/event_stream_cloud_event_group_created_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_group_deleted_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_group_member_added_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_group_member_deleted_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_group_role_assigned_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_group_role_deleted_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_group_updated_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_object.rb +2 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_object_organization_member_access_level.rb +18 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_object_organization_member_access_level0enum.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_object_organization_member_access_level1enum.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_object_organization_member_access_level2enum.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_object_organization_member_access_level3enum.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_previous_object.rb +2 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_previous_object_organization_member_access_l_1dbe67.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_previous_object_organization_member_access_l_4de563.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_previous_object_organization_member_access_l_7087fd.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_previous_object_organization_member_access_l_a4ce06.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_added_previous_object_organization_member_access_level.rb +18 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_removed_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_object.rb +2 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_object_organization_member_access_level.rb +18 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_object_organization_member_access_level0enum.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_object_organization_member_access_level1enum.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_object_organization_member_access_level2enum.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_object_organization_member_access_level3enum.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_previous_object.rb +2 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_previous_object_organization_member_access_3669df.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_previous_object_organization_member_access_55f897.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_previous_object_organization_member_access_66926d.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_previous_object_organization_member_access_88dadc.rb +11 -0
- data/lib/auth0/types/event_stream_cloud_event_org_connection_updated_previous_object_organization_member_access_level.rb +18 -0
- data/lib/auth0/types/event_stream_cloud_event_org_created_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_deleted_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_group_role_assigned_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_group_role_deleted_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_member_added_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_member_deleted_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_member_role_assigned_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_member_role_deleted_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_org_updated_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_user_created_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_user_deleted_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_user_updated_cloud_event.rb +1 -1
- data/lib/auth0/types/get_brute_force_settings_response_content.rb +2 -0
- data/lib/auth0/types/get_client_response_content.rb +8 -0
- data/lib/auth0/types/get_resource_server_response_content.rb +4 -0
- data/lib/auth0/types/get_segment_response_content.rb +2 -0
- data/lib/auth0/types/get_tenant_settings_response_content.rb +4 -0
- data/lib/auth0/types/guardian_factor_name_enum.rb +1 -0
- data/lib/auth0/types/internal_server_error_body.rb +13 -0
- data/lib/auth0/types/internal_server_error_body_error.rb +11 -0
- data/lib/auth0/types/list_client_profiles_paginated_response_content.rb +12 -0
- data/lib/auth0/types/list_portals_response_content.rb +9 -0
- data/lib/auth0/types/list_user_consent_signing_keys_response_content.rb +9 -0
- data/lib/auth0/types/oauth_scope.rb +8 -0
- data/lib/auth0/types/page_component.rb +33 -0
- data/lib/auth0/types/page_component_auth0form.rb +9 -0
- data/lib/auth0/types/page_component_auth0form_config.rb +11 -0
- data/lib/auth0/types/page_component_auth0media_image.rb +9 -0
- data/lib/auth0/types/page_component_auth0media_image_config.rb +13 -0
- data/lib/auth0/types/page_component_auth0my_account_mfa_management.rb +9 -0
- data/lib/auth0/types/page_component_auth0my_account_mfa_management_config.rb +7 -0
- data/lib/auth0/types/page_component_auth0my_account_passkey_management.rb +9 -0
- data/lib/auth0/types/page_component_auth0my_account_passkey_management_config.rb +7 -0
- data/lib/auth0/types/page_component_auth0my_organization_details_edit.rb +9 -0
- data/lib/auth0/types/page_component_auth0my_organization_details_edit_config.rb +7 -0
- data/lib/auth0/types/page_component_auth0my_organization_domain_table.rb +9 -0
- data/lib/auth0/types/page_component_auth0my_organization_domain_table_config.rb +7 -0
- data/lib/auth0/types/page_component_auth0my_organization_member_management.rb +9 -0
- data/lib/auth0/types/page_component_auth0my_organization_member_management_config.rb +7 -0
- data/lib/auth0/types/page_component_auth0structure_section.rb +9 -0
- data/lib/auth0/types/page_component_auth0structure_section_config.rb +15 -0
- data/lib/auth0/types/page_component_auth0structure_section_variant_enum.rb +12 -0
- data/lib/auth0/types/page_component_auth0structure_separator.rb +9 -0
- data/lib/auth0/types/page_component_auth0structure_separator_config.rb +11 -0
- data/lib/auth0/types/page_component_auth0structure_separator_variant_enum.rb +13 -0
- data/lib/auth0/types/page_component_auth0typography_heading.rb +9 -0
- data/lib/auth0/types/page_component_auth0typography_heading_config.rb +11 -0
- data/lib/auth0/types/page_component_auth0typography_rich_text.rb +9 -0
- data/lib/auth0/types/page_component_auth0typography_rich_text_config.rb +9 -0
- data/lib/auth0/types/page_component_no_children.rb +31 -0
- data/lib/auth0/types/page_slug.rb +23 -0
- data/lib/auth0/types/portal.rb +25 -0
- data/lib/auth0/types/portal_client_secret_post.rb +11 -0
- data/lib/auth0/types/portal_client_secret_post_request.rb +13 -0
- data/lib/auth0/types/portal_client_secret_post_request_token_endpoint_auth_method.rb +11 -0
- data/lib/auth0/types/portal_client_secret_post_token_endpoint_auth_method.rb +11 -0
- data/lib/auth0/types/portal_custom_code.rb +9 -0
- data/lib/auth0/types/portal_custom_code_nullable.rb +23 -0
- data/lib/auth0/types/portal_date_time.rb +23 -0
- data/lib/auth0/types/portal_id.rb +23 -0
- data/lib/auth0/types/portal_name.rb +23 -0
- data/lib/auth0/types/portal_navigation.rb +9 -0
- data/lib/auth0/types/portal_navigation_nullable.rb +23 -0
- data/lib/auth0/types/portal_page.rb +13 -0
- data/lib/auth0/types/portal_pages_by_type.rb +11 -0
- data/lib/auth0/types/portal_pages_by_type_nullable.rb +23 -0
- data/lib/auth0/types/portal_slug.rb +23 -0
- data/lib/auth0/types/portal_summary.rb +17 -0
- data/lib/auth0/types/position.rb +13 -0
- data/lib/auth0/types/preview_cimd_metadata_response_content.rb +2 -0
- data/lib/auth0/types/resource_server.rb +4 -0
- data/lib/auth0/types/resource_server_agent_subject_claims_response_enum.rb +12 -0
- data/lib/auth0/types/resource_server_agent_subject_claims_schema_enum.rb +12 -0
- data/lib/auth0/types/resource_server_search_response.rb +4 -0
- data/lib/auth0/types/resource_server_type_enum.rb +11 -0
- data/lib/auth0/types/role_owner_id.rb +23 -0
- data/lib/auth0/types/role_owner_id_filter.rb +23 -0
- data/lib/auth0/types/rotate_client_secret_response_content.rb +8 -0
- data/lib/auth0/types/search_client_grants_response_content.rb +11 -0
- data/lib/auth0/types/search_clients_response_content.rb +11 -0
- data/lib/auth0/types/search_organization.rb +0 -2
- data/lib/auth0/types/segment.rb +2 -0
- data/lib/auth0/types/segment_status_enum.rb +12 -0
- data/lib/auth0/types/sidebar.rb +9 -0
- data/lib/auth0/types/sidebar_component.rb +19 -0
- data/lib/auth0/types/sidebar_component_auth0external_link.rb +10 -0
- data/lib/auth0/types/sidebar_component_auth0external_link_config.rb +13 -0
- data/lib/auth0/types/sidebar_component_auth0external_link_v2.rb +9 -0
- data/lib/auth0/types/sidebar_component_auth0external_link_v2config.rb +13 -0
- data/lib/auth0/types/sidebar_component_auth0internal_link.rb +10 -0
- data/lib/auth0/types/sidebar_component_auth0internal_link_config.rb +13 -0
- data/lib/auth0/types/sidebar_component_auth0internal_link_v2.rb +9 -0
- data/lib/auth0/types/sidebar_component_auth0internal_link_v2config.rb +13 -0
- data/lib/auth0/types/system_role_owner_id.rb +11 -0
- data/lib/auth0/types/update_brute_force_settings_response_content.rb +2 -0
- data/lib/auth0/types/update_client_response_content.rb +8 -0
- data/lib/auth0/types/update_connection_options.rb +2 -0
- data/lib/auth0/types/update_connection_request_content_saml.rb +2 -0
- data/lib/auth0/types/update_resource_server_response_content.rb +4 -0
- data/lib/auth0/types/update_segment_response_content.rb +2 -0
- data/lib/auth0/types/update_tenant_settings_response_content.rb +4 -0
- data/lib/auth0/types/update_variation_overrides_map.rb +1 -1
- data/lib/auth0/users/client.rb +120 -0
- data/lib/auth0/version.rb +1 -1
- data/lib/auth0.rb +142 -6
- data/wiremock/wiremock-mappings.json +666 -158
- metadata +143 -6
- data/lib/auth0/experimentation/experiments/types/update_experiment_status_request_content.rb +0 -15
- data/lib/auth0/experimentation/feature_flags/types/update_feature_flag_status_request_content.rb +0 -15
- data/lib/auth0/types/update_experiment_status_response_content.rb +0 -45
- data/lib/auth0/types/update_feature_flag_status_response_content.rb +0 -23
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7e787d64726dfd6bfb46857e1e1d68df5c06cf088d71c998da367a0e9487be9f
|
|
4
|
+
data.tar.gz: 59a2130de04ac2c65e6129979de443daae5bd0215c4eb4cafb0650b13bde9095
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed27130d281f1ff2cac53fa12d0eb1bb810b3f07c0ff73d89ef073725af9fbcb5e8796f4fabec90798e4aa23fefb94f96211551d5dc7d64aae8f72b3398d14f3
|
|
7
|
+
data.tar.gz: 184e6c27433b16e4e0fcbba7193ff3a758c0e2aaa5843d98495529394e1105267e369ef2b526b9c2135ab9e05e5778701cd9ab6bd4aab36bed58ab60bec3d470
|
data/.fern/metadata.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cliVersion": "5.
|
|
2
|
+
"cliVersion": "5.166.0",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
4
|
"generatorVersion": "1.24.1",
|
|
5
5
|
"generatorConfig": {
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"offsetSemantics": "page-index",
|
|
11
11
|
"useDefaultRequestParameterValues": true
|
|
12
12
|
},
|
|
13
|
-
"originGitCommit": "
|
|
13
|
+
"originGitCommit": "30874f917fa5eed3526d32a3bfd2ff024d36a4f4",
|
|
14
14
|
"originGitCommitIsDirty": false,
|
|
15
15
|
"invokedBy": "ci",
|
|
16
16
|
"ciProvider": "github",
|
|
17
|
-
"sdkVersion": "6.
|
|
17
|
+
"sdkVersion": "6.5.1"
|
|
18
18
|
}
|
data/.fern/replay.lock
CHANGED
|
@@ -1,58 +1,22 @@
|
|
|
1
1
|
# DO NOT EDIT MANUALLY - Managed by Fern Replay
|
|
2
2
|
version: "1.0"
|
|
3
3
|
generations:
|
|
4
|
-
- commit_sha:
|
|
5
|
-
tree_hash:
|
|
6
|
-
timestamp: 2026-
|
|
4
|
+
- commit_sha: 1af018d42213a5a5a4a5857b8ee326c968405184
|
|
5
|
+
tree_hash: 26cc3589bfbfef3bd26972743969ea67451c2a23
|
|
6
|
+
timestamp: 2026-10-27T11:22:31.372Z
|
|
7
7
|
cli_version: unknown
|
|
8
8
|
generator_versions: {}
|
|
9
|
-
- commit_sha:
|
|
10
|
-
tree_hash:
|
|
11
|
-
timestamp: 2026-
|
|
12
|
-
cli_version: unknown
|
|
13
|
-
generator_versions:
|
|
14
|
-
fernapi/fern-ruby-sdk: 1.13.1
|
|
15
|
-
- commit_sha: 428032101d1791fe97573af36427e664fe4e1e88
|
|
16
|
-
tree_hash: 231d5c443ba4120855bd439d858060fc178043cd
|
|
17
|
-
timestamp: 2026-07-15T09:11:13.405Z
|
|
18
|
-
cli_version: unknown
|
|
19
|
-
generator_versions:
|
|
20
|
-
fernapi/fern-ruby-sdk: 1.13.1
|
|
21
|
-
- commit_sha: d8a88028849ce519e8fdc20765c78e367f372110
|
|
22
|
-
tree_hash: 3e4eff170915344776a2c1e921a378a13c54afd1
|
|
23
|
-
timestamp: 2026-07-21T07:06:12.329Z
|
|
24
|
-
cli_version: unknown
|
|
25
|
-
generator_versions:
|
|
26
|
-
fernapi/fern-ruby-sdk: 1.17.8
|
|
27
|
-
- commit_sha: ff82f16a518e8ee51b23570ed1a303f3c070ff02
|
|
28
|
-
tree_hash: 6b4ba82c8dbe3556b6c8e7dd4f7c4d32671aa12a
|
|
29
|
-
timestamp: 2026-08-04T06:22:44.311Z
|
|
30
|
-
cli_version: unknown
|
|
31
|
-
generator_versions:
|
|
32
|
-
fernapi/fern-ruby-sdk: 1.17.8
|
|
33
|
-
- commit_sha: 1cfe82c679b6122773317ebd41bff24b09388b3d
|
|
34
|
-
tree_hash: a7034ef350a9bfaa17781b64316723f688b91e18
|
|
35
|
-
timestamp: 2026-08-19T06:07:50.024Z
|
|
36
|
-
cli_version: unknown
|
|
37
|
-
generator_versions:
|
|
38
|
-
fernapi/fern-ruby-sdk: 1.17.8
|
|
39
|
-
- commit_sha: 78116dc530cd08317c9323863f3127c2fdec29ee
|
|
40
|
-
tree_hash: d0d935e417bf22e33c1c1eb9c6c43371d35907c0
|
|
41
|
-
timestamp: 2026-09-02T09:27:17.154Z
|
|
42
|
-
cli_version: unknown
|
|
43
|
-
generator_versions:
|
|
44
|
-
fernapi/fern-ruby-sdk: 1.17.8
|
|
45
|
-
- commit_sha: 83074ed870797568e512cc7f0fb71dc679cdd7f4
|
|
46
|
-
tree_hash: cbc5c6ccd2dfd5be3b5d68f7bc45a51e62fa6704
|
|
47
|
-
timestamp: 2026-09-15T12:33:08.051Z
|
|
9
|
+
- commit_sha: 1f0cde99ca7fdddcfc5635a1f41bf51a7efe863c
|
|
10
|
+
tree_hash: 781e4e5affb287da31d3713a3f16811228a7ada7
|
|
11
|
+
timestamp: 2026-10-27T11:30:28.609Z
|
|
48
12
|
cli_version: unknown
|
|
49
13
|
generator_versions:
|
|
50
14
|
fernapi/fern-ruby-sdk: 1.24.1
|
|
51
|
-
- commit_sha:
|
|
52
|
-
tree_hash:
|
|
53
|
-
timestamp: 2026-
|
|
15
|
+
- commit_sha: c4b1c95e4e0668d2c42aaa0a4c5c5ab1e8a642f8
|
|
16
|
+
tree_hash: d37708b9770790ac5501ab5c8a3a038868cd45d1
|
|
17
|
+
timestamp: 2026-11-04T03:49:40.588Z
|
|
54
18
|
cli_version: unknown
|
|
55
19
|
generator_versions:
|
|
56
20
|
fernapi/fern-ruby-sdk: 1.24.1
|
|
57
|
-
current_generation:
|
|
21
|
+
current_generation: c4b1c95e4e0668d2c42aaa0a4c5c5ab1e8a642f8
|
|
58
22
|
patches: []
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v6.
|
|
1
|
+
v6.6.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [v6.6.0](https://github.com/auth0/ruby-auth0/tree/v6.6.0) (2026-11-04)
|
|
4
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.5.0...v6.6.0)
|
|
5
|
+
|
|
6
|
+
**Added**
|
|
7
|
+
- feat!: add Portals, Client agent_id and agent subject claims, and wrap Consent Signing Keys list response [\#824](https://github.com/auth0/ruby-auth0/pull/824) ([fern-api[bot]](https://github.com/apps/fern-api))
|
|
8
|
+
- feat: add Consent Signing Keys, OTP Settings, Resource Server type and Management tenant_domain, and remove Captcha Policies [\#821](https://github.com/auth0/ruby-auth0/pull/821) ([fern-api[bot]](https://github.com/apps/fern-api))
|
|
9
|
+
- feat: expose Management API rate limit info via a client callback [\#774](https://github.com/auth0/ruby-auth0/pull/774) ([ProdigyTom](https://github.com/ProdigyTom))
|
|
10
|
+
|
|
11
|
+
## [v6.5.0](https://github.com/auth0/ruby-auth0/tree/v6.5.0) (2026-10-14)
|
|
12
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.4.0...v6.5.0)
|
|
13
|
+
|
|
14
|
+
**Added**
|
|
15
|
+
- feat: add Client Profiles, Captcha Policies, and client and client grant search, and remove update_status from experiments and feature flags [\#812](https://github.com/auth0/ruby-auth0/pull/812) ([fern-api[bot]](https://github.com/apps/fern-api))
|
|
16
|
+
|
|
17
|
+
**Fixed**
|
|
18
|
+
- fix: preserve false values in model fields [\#811](https://github.com/auth0/ruby-auth0/pull/811) ([kishore7snehil](https://github.com/kishore7snehil))
|
|
19
|
+
|
|
3
20
|
## [v6.4.0](https://github.com/auth0/ruby-auth0/tree/v6.4.0) (2026-09-30)
|
|
4
21
|
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.3.0...v6.4.0)
|
|
5
22
|
|
data/EXAMPLES.md
CHANGED
|
@@ -166,6 +166,26 @@ management.roles.create(name: 'admin', description: 'Administrator')
|
|
|
166
166
|
management.organizations.list(take: 20)
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
+
## Rate Limit Monitoring
|
|
170
|
+
|
|
171
|
+
Pass a `rate_limit_handler` when building an `Auth0::Client` to observe Auth0's `x-ratelimit-*` headers, without changing the return value of your calls. It covers Management API calls and the Authentication API calls made through the client's HTTP layer (it is not available on `Auth0::Management` directly):
|
|
172
|
+
|
|
173
|
+
```ruby
|
|
174
|
+
client = Auth0::Client.new(
|
|
175
|
+
domain: ENV['AUTH0_RUBY_DOMAIN'],
|
|
176
|
+
client_id: ENV['AUTH0_RUBY_CLIENT_ID'],
|
|
177
|
+
client_secret: ENV['AUTH0_RUBY_CLIENT_SECRET'],
|
|
178
|
+
rate_limit_handler: lambda do |rate_limit|
|
|
179
|
+
# rate_limit.limit / rate_limit.remaining (Integers), rate_limit.reset (UTC Time)
|
|
180
|
+
Rails.logger.info("Auth0 rate limit: #{rate_limit.remaining}/#{rate_limit.limit}, resets at #{rate_limit.reset}")
|
|
181
|
+
end
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
client.users.get(id: 'auth0|123456') # handler fires with this response's rate limit
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The handler is invoked on every response, including the `429`s that trigger an automatic retry. An error raised inside the handler is caught (and warned) so it never breaks the request.
|
|
188
|
+
|
|
169
189
|
## Organizations
|
|
170
190
|
|
|
171
191
|
[Organizations](https://auth0.com/docs/organizations) is a set of features that provide better support for developers who build and maintain SaaS and Business-to-Business (B2B) applications.
|
data/README.md
CHANGED
|
@@ -104,6 +104,7 @@ client = Auth0::Client.new(
|
|
|
104
104
|
| `management_timeout` | Float | Timeout in seconds for Management API calls. | `60` |
|
|
105
105
|
| `management_max_retries` | Integer | Maximum retries for Management API calls. | `2` |
|
|
106
106
|
| `management_additional_headers` | Hash | Additional HTTP headers for Management API calls. | `nil` |
|
|
107
|
+
| `rate_limit_handler` | `#call` | Callback for [rate-limit monitoring](#rate-limit-monitoring). | `nil` |
|
|
107
108
|
|
|
108
109
|
#### Accessing the Management Client Directly
|
|
109
110
|
|
|
@@ -283,6 +284,23 @@ client.users.list(
|
|
|
283
284
|
)
|
|
284
285
|
```
|
|
285
286
|
|
|
287
|
+
### Rate Limit Monitoring
|
|
288
|
+
|
|
289
|
+
Auth0 returns `x-ratelimit-limit`, `x-ratelimit-remaining`, and `x-ratelimit-reset` headers on API responses. Pass a `rate_limit_handler` when building an `Auth0::Client` to be notified of this data, so you can monitor how close you are to the limit (for example, emit a metric and alert before you run out). It covers Management API calls and the Authentication API calls made through the client's HTTP layer (the JWKS fetch used by `validate_id_token` goes through a separate object and is not reported). It is not available on `Auth0::Management` directly.
|
|
290
|
+
|
|
291
|
+
```ruby
|
|
292
|
+
client = Auth0::Client.new(
|
|
293
|
+
domain: ENV['AUTH0_RUBY_DOMAIN'],
|
|
294
|
+
client_id: ENV['AUTH0_RUBY_CLIENT_ID'],
|
|
295
|
+
client_secret: ENV['AUTH0_RUBY_CLIENT_SECRET'],
|
|
296
|
+
rate_limit_handler: lambda do |rate_limit|
|
|
297
|
+
StatsD.gauge('auth0.rate_limit.remaining', rate_limit.remaining) if rate_limit.remaining
|
|
298
|
+
end
|
|
299
|
+
)
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
The handler receives an object with `#limit`, `#remaining` (Integers), and `#reset` (a UTC `Time`). Each is `nil` when the corresponding header is absent or non-numeric. It is invoked on every response, including the `429`s that trigger an automatic retry, so you can observe the point at which the limit was reached. The return value of your API call is unchanged, and an exception raised inside the handler is caught (and warned) so it can never break a request.
|
|
303
|
+
|
|
286
304
|
### Errors
|
|
287
305
|
|
|
288
306
|
Management API errors use the `Auth0::Errors` namespace:
|
|
@@ -13,6 +13,8 @@ module Auth0
|
|
|
13
13
|
|
|
14
14
|
field :mode, -> { Auth0::Types::BruteForceProtectionModeEnum }, optional: true, nullable: false
|
|
15
15
|
|
|
16
|
+
field :form_submission_mode, -> { Auth0::Types::BruteForceProtectionFormSubmissionModeEnum }, optional: true, nullable: false
|
|
17
|
+
|
|
16
18
|
field :max_attempts, -> { Integer }, optional: true, nullable: false
|
|
17
19
|
end
|
|
18
20
|
end
|
data/lib/auth0/auth_client.rb
CHANGED
|
@@ -85,14 +85,39 @@ module Auth0
|
|
|
85
85
|
def management
|
|
86
86
|
current_token = get_token
|
|
87
87
|
if @_management.nil? || @_management_token != current_token
|
|
88
|
-
@_management_token = current_token
|
|
89
88
|
opts = { token: current_token, base_url: "#{@base_uri}/api/v2" }
|
|
90
89
|
opts[:timeout] = @management_timeout if @management_timeout
|
|
91
90
|
opts[:max_retries] = @management_max_retries if @management_max_retries
|
|
92
91
|
opts[:headers] = @management_additional_headers if @management_additional_headers
|
|
93
|
-
|
|
92
|
+
management = Auth0::Management.new(**opts)
|
|
93
|
+
# Attach before caching so a failed attach doesn't leave a handler-less
|
|
94
|
+
# management cached (the next call would then skip the rebuild).
|
|
95
|
+
attach_rate_limit_handler(management)
|
|
96
|
+
@_management = management
|
|
97
|
+
@_management_token = current_token
|
|
94
98
|
end
|
|
95
99
|
@_management
|
|
96
100
|
end
|
|
101
|
+
|
|
102
|
+
private
|
|
103
|
+
|
|
104
|
+
# Attaches the configured rate limit handler to the management client's raw
|
|
105
|
+
# client. Fails loudly rather than silently skipping, so a future change to
|
|
106
|
+
# the generated client's internals surfaces instead of quietly disabling it.
|
|
107
|
+
# @param management [Auth0::Management]
|
|
108
|
+
# @return [void]
|
|
109
|
+
# @raise [Auth0::Exception] if the management client exposes no compatible raw client
|
|
110
|
+
def attach_rate_limit_handler(management)
|
|
111
|
+
return if @rate_limit_handler.nil?
|
|
112
|
+
|
|
113
|
+
raw_client = management.instance_variable_get(:@raw_client)
|
|
114
|
+
unless raw_client.respond_to?(:rate_limit_handler=)
|
|
115
|
+
raise Auth0::Exception,
|
|
116
|
+
"Unable to attach rate_limit_handler: the management client does not expose a compatible raw client. " \
|
|
117
|
+
"This likely means the ruby-auth0 internals changed. Please report it."
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
raw_client.rate_limit_handler = @rate_limit_handler
|
|
121
|
+
end
|
|
97
122
|
end
|
|
98
123
|
end
|
data/lib/auth0/client.rb
CHANGED
|
@@ -4,12 +4,20 @@ module Auth0
|
|
|
4
4
|
class Management
|
|
5
5
|
# @param token [String]
|
|
6
6
|
# @param base_url [String, nil]
|
|
7
|
+
# @param tenant_domain [String, nil] Tenant domain, such as "example.auth0.com", used to build the base URL.
|
|
7
8
|
# @param timeout [Float, nil] Request timeout in seconds.
|
|
8
|
-
# @param max_retries [Integer
|
|
9
|
+
# @param max_retries [Integer] Maximum number of request retries, defaults to 2.
|
|
9
10
|
# @param headers [Hash, nil] Additional headers to include in requests.
|
|
10
11
|
#
|
|
11
12
|
# @return [void]
|
|
12
|
-
def initialize(token:, base_url: nil, timeout: nil, max_retries:
|
|
13
|
+
def initialize(token:, base_url: nil, tenant_domain: nil, timeout: nil, max_retries: 2, headers: nil)
|
|
14
|
+
unless tenant_domain.nil?
|
|
15
|
+
environment_url_templates = {
|
|
16
|
+
Auth0::Environment::DEFAULT => "https://#{tenant_domain}/api/v2"
|
|
17
|
+
}
|
|
18
|
+
base_url = base_url.nil? ? "https://#{tenant_domain}/api/v2" : environment_url_templates.fetch(base_url, base_url)
|
|
19
|
+
end
|
|
20
|
+
|
|
13
21
|
raw_client_opts = {
|
|
14
22
|
base_url: base_url || Auth0::Environment::DEFAULT,
|
|
15
23
|
headers: {
|
|
@@ -43,6 +51,11 @@ module Auth0
|
|
|
43
51
|
@client_grants ||= Auth0::ClientGrants::Client.new(client: @raw_client)
|
|
44
52
|
end
|
|
45
53
|
|
|
54
|
+
# @return [Auth0::ClientProfiles::Client]
|
|
55
|
+
def client_profiles
|
|
56
|
+
@client_profiles ||= Auth0::ClientProfiles::Client.new(client: @raw_client)
|
|
57
|
+
end
|
|
58
|
+
|
|
46
59
|
# @return [Auth0::Clients::Client]
|
|
47
60
|
def clients
|
|
48
61
|
@clients ||= Auth0::Clients::Client.new(client: @raw_client)
|
|
@@ -138,6 +151,11 @@ module Auth0
|
|
|
138
151
|
@organizations ||= Auth0::Organizations::Client.new(client: @raw_client)
|
|
139
152
|
end
|
|
140
153
|
|
|
154
|
+
# @return [Auth0::Portals::Client]
|
|
155
|
+
def portals
|
|
156
|
+
@portals ||= Auth0::Portals::Client.new(client: @raw_client)
|
|
157
|
+
end
|
|
158
|
+
|
|
141
159
|
# @return [Auth0::Prompts::Client]
|
|
142
160
|
def prompts
|
|
143
161
|
@prompts ||= Auth0::Prompts::Client.new(client: @raw_client)
|
|
@@ -122,6 +122,78 @@ module Auth0
|
|
|
122
122
|
end
|
|
123
123
|
end
|
|
124
124
|
|
|
125
|
+
# Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the
|
|
126
|
+
# parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative
|
|
127
|
+
# to the standard GET /client-grants endpoint with better performance for complex queries.
|
|
128
|
+
# Results may not reflect recent updates immediately.
|
|
129
|
+
#
|
|
130
|
+
# @param request_options [Hash]
|
|
131
|
+
# @param params [Hash]
|
|
132
|
+
# @option request_options [String] :base_url
|
|
133
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
134
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
135
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
136
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
137
|
+
# @option params [String, nil] :q
|
|
138
|
+
# @option params [Auth0::Types::SearchParserEnum, nil] :parser
|
|
139
|
+
# @option params [String, nil] :fields
|
|
140
|
+
# @option params [Boolean, nil] :include_fields
|
|
141
|
+
# @option params [Integer, nil] :take
|
|
142
|
+
# @option params [String, nil] :from
|
|
143
|
+
# @option params [Auth0::Types::ClientGrantSortFieldEnum, nil] :sort
|
|
144
|
+
#
|
|
145
|
+
# @example
|
|
146
|
+
# client.client_grants.search(
|
|
147
|
+
# q: "q",
|
|
148
|
+
# parser: "scim",
|
|
149
|
+
# fields: "fields",
|
|
150
|
+
# include_fields: true,
|
|
151
|
+
# take: 1,
|
|
152
|
+
# from: "from",
|
|
153
|
+
# sort: "audience"
|
|
154
|
+
# )
|
|
155
|
+
#
|
|
156
|
+
# @return [Auth0::Types::SearchClientGrantsResponseContent]
|
|
157
|
+
def search(request_options: {}, **params)
|
|
158
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
159
|
+
query_params = {}
|
|
160
|
+
query_params["q"] = params[:q] if params.key?(:q)
|
|
161
|
+
query_params["parser"] = params[:parser] if params.key?(:parser)
|
|
162
|
+
query_params["fields"] = params[:fields] if params.key?(:fields)
|
|
163
|
+
query_params["include_fields"] = params[:include_fields] if params.key?(:include_fields)
|
|
164
|
+
query_params["take"] = params.fetch(:take, 50)
|
|
165
|
+
query_params["from"] = params[:from] if params.key?(:from)
|
|
166
|
+
query_params["sort"] = params[:sort] if params.key?(:sort)
|
|
167
|
+
|
|
168
|
+
Auth0::Internal::CursorItemIterator.new(
|
|
169
|
+
cursor_field: :next_,
|
|
170
|
+
item_field: :client_grants,
|
|
171
|
+
initial_cursor: query_params["from"]
|
|
172
|
+
) do |next_cursor|
|
|
173
|
+
query_params["from"] = next_cursor
|
|
174
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
175
|
+
base_url: request_options[:base_url],
|
|
176
|
+
method: "GET",
|
|
177
|
+
path: "client-grants/search",
|
|
178
|
+
query: query_params,
|
|
179
|
+
request_options: request_options
|
|
180
|
+
)
|
|
181
|
+
begin
|
|
182
|
+
response = @client.send(request)
|
|
183
|
+
rescue Net::HTTPRequestTimeout
|
|
184
|
+
raise Auth0::Errors::TimeoutError
|
|
185
|
+
end
|
|
186
|
+
code = response.code.to_i
|
|
187
|
+
if code.between?(200, 299)
|
|
188
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::SearchClientGrantsResponseContent.load(response.body))
|
|
189
|
+
[parsed_response, response]
|
|
190
|
+
else
|
|
191
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
192
|
+
raise error_class.new(response.body, code: code)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
|
|
125
197
|
# Retrieve a single [client
|
|
126
198
|
# grant](https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants), including the
|
|
127
199
|
# scopes associated with the application/API pair.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module ClientGrants
|
|
5
|
+
module Types
|
|
6
|
+
class SearchClientGrantsRequestParameters < Internal::Types::Model
|
|
7
|
+
field :q, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :parser, -> { Auth0::Types::SearchParserEnum }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :fields, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :include_fields, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :take, -> { Integer }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :from, -> { String }, optional: true, nullable: false
|
|
18
|
+
|
|
19
|
+
field :sort, -> { Auth0::Types::ClientGrantSortFieldEnum }, optional: true, nullable: false
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module ClientProfiles
|
|
5
|
+
class Client
|
|
6
|
+
# @param client [Auth0::Internal::Http::RawClient]
|
|
7
|
+
#
|
|
8
|
+
# @return [void]
|
|
9
|
+
def initialize(client:)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the
|
|
14
|
+
# <code>next</code> cursor from a previous response as the <code>from</code> query parameter to retrieve the
|
|
15
|
+
# following page.
|
|
16
|
+
#
|
|
17
|
+
# @param request_options [Hash]
|
|
18
|
+
# @param params [Hash]
|
|
19
|
+
# @option request_options [String] :base_url
|
|
20
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
21
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
22
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
23
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
24
|
+
# @option params [String, nil] :from
|
|
25
|
+
# @option params [Integer, nil] :take
|
|
26
|
+
#
|
|
27
|
+
# @example
|
|
28
|
+
# client.client_profiles.list(
|
|
29
|
+
# from: "from",
|
|
30
|
+
# take: 1
|
|
31
|
+
# )
|
|
32
|
+
#
|
|
33
|
+
# @return [Auth0::Types::ListClientProfilesPaginatedResponseContent]
|
|
34
|
+
def list(request_options: {}, **params)
|
|
35
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
36
|
+
query_params = {}
|
|
37
|
+
query_params["from"] = params[:from] if params.key?(:from)
|
|
38
|
+
query_params["take"] = params.fetch(:take, 50)
|
|
39
|
+
|
|
40
|
+
Auth0::Internal::CursorItemIterator.new(
|
|
41
|
+
cursor_field: :next_,
|
|
42
|
+
item_field: :client_profiles,
|
|
43
|
+
initial_cursor: query_params["from"]
|
|
44
|
+
) do |next_cursor|
|
|
45
|
+
query_params["from"] = next_cursor
|
|
46
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
47
|
+
base_url: request_options[:base_url],
|
|
48
|
+
method: "GET",
|
|
49
|
+
path: "client-profiles",
|
|
50
|
+
query: query_params,
|
|
51
|
+
request_options: request_options
|
|
52
|
+
)
|
|
53
|
+
begin
|
|
54
|
+
response = @client.send(request)
|
|
55
|
+
rescue Net::HTTPRequestTimeout
|
|
56
|
+
raise Auth0::Errors::TimeoutError
|
|
57
|
+
end
|
|
58
|
+
code = response.code.to_i
|
|
59
|
+
if code.between?(200, 299)
|
|
60
|
+
parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListClientProfilesPaginatedResponseContent.load(response.body))
|
|
61
|
+
[parsed_response, response]
|
|
62
|
+
else
|
|
63
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
64
|
+
raise error_class.new(response.body, code: code)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a
|
|
70
|
+
# second returns <code>409 Conflict</code>. The profile governs Dynamic CIMD clients matched by its
|
|
71
|
+
# <code>apply_policy</code> at runtime.
|
|
72
|
+
#
|
|
73
|
+
# @param request_options [Hash]
|
|
74
|
+
# @param params [Auth0::ClientProfiles::Types::CreateClientProfileRequestContent]
|
|
75
|
+
# @option request_options [String] :base_url
|
|
76
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
77
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
78
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
79
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
80
|
+
#
|
|
81
|
+
# @example
|
|
82
|
+
# client.client_profiles.create(
|
|
83
|
+
# name: "name",
|
|
84
|
+
# client_configuration: {},
|
|
85
|
+
# apply_policy: {
|
|
86
|
+
# external_metadata_type: "cimd",
|
|
87
|
+
# external_metadata_created_by: "client"
|
|
88
|
+
# }
|
|
89
|
+
# )
|
|
90
|
+
#
|
|
91
|
+
# @return [Auth0::Types::ClientProfile]
|
|
92
|
+
def create(request_options: {}, **params)
|
|
93
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
94
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
95
|
+
base_url: request_options[:base_url],
|
|
96
|
+
method: "POST",
|
|
97
|
+
path: "client-profiles",
|
|
98
|
+
body: Auth0::ClientProfiles::Types::CreateClientProfileRequestContent.new(params).to_h,
|
|
99
|
+
request_options: request_options
|
|
100
|
+
)
|
|
101
|
+
begin
|
|
102
|
+
response = @client.send(request)
|
|
103
|
+
rescue Net::HTTPRequestTimeout
|
|
104
|
+
raise Auth0::Errors::TimeoutError
|
|
105
|
+
end
|
|
106
|
+
code = response.code.to_i
|
|
107
|
+
if code.between?(200, 299)
|
|
108
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::ClientProfile.load(response.body))
|
|
109
|
+
else
|
|
110
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
111
|
+
raise error_class.new(response.body, code: code)
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Retrieve a single client profile by its identifier. Returns <code>404</code> if no profile with the given ID
|
|
116
|
+
# exists for the tenant.
|
|
117
|
+
#
|
|
118
|
+
# @param request_options [Hash]
|
|
119
|
+
# @param params [Hash]
|
|
120
|
+
# @option request_options [String] :base_url
|
|
121
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
122
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
123
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
124
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
125
|
+
# @option params [Auth0::Types::ClientProfileID] :id
|
|
126
|
+
#
|
|
127
|
+
# @example
|
|
128
|
+
# client.client_profiles.get(id: "id")
|
|
129
|
+
#
|
|
130
|
+
# @return [Auth0::Types::ClientProfile]
|
|
131
|
+
def get(request_options: {}, **params)
|
|
132
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
133
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
134
|
+
base_url: request_options[:base_url],
|
|
135
|
+
method: "GET",
|
|
136
|
+
path: "client-profiles/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
137
|
+
request_options: request_options
|
|
138
|
+
)
|
|
139
|
+
begin
|
|
140
|
+
response = @client.send(request)
|
|
141
|
+
rescue Net::HTTPRequestTimeout
|
|
142
|
+
raise Auth0::Errors::TimeoutError
|
|
143
|
+
end
|
|
144
|
+
code = response.code.to_i
|
|
145
|
+
if code.between?(200, 299)
|
|
146
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::ClientProfile.load(response.body))
|
|
147
|
+
else
|
|
148
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
149
|
+
raise error_class.new(response.body, code: code)
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Delete a client profile. Idempotent: returns <code>204 No Content</code> whether or not a profile with the given
|
|
154
|
+
# ID existed. Deleting the profile removes fleet governance for matched clients immediately.
|
|
155
|
+
#
|
|
156
|
+
# @param request_options [Hash]
|
|
157
|
+
# @param params [Hash]
|
|
158
|
+
# @option request_options [String] :base_url
|
|
159
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
160
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
161
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
162
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
163
|
+
# @option params [Auth0::Types::ClientProfileID] :id
|
|
164
|
+
#
|
|
165
|
+
# @example
|
|
166
|
+
# client.client_profiles.delete(id: "id")
|
|
167
|
+
#
|
|
168
|
+
# @return [untyped]
|
|
169
|
+
def delete(request_options: {}, **params)
|
|
170
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
171
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
172
|
+
base_url: request_options[:base_url],
|
|
173
|
+
method: "DELETE",
|
|
174
|
+
path: "client-profiles/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
175
|
+
request_options: request_options
|
|
176
|
+
)
|
|
177
|
+
begin
|
|
178
|
+
response = @client.send(request)
|
|
179
|
+
rescue Net::HTTPRequestTimeout
|
|
180
|
+
raise Auth0::Errors::TimeoutError
|
|
181
|
+
end
|
|
182
|
+
code = response.code.to_i
|
|
183
|
+
return if code.between?(200, 299)
|
|
184
|
+
|
|
185
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
186
|
+
raise error_class.new(response.body, code: code)
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields
|
|
190
|
+
# remain unchanged. Nested objects such as <code>client_configuration</code> must be supplied in full.
|
|
191
|
+
#
|
|
192
|
+
# @param request_options [Hash]
|
|
193
|
+
# @param params [Auth0::ClientProfiles::Types::UpdateClientProfileRequestContent]
|
|
194
|
+
# @option request_options [String] :base_url
|
|
195
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
196
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
197
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
198
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
199
|
+
# @option params [Auth0::Types::ClientProfileID] :id
|
|
200
|
+
#
|
|
201
|
+
# @example
|
|
202
|
+
# client.client_profiles.update(id: "id")
|
|
203
|
+
#
|
|
204
|
+
# @return [Auth0::Types::ClientProfile]
|
|
205
|
+
def update(request_options: {}, **params)
|
|
206
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
207
|
+
request_data = Auth0::ClientProfiles::Types::UpdateClientProfileRequestContent.new(params).to_h
|
|
208
|
+
non_body_param_names = %w[id]
|
|
209
|
+
body = request_data.except(*non_body_param_names)
|
|
210
|
+
|
|
211
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
212
|
+
base_url: request_options[:base_url],
|
|
213
|
+
method: "PATCH",
|
|
214
|
+
path: "client-profiles/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
215
|
+
body: body,
|
|
216
|
+
request_options: request_options
|
|
217
|
+
)
|
|
218
|
+
begin
|
|
219
|
+
response = @client.send(request)
|
|
220
|
+
rescue Net::HTTPRequestTimeout
|
|
221
|
+
raise Auth0::Errors::TimeoutError
|
|
222
|
+
end
|
|
223
|
+
code = response.code.to_i
|
|
224
|
+
if code.between?(200, 299)
|
|
225
|
+
(response.body.to_s.empty? ? nil : Auth0::Types::ClientProfile.load(response.body))
|
|
226
|
+
else
|
|
227
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
228
|
+
raise error_class.new(response.body, code: code)
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module ClientProfiles
|
|
5
|
+
module Types
|
|
6
|
+
class CreateClientProfileRequestContent < Internal::Types::Model
|
|
7
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :client_configuration, -> { Auth0::Types::ClientProfileClientConfiguration }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :apply_policy, -> { Auth0::Types::ClientProfileApplyPolicy }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module ClientProfiles
|
|
5
|
+
module Types
|
|
6
|
+
class ListClientProfilesRequestParameters < Internal::Types::Model
|
|
7
|
+
field :from, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :take, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|