auth0 6.5.0 → 6.7.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 +362 -48
- data/.version +1 -1
- data/CHANGELOG.md +15 -0
- data/EXAMPLES.md +20 -0
- data/README.md +18 -0
- data/examples/ruby-api/Gemfile.lock +3 -3
- data/lib/auth0/attack_protection/brute_force_protection/types/update_brute_force_settings_request_content.rb +2 -2
- data/lib/auth0/attack_protection/client.rb +0 -5
- data/lib/auth0/auth_client.rb +27 -2
- data/lib/auth0/client.rb +15 -2
- data/lib/auth0/clients/client.rb +3 -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/update_client_request_content.rb +4 -0
- data/lib/auth0/connections/keys/client.rb +19 -5
- data/lib/auth0/emails/provider/client.rb +1 -6
- data/lib/auth0/emails/provider/types/create_email_provider_request_content.rb +1 -1
- data/lib/auth0/experimentation/experiments/client.rb +2 -1
- data/lib/auth0/experimentation/experiments/types/create_experiment_request_content.rb +1 -1
- 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/internal/http/rate_limit.rb +103 -0
- data/lib/auth0/internal/http/raw_client.rb +14 -2
- 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/self_service_profiles/sso_ticket/types/create_self_service_profile_sso_ticket_request_content.rb +2 -0
- data/lib/auth0/types/client.rb +6 -0
- data/lib/auth0/types/client_credential_algorithm_enum.rb +2 -0
- data/lib/auth0/types/client_oidc_support.rb +15 -0
- data/lib/auth0/types/client_oidc_support_patch.rb +2 -1
- data/lib/auth0/types/client_oidc_support_post.rb +2 -2
- data/lib/auth0/types/client_profile_client_configuration.rb +2 -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 +15 -0
- data/lib/auth0/types/client_search_response.rb +6 -0
- data/lib/auth0/types/{list_attack_protection_captcha_policies_response_content.rb → connection_client_id_samlxaa_requesting_app.rb} +2 -2
- 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_passkey_authentication_method.rb +2 -0
- data/lib/auth0/types/connection_password_options_dictionary.rb +2 -0
- data/lib/auth0/types/connection_properties_options.rb +6 -0
- data/lib/auth0/types/connection_response_content_saml.rb +2 -0
- data/lib/auth0/types/consent_signing_key.rb +15 -0
- data/lib/auth0/types/create_client_response_content.rb +6 -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/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/express_configuration.rb +2 -0
- data/lib/auth0/types/express_configuration_or_null.rb +2 -0
- data/lib/auth0/types/get_brute_force_settings_response_content.rb +2 -2
- data/lib/auth0/types/get_client_response_content.rb +6 -0
- data/lib/auth0/types/get_resource_server_response_content.rb +4 -0
- data/lib/auth0/types/google_account_linking_configuration.rb +10 -0
- data/lib/auth0/types/google_account_linking_configuration_create.rb +10 -0
- data/lib/auth0/types/google_account_linking_configuration_or_null.rb +10 -0
- data/lib/auth0/types/guardian_factor_name_enum.rb +1 -0
- data/lib/auth0/types/include_user_profile_size_header_enum.rb +11 -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_portals_response_content.rb +9 -0
- data/lib/auth0/types/list_user_consent_signing_keys_response_content.rb +9 -0
- data/lib/auth0/types/log_stream_filter_group_name_enum.rb +3 -0
- data/lib/auth0/types/oauth_scope.rb +4 -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/password_dictionary_match_type_enum.rb +12 -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/post_connection_keys_request_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 +12 -0
- data/lib/auth0/types/rotate_client_secret_response_content.rb +6 -0
- data/lib/auth0/types/rotate_connection_keys_request_content.rb +2 -0
- data/lib/auth0/types/screen_group_name_enum.rb +1 -0
- data/lib/auth0/types/self_service_profile_sso_ticket_universal_logout_config.rb +10 -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/tenant_settings_flags.rb +0 -2
- data/lib/auth0/types/update_brute_force_settings_response_content.rb +2 -2
- data/lib/auth0/types/update_client_response_content.rb +6 -0
- data/lib/auth0/types/update_connection_options.rb +6 -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_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 +86 -23
- data/wiremock/wiremock-mappings.json +310 -190
- metadata +87 -23
- data/lib/auth0/attack_protection/captcha_policies/client.rb +0 -210
- data/lib/auth0/attack_protection/captcha_policies/types/create_attack_protection_captcha_policy_request_content.rb +0 -21
- data/lib/auth0/attack_protection/captcha_policies/types/update_attack_protection_captcha_policy_request_content.rb +0 -23
- data/lib/auth0/types/attack_protection_captcha_policy.rb +0 -24
- data/lib/auth0/types/attack_protection_captcha_policy_action.rb +0 -24
- data/lib/auth0/types/attack_protection_captcha_policy_action_input.rb +0 -24
- data/lib/auth0/types/attack_protection_captcha_policy_match.rb +0 -12
- data/lib/auth0/types/captcha_active_provider_enum.rb +0 -17
- data/lib/auth0/types/captcha_policy_action_arkose.rb +0 -16
- data/lib/auth0/types/captcha_policy_action_arkose_input.rb +0 -18
- data/lib/auth0/types/captcha_policy_action_auth_challenge.rb +0 -10
- data/lib/auth0/types/captcha_policy_action_friendly_captcha.rb +0 -10
- data/lib/auth0/types/captcha_policy_action_friendly_captcha_input.rb +0 -12
- data/lib/auth0/types/captcha_policy_action_hcaptcha.rb +0 -10
- data/lib/auth0/types/captcha_policy_action_hcaptcha_input.rb +0 -12
- data/lib/auth0/types/captcha_policy_action_recaptcha_enterprise.rb +0 -12
- data/lib/auth0/types/captcha_policy_action_recaptcha_enterprise_input.rb +0 -14
- data/lib/auth0/types/captcha_policy_action_recaptcha_v2.rb +0 -10
- data/lib/auth0/types/captcha_policy_action_recaptcha_v2input.rb +0 -12
- data/lib/auth0/types/captcha_policy_action_simple_captcha.rb +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34dc7dce387d0bac00a0defd9a8dff7a8673d5faf533b8f1730efa2ff1d6d302
|
|
4
|
+
data.tar.gz: 06b0ff4127f8f8909bc585602c222a6ed7de16bc684e708327a1a1ef19a583f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ecae381a33f06205dd0049e5d678c1a5923337b4a051c0715385505f16d706969832f87d3fe112a7d8449128b3fd185a9bd3eafc49a218760f9225608152a05b
|
|
7
|
+
data.tar.gz: 8525ebfca5b9a9163dad9e988c2272187b435b151f5b54df0f95e5b7ba57278370637dc2ce12a697e3ece55bb4b525b38035555ca9826a7ab51793e09a2f0832
|
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": "dfded8abd2b8d91fe880f4902318f57eb06a2ad5",
|
|
14
14
|
"originGitCommitIsDirty": false,
|
|
15
15
|
"invokedBy": "ci",
|
|
16
16
|
"ciProvider": "github",
|
|
17
|
-
"sdkVersion": "6.
|
|
17
|
+
"sdkVersion": "6.6.1"
|
|
18
18
|
}
|
data/.fern/replay.lock
CHANGED
|
@@ -1,64 +1,378 @@
|
|
|
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-
|
|
9
|
+
- commit_sha: 1f0cde99ca7fdddcfc5635a1f41bf51a7efe863c
|
|
10
|
+
tree_hash: 781e4e5affb287da31d3713a3f16811228a7ada7
|
|
11
|
+
timestamp: 2026-10-27T11:30:28.609Z
|
|
12
12
|
cli_version: unknown
|
|
13
13
|
generator_versions:
|
|
14
|
-
fernapi/fern-ruby-sdk: 1.
|
|
15
|
-
- commit_sha:
|
|
16
|
-
tree_hash:
|
|
17
|
-
timestamp: 2026-
|
|
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
|
|
14
|
+
fernapi/fern-ruby-sdk: 1.24.1
|
|
15
|
+
- commit_sha: c4b1c95e4e0668d2c42aaa0a4c5c5ab1e8a642f8
|
|
16
|
+
tree_hash: d37708b9770790ac5501ab5c8a3a038868cd45d1
|
|
17
|
+
timestamp: 2026-11-04T03:49:40.588Z
|
|
48
18
|
cli_version: unknown
|
|
49
19
|
generator_versions:
|
|
50
20
|
fernapi/fern-ruby-sdk: 1.24.1
|
|
51
|
-
- commit_sha:
|
|
52
|
-
tree_hash:
|
|
53
|
-
timestamp: 2026-
|
|
21
|
+
- commit_sha: 8f16c5ba6ce970469e504f47fbe5605b379de124
|
|
22
|
+
tree_hash: 852a37472751565d4c6380096f189090b28b016f
|
|
23
|
+
timestamp: 2026-11-10T05:41:03.373Z
|
|
54
24
|
cli_version: unknown
|
|
55
25
|
generator_versions:
|
|
56
26
|
fernapi/fern-ruby-sdk: 1.24.1
|
|
57
|
-
- commit_sha:
|
|
58
|
-
tree_hash:
|
|
59
|
-
timestamp: 2026-
|
|
27
|
+
- commit_sha: 487253cd95fb1305c370bf0973df6d53933310b6
|
|
28
|
+
tree_hash: dd91d8b7b6ceb2adad8f927f904c401ef91d81b9
|
|
29
|
+
timestamp: 2026-11-20T12:35:07.175Z
|
|
60
30
|
cli_version: unknown
|
|
61
31
|
generator_versions:
|
|
62
32
|
fernapi/fern-ruby-sdk: 1.24.1
|
|
63
|
-
current_generation:
|
|
64
|
-
patches:
|
|
33
|
+
current_generation: 487253cd95fb1305c370bf0973df6d53933310b6
|
|
34
|
+
patches:
|
|
35
|
+
- id: patch-5a1782fc
|
|
36
|
+
content_hash: sha256:8aea3ea0a93faa21d0607694f46b315971db566c5f330f592ae3a221b3e45335
|
|
37
|
+
original_commit: 5a1782fc06064e114f3c868c806d09f5bcb84e4b
|
|
38
|
+
original_message: Restore Management client options and auth_client require
|
|
39
|
+
original_author: Snehil Kishore <snehil.kishore@okta.com>
|
|
40
|
+
base_generation: 487253cd95fb1305c370bf0973df6d53933310b6
|
|
41
|
+
files:
|
|
42
|
+
- lib/auth0/client.rb
|
|
43
|
+
patch_content: |
|
|
44
|
+
diff --git a/lib/auth0/client.rb b/lib/auth0/client.rb
|
|
45
|
+
index 96eb01a7..7f110150 100644
|
|
46
|
+
--- a/lib/auth0/client.rb
|
|
47
|
+
+++ b/lib/auth0/client.rb
|
|
48
|
+
@@ -4,27 +4,31 @@ module Auth0
|
|
49
|
+
class Management
|
|
50
|
+
# @param token [String]
|
|
51
|
+
# @param base_url [String, nil]
|
|
52
|
+
- # @param tenant_domain [String, nil]
|
|
53
|
+
- # @param max_retries [Integer]
|
|
54
|
+
+ # @param tenant_domain [String, nil] Tenant domain, such as "example.auth0.com", used to build the base URL.
|
|
55
|
+
+ # @param timeout [Float, nil] Request timeout in seconds.
|
|
56
|
+
+ # @param max_retries [Integer] Maximum number of request retries, defaults to 2.
|
|
57
|
+
+ # @param headers [Hash, nil] Additional headers to include in requests.
|
|
58
|
+
#
|
|
59
|
+
# @return [void]
|
|
60
|
+
- def initialize(token:, base_url: nil, tenant_domain: nil, max_retries: 2)
|
|
61
|
+
+ def initialize(token:, base_url: nil, tenant_domain: nil, timeout: nil, max_retries: 2, headers: nil)
|
|
62
|
+
unless tenant_domain.nil?
|
|
63
|
+
- tenant_domain_value = tenant_domain.nil? ? "{TENANT}.auth0.com" : tenant_domain
|
|
64
|
+
environment_url_templates = {
|
|
65
|
+
- Auth0::Environment::DEFAULT => "https://#{tenant_domain_value}/api/v2"
|
|
66
|
+
+ Auth0::Environment::DEFAULT => "https://#{tenant_domain}/api/v2"
|
|
67
|
+
}
|
|
68
|
+
- base_url = base_url.nil? ? "https://#{tenant_domain_value}/api/v2" : environment_url_templates.fetch(base_url, base_url)
|
|
69
|
+
+ base_url = base_url.nil? ? "https://#{tenant_domain}/api/v2" : environment_url_templates.fetch(base_url, base_url)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
- @raw_client = Auth0::Internal::Http::RawClient.new(
|
|
73
|
+
+ raw_client_opts = {
|
|
74
|
+
base_url: base_url || Auth0::Environment::DEFAULT,
|
|
75
|
+
headers: {
|
|
76
|
+
"X-Fern-Language" => "Ruby",
|
|
77
|
+
Authorization: "Bearer #{token}"
|
|
78
|
+
- },
|
|
79
|
+
- max_retries: max_retries
|
|
80
|
+
- )
|
|
81
|
+
+ }.merge(headers || {})
|
|
82
|
+
+ }
|
|
83
|
+
+ raw_client_opts[:timeout] = timeout if timeout
|
|
84
|
+
+ raw_client_opts[:max_retries] = max_retries if max_retries
|
|
85
|
+
+
|
|
86
|
+
+ @raw_client = Auth0::Internal::Http::RawClient.new(**raw_client_opts)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# @return [Auth0::Actions::Client]
|
|
90
|
+
@@ -273,3 +277,5 @@ module Auth0
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
+
|
|
95
|
+
+require_relative "auth_client"
|
|
96
|
+
theirs_snapshot:
|
|
97
|
+
lib/auth0/client.rb: |
|
|
98
|
+
# frozen_string_literal: true
|
|
99
|
+
|
|
100
|
+
module Auth0
|
|
101
|
+
class Management
|
|
102
|
+
# @param token [String]
|
|
103
|
+
# @param base_url [String, nil]
|
|
104
|
+
# @param tenant_domain [String, nil] Tenant domain, such as "example.auth0.com", used to build the base URL.
|
|
105
|
+
# @param timeout [Float, nil] Request timeout in seconds.
|
|
106
|
+
# @param max_retries [Integer] Maximum number of request retries, defaults to 2.
|
|
107
|
+
# @param headers [Hash, nil] Additional headers to include in requests.
|
|
108
|
+
#
|
|
109
|
+
# @return [void]
|
|
110
|
+
def initialize(token:, base_url: nil, tenant_domain: nil, timeout: nil, max_retries: 2, headers: nil)
|
|
111
|
+
unless tenant_domain.nil?
|
|
112
|
+
environment_url_templates = {
|
|
113
|
+
Auth0::Environment::DEFAULT => "https://#{tenant_domain}/api/v2"
|
|
114
|
+
}
|
|
115
|
+
base_url = base_url.nil? ? "https://#{tenant_domain}/api/v2" : environment_url_templates.fetch(base_url, base_url)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
raw_client_opts = {
|
|
119
|
+
base_url: base_url || Auth0::Environment::DEFAULT,
|
|
120
|
+
headers: {
|
|
121
|
+
"X-Fern-Language" => "Ruby",
|
|
122
|
+
Authorization: "Bearer #{token}"
|
|
123
|
+
}.merge(headers || {})
|
|
124
|
+
}
|
|
125
|
+
raw_client_opts[:timeout] = timeout if timeout
|
|
126
|
+
raw_client_opts[:max_retries] = max_retries if max_retries
|
|
127
|
+
|
|
128
|
+
@raw_client = Auth0::Internal::Http::RawClient.new(**raw_client_opts)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# @return [Auth0::Actions::Client]
|
|
132
|
+
def actions
|
|
133
|
+
@actions ||= Auth0::Actions::Client.new(client: @raw_client)
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# @return [Auth0::Agents::Client]
|
|
137
|
+
def agents
|
|
138
|
+
@agents ||= Auth0::Agents::Client.new(client: @raw_client)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# @return [Auth0::Branding::Client]
|
|
142
|
+
def branding
|
|
143
|
+
@branding ||= Auth0::Branding::Client.new(client: @raw_client)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# @return [Auth0::ClientGrants::Client]
|
|
147
|
+
def client_grants
|
|
148
|
+
@client_grants ||= Auth0::ClientGrants::Client.new(client: @raw_client)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# @return [Auth0::ClientProfiles::Client]
|
|
152
|
+
def client_profiles
|
|
153
|
+
@client_profiles ||= Auth0::ClientProfiles::Client.new(client: @raw_client)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# @return [Auth0::Clients::Client]
|
|
157
|
+
def clients
|
|
158
|
+
@clients ||= Auth0::Clients::Client.new(client: @raw_client)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# @return [Auth0::ConnectionProfiles::Client]
|
|
162
|
+
def connection_profiles
|
|
163
|
+
@connection_profiles ||= Auth0::ConnectionProfiles::Client.new(client: @raw_client)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# @return [Auth0::Connections::Client]
|
|
167
|
+
def connections
|
|
168
|
+
@connections ||= Auth0::Connections::Client.new(client: @raw_client)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# @return [Auth0::CustomDomains::Client]
|
|
172
|
+
def custom_domains
|
|
173
|
+
@custom_domains ||= Auth0::CustomDomains::Client.new(client: @raw_client)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# @return [Auth0::DeviceCredentials::Client]
|
|
177
|
+
def device_credentials
|
|
178
|
+
@device_credentials ||= Auth0::DeviceCredentials::Client.new(client: @raw_client)
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# @return [Auth0::EmailTemplates::Client]
|
|
182
|
+
def email_templates
|
|
183
|
+
@email_templates ||= Auth0::EmailTemplates::Client.new(client: @raw_client)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# @return [Auth0::EventStreams::Client]
|
|
187
|
+
def event_streams
|
|
188
|
+
@event_streams ||= Auth0::EventStreams::Client.new(client: @raw_client)
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# @return [Auth0::Events::Client]
|
|
192
|
+
def events
|
|
193
|
+
@events ||= Auth0::Events::Client.new(client: @raw_client)
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# @return [Auth0::Flows::Client]
|
|
197
|
+
def flows
|
|
198
|
+
@flows ||= Auth0::Flows::Client.new(client: @raw_client)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# @return [Auth0::Forms::Client]
|
|
202
|
+
def forms
|
|
203
|
+
@forms ||= Auth0::Forms::Client.new(client: @raw_client)
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# @return [Auth0::UserGrants::Client]
|
|
207
|
+
def user_grants
|
|
208
|
+
@user_grants ||= Auth0::UserGrants::Client.new(client: @raw_client)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# @return [Auth0::Groups::Client]
|
|
212
|
+
def groups
|
|
213
|
+
@groups ||= Auth0::Groups::Client.new(client: @raw_client)
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# @return [Auth0::Guardian::Client]
|
|
217
|
+
def guardian
|
|
218
|
+
@guardian ||= Auth0::Guardian::Client.new(client: @raw_client)
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# @return [Auth0::Hooks::Client]
|
|
222
|
+
def hooks
|
|
223
|
+
@hooks ||= Auth0::Hooks::Client.new(client: @raw_client)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# @return [Auth0::Jobs::Client]
|
|
227
|
+
def jobs
|
|
228
|
+
@jobs ||= Auth0::Jobs::Client.new(client: @raw_client)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# @return [Auth0::LogStreams::Client]
|
|
232
|
+
def log_streams
|
|
233
|
+
@log_streams ||= Auth0::LogStreams::Client.new(client: @raw_client)
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# @return [Auth0::Logs::Client]
|
|
237
|
+
def logs
|
|
238
|
+
@logs ||= Auth0::Logs::Client.new(client: @raw_client)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# @return [Auth0::NetworkACLs::Client]
|
|
242
|
+
def network_acls
|
|
243
|
+
@network_acls ||= Auth0::NetworkACLs::Client.new(client: @raw_client)
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# @return [Auth0::Organizations::Client]
|
|
247
|
+
def organizations
|
|
248
|
+
@organizations ||= Auth0::Organizations::Client.new(client: @raw_client)
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# @return [Auth0::Portals::Client]
|
|
252
|
+
def portals
|
|
253
|
+
@portals ||= Auth0::Portals::Client.new(client: @raw_client)
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# @return [Auth0::Prompts::Client]
|
|
257
|
+
def prompts
|
|
258
|
+
@prompts ||= Auth0::Prompts::Client.new(client: @raw_client)
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# @return [Auth0::RateLimitPolicies::Client]
|
|
262
|
+
def rate_limit_policies
|
|
263
|
+
@rate_limit_policies ||= Auth0::RateLimitPolicies::Client.new(client: @raw_client)
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# @return [Auth0::RefreshTokens::Client]
|
|
267
|
+
def refresh_tokens
|
|
268
|
+
@refresh_tokens ||= Auth0::RefreshTokens::Client.new(client: @raw_client)
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# @return [Auth0::ResourceServers::Client]
|
|
272
|
+
def resource_servers
|
|
273
|
+
@resource_servers ||= Auth0::ResourceServers::Client.new(client: @raw_client)
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# @return [Auth0::Roles::Client]
|
|
277
|
+
def roles
|
|
278
|
+
@roles ||= Auth0::Roles::Client.new(client: @raw_client)
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# @return [Auth0::Rules::Client]
|
|
282
|
+
def rules
|
|
283
|
+
@rules ||= Auth0::Rules::Client.new(client: @raw_client)
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# @return [Auth0::RulesConfigs::Client]
|
|
287
|
+
def rules_configs
|
|
288
|
+
@rules_configs ||= Auth0::RulesConfigs::Client.new(client: @raw_client)
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# @return [Auth0::SelfServiceProfiles::Client]
|
|
292
|
+
def self_service_profiles
|
|
293
|
+
@self_service_profiles ||= Auth0::SelfServiceProfiles::Client.new(client: @raw_client)
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# @return [Auth0::Sessions::Client]
|
|
297
|
+
def sessions
|
|
298
|
+
@sessions ||= Auth0::Sessions::Client.new(client: @raw_client)
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# @return [Auth0::Stats::Client]
|
|
302
|
+
def stats
|
|
303
|
+
@stats ||= Auth0::Stats::Client.new(client: @raw_client)
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# @return [Auth0::SupplementalSignals::Client]
|
|
307
|
+
def supplemental_signals
|
|
308
|
+
@supplemental_signals ||= Auth0::SupplementalSignals::Client.new(client: @raw_client)
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# @return [Auth0::Tickets::Client]
|
|
312
|
+
def tickets
|
|
313
|
+
@tickets ||= Auth0::Tickets::Client.new(client: @raw_client)
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# @return [Auth0::TokenExchangeProfiles::Client]
|
|
317
|
+
def token_exchange_profiles
|
|
318
|
+
@token_exchange_profiles ||= Auth0::TokenExchangeProfiles::Client.new(client: @raw_client)
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# @return [Auth0::UserAttributeProfiles::Client]
|
|
322
|
+
def user_attribute_profiles
|
|
323
|
+
@user_attribute_profiles ||= Auth0::UserAttributeProfiles::Client.new(client: @raw_client)
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# @return [Auth0::UserBlocks::Client]
|
|
327
|
+
def user_blocks
|
|
328
|
+
@user_blocks ||= Auth0::UserBlocks::Client.new(client: @raw_client)
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# @return [Auth0::Users::Client]
|
|
332
|
+
def users
|
|
333
|
+
@users ||= Auth0::Users::Client.new(client: @raw_client)
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# @return [Auth0::Anomaly::Client]
|
|
337
|
+
def anomaly
|
|
338
|
+
@anomaly ||= Auth0::Anomaly::Client.new(client: @raw_client)
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
# @return [Auth0::AttackProtection::Client]
|
|
342
|
+
def attack_protection
|
|
343
|
+
@attack_protection ||= Auth0::AttackProtection::Client.new(client: @raw_client)
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# @return [Auth0::Emails::Client]
|
|
347
|
+
def emails
|
|
348
|
+
@emails ||= Auth0::Emails::Client.new(client: @raw_client)
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# @return [Auth0::Experimentation::Client]
|
|
352
|
+
def experimentation
|
|
353
|
+
@experimentation ||= Auth0::Experimentation::Client.new(client: @raw_client)
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# @return [Auth0::Keys::Client]
|
|
357
|
+
def keys
|
|
358
|
+
@keys ||= Auth0::Keys::Client.new(client: @raw_client)
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# @return [Auth0::RiskAssessments::Client]
|
|
362
|
+
def risk_assessments
|
|
363
|
+
@risk_assessments ||= Auth0::RiskAssessments::Client.new(client: @raw_client)
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# @return [Auth0::Tenants::Client]
|
|
367
|
+
def tenants
|
|
368
|
+
@tenants ||= Auth0::Tenants::Client.new(client: @raw_client)
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# @return [Auth0::VerifiableCredentials::Client]
|
|
372
|
+
def verifiable_credentials
|
|
373
|
+
@verifiable_credentials ||= Auth0::VerifiableCredentials::Client.new(client: @raw_client)
|
|
374
|
+
end
|
|
375
|
+
end
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
require_relative "auth_client"
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v6.
|
|
1
|
+
v6.7.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [v6.7.0](https://github.com/auth0/ruby-auth0/tree/v6.7.0) (2026-11-23)
|
|
4
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.6.0...v6.7.0)
|
|
5
|
+
|
|
6
|
+
**Added**
|
|
7
|
+
- feat!: add Google Account Linking, OIN listing URL and Universal Logout config, and remove genai_trial tenant flag [\#834](https://github.com/auth0/ruby-auth0/pull/834) ([fern-api[bot]](https://github.com/apps/fern-api))
|
|
8
|
+
- feat: add Passkey Signup Behavior and Pending Consent screen [\#830](https://github.com/auth0/ruby-auth0/pull/830) ([fern-api[bot]](https://github.com/apps/fern-api))
|
|
9
|
+
|
|
10
|
+
## [v6.6.0](https://github.com/auth0/ruby-auth0/tree/v6.6.0) (2026-11-04)
|
|
11
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.5.0...v6.6.0)
|
|
12
|
+
|
|
13
|
+
**Added**
|
|
14
|
+
- 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))
|
|
15
|
+
- 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))
|
|
16
|
+
- 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))
|
|
17
|
+
|
|
3
18
|
## [v6.5.0](https://github.com/auth0/ruby-auth0/tree/v6.5.0) (2026-10-14)
|
|
4
19
|
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.4.0...v6.5.0)
|
|
5
20
|
|
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:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ../..
|
|
3
3
|
specs:
|
|
4
|
-
auth0 (6.
|
|
4
|
+
auth0 (6.7.0)
|
|
5
5
|
addressable (~> 2.8)
|
|
6
6
|
jwt (>= 2.7, < 4.0)
|
|
7
7
|
rest-client (~> 2.1)
|
|
@@ -11,7 +11,7 @@ PATH
|
|
|
11
11
|
GEM
|
|
12
12
|
remote: https://rubygems.org/
|
|
13
13
|
specs:
|
|
14
|
-
addressable (2.9.
|
|
14
|
+
addressable (2.9.1)
|
|
15
15
|
public_suffix (>= 2.0.2, < 8.0)
|
|
16
16
|
base64 (0.3.0)
|
|
17
17
|
domain_name (0.6.20240107)
|
|
@@ -32,7 +32,7 @@ GEM
|
|
|
32
32
|
public_suffix (7.0.5)
|
|
33
33
|
puma (6.6.1)
|
|
34
34
|
nio4r (~> 2.0)
|
|
35
|
-
rack (3.2.
|
|
35
|
+
rack (3.2.8)
|
|
36
36
|
rack-protection (4.2.1)
|
|
37
37
|
base64 (>= 0.1.0)
|
|
38
38
|
logger (>= 1.6.0)
|
|
@@ -13,9 +13,9 @@ module Auth0
|
|
|
13
13
|
|
|
14
14
|
field :mode, -> { Auth0::Types::BruteForceProtectionModeEnum }, optional: true, nullable: false
|
|
15
15
|
|
|
16
|
-
field :max_attempts, -> { Integer }, optional: true, nullable: false
|
|
17
|
-
|
|
18
16
|
field :form_submission_mode, -> { Auth0::Types::BruteForceProtectionFormSubmissionModeEnum }, optional: true, nullable: false
|
|
17
|
+
|
|
18
|
+
field :max_attempts, -> { Integer }, optional: true, nullable: false
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
end
|
|
@@ -30,11 +30,6 @@ module Auth0
|
|
|
30
30
|
@captcha ||= Auth0::AttackProtection::Captcha::Client.new(client: @client)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
# @return [Auth0::CaptchaPolicies::Client]
|
|
34
|
-
def captcha_policies
|
|
35
|
-
@captcha_policies ||= Auth0::AttackProtection::CaptchaPolicies::Client.new(client: @client)
|
|
36
|
-
end
|
|
37
|
-
|
|
38
33
|
# @return [Auth0::PhoneProviderProtection::Client]
|
|
39
34
|
def phone_provider_protection
|
|
40
35
|
@phone_provider_protection ||= Auth0::AttackProtection::PhoneProviderProtection::Client.new(client: @client)
|
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: {
|
|
@@ -143,6 +151,11 @@ module Auth0
|
|
|
143
151
|
@organizations ||= Auth0::Organizations::Client.new(client: @raw_client)
|
|
144
152
|
end
|
|
145
153
|
|
|
154
|
+
# @return [Auth0::Portals::Client]
|
|
155
|
+
def portals
|
|
156
|
+
@portals ||= Auth0::Portals::Client.new(client: @raw_client)
|
|
157
|
+
end
|
|
158
|
+
|
|
146
159
|
# @return [Auth0::Prompts::Client]
|
|
147
160
|
def prompts
|
|
148
161
|
@prompts ||= Auth0::Prompts::Client.new(client: @raw_client)
|