auth0 4.7.0 → 4.8.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.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +50 -0
  3. data/.github/CODEOWNERS +1 -0
  4. data/.gitignore +0 -1
  5. data/CHANGELOG.md +27 -0
  6. data/DEPLOYMENT.md +11 -3
  7. data/Gemfile +2 -1
  8. data/Gemfile.lock +172 -0
  9. data/README.md +2 -2
  10. data/auth0.gemspec +1 -3
  11. data/codecov.yml +22 -0
  12. data/deploy_documentation.sh +1 -1
  13. data/lib/auth0/api/v2.rb +4 -0
  14. data/lib/auth0/api/v2/anomaly.rb +36 -0
  15. data/lib/auth0/api/v2/jobs.rb +22 -3
  16. data/lib/auth0/api/v2/roles.rb +172 -0
  17. data/lib/auth0/api/v2/users.rb +117 -4
  18. data/lib/auth0/exception.rb +33 -7
  19. data/lib/auth0/mixins/httpproxy.rb +10 -7
  20. data/lib/auth0/mixins/permission_struct.rb +3 -0
  21. data/lib/auth0/mixins/validation.rb +25 -0
  22. data/lib/auth0/version.rb +1 -1
  23. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Anomaly/_check_if_ip_is_blocked/should_return_200_response_code.yml +65 -0
  24. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Anomaly/_remove_ip_block/should_remove_an_IP_successfully.yml +60 -0
  25. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_ClientGrants/_client_grants/should_return_at_least_1_result.yml +1 -1
  26. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_ClientGrants/_client_grants/should_return_the_first_page_of_one_result.yml +1 -1
  27. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_ClientGrants/_client_grants/should_return_the_test_client_grant.yml +1 -1
  28. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_ClientGrants/_delete_client_grant/should_delete_the_test_client_grant.yml +1 -1
  29. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_ClientGrants/_patch_client_grant/should_update_the_test_client_grant.yml +1 -1
  30. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_ClientGrants/create_test_client.yml +1 -1
  31. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_ClientGrants/create_test_client_grant.yml +1 -1
  32. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_ClientGrants/delete_test_client.yml +1 -1
  33. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_ClientGrants/delete_test_client_grant.yml +1 -1
  34. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_client/_filters/should_exclude_and_include_fields_properly.yml +1 -1
  35. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_client/_filters/should_include_the_specified_fields.yml +1 -1
  36. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_client/should_get_the_test_client.yml +1 -1
  37. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_clients/_filters/should_exclude_fields_not_specified.yml +1 -1
  38. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_clients/_filters/should_exclude_the_specified_fields.yml +1 -1
  39. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_clients/_filters/should_include_the_specified_fields.yml +1 -1
  40. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_clients/_filters/should_paginate_results.yml +1 -1
  41. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_clients/should_get_at_least_one_client.yml +1 -1
  42. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_delete_client/should_delete_the_test_client_without_an_error.yml +1 -1
  43. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_patch_client/should_update_the_client_with_the_correct_attributes.yml +1 -1
  44. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/create_test_client.yml +1 -1
  45. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connection/_filters/should_exclude_the_fields_indicated.yml +1 -1
  46. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connection/_filters/should_include_the_fields_indicated.yml +1 -1
  47. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connection/should_find_the_correct_connection.yml +1 -1
  48. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connections/_filters/should_include_previously-created_connection_when_filtered.yml +1 -1
  49. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connections/_filters/should_should_exclude_the_fields_indicated_from_filtered_results.yml +1 -1
  50. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connections/_filters/should_should_include_the_fields_indicated_from_filtered_results.yml +1 -1
  51. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connections/should_include_the_previously_created_connection.yml +1 -1
  52. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_connections/should_not_be_empty.yml +1 -1
  53. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_delete_connection/should_delete_the_connection.yml +1 -1
  54. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_delete_connection_user/should_delete_the_user_created.yml +2 -2
  55. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_update_connection/should_update_the_connection.yml +1 -1
  56. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/create_test_connection.yml +1 -1
  57. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/create_test_user.yml +1 -1
  58. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_DeviceCredentials/create_test_user.yml +1 -1
  59. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_DeviceCredentials/delete_test_credential.yml +1 -1
  60. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_DeviceCredentials/delete_test_user.yml +1 -1
  61. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Emails/_configure_provider/should_configure_a_new_email_provider.yml +1 -1
  62. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Emails/_delete_provider/should_delete_the_existing_email_provider_without_an_error.yml +1 -1
  63. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Emails/_delete_provider/should_throw_an_error_trying_to_get_the_email_provider.yml +1 -1
  64. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Emails/_get_provider/_filters/should_get_the_existing_email_provider_with_specific_fields.yml +1 -1
  65. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Emails/_get_provider/_filters/should_get_the_existing_email_provider_without_specific_fields.yml +1 -1
  66. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Emails/_get_provider/should_get_the_existing_email_provider.yml +1 -1
  67. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Emails/_update_provider/should_update_the_existing_email_provider.yml +1 -1
  68. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Emails/delete_existing_provider.yml +1 -1
  69. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/_log/should_match_the_created_log_entry.yml +2 -2
  70. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/_log/should_not_be_empty.yml +2 -2
  71. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/_logs/_filters/should_exclude_fields_not_specified.yml +1 -1
  72. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/_logs/_filters/should_exclude_the_specified_fields.yml +1 -1
  73. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/_logs/_filters/should_have_one_log_entry.yml +1 -1
  74. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/_logs/_filters/should_include_the_specified_fields.yml +1 -1
  75. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/_logs/_from/should_take_one_log_entry.yml +2 -2
  76. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/create_test_user.yml +1 -1
  77. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/delete_test_disabled_rule.yml +1 -1
  78. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/delete_test_enabled_rule.yml +1 -1
  79. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Logs/delete_test_user.yml +1 -1
  80. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_add_role_permissions/should_add_a_Permission_to_the_Role_successfully.yml +67 -0
  81. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_add_role_users/should_add_a_User_to_the_Role_successfully.yml +67 -0
  82. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_delete_role/should_delete_the_Role_successfully.yml +60 -0
  83. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_role/should_get_the_Role_successfully.yml +65 -0
  84. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_role_permissions/should_get_exactly_1_Permission.yml +65 -0
  85. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_role_permissions/should_get_the_added_Permission_from_the_Role_successfully.yml +65 -0
  86. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_role_users/should_get_exactly_1_User.yml +65 -0
  87. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_role_users/should_get_the_added_User_from_the_Role_successfully.yml +65 -0
  88. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_roles/should_get_the_Role_successfully.yml +65 -0
  89. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_remove_role_permissions/should_remove_a_Permission_from_the_Role_successfully.yml +62 -0
  90. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_update_role/should_update_the_Role_successfully.yml +67 -0
  91. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/create_test_api.yml +67 -0
  92. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/create_test_role.yml +67 -0
  93. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/create_test_user.yml +67 -0
  94. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/delete_test_api.yml +60 -0
  95. data/spec/fixtures/vcr_cassettes/{Auth0_Api_V2_Users/_delete_user/should_delete_the_user_successfully.yml → Auth0_Api_V2_Roles/delete_test_user.yml} +14 -8
  96. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_delete_rule/should_delete_the_test_disabled_rule_without_an_error.yml +1 -1
  97. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_delete_rule/should_delete_the_test_enabled_rule_without_an_error.yml +1 -1
  98. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_rule/_filters/should_exclude_the_fields_not_specified.yml +1 -1
  99. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_rule/_filters/should_exclude_the_specified_fields.yml +1 -1
  100. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_rule/_filters/should_include_the_specified_fields.yml +1 -1
  101. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_rule/should_get_a_specific_rule.yml +1 -1
  102. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_rules/_filters/should_exclude_fields_not_specified.yml +1 -1
  103. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_rules/_filters/should_include_the_specified_fields.yml +1 -1
  104. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_rules/_filters/should_return_at_least_1_disabled_rule.yml +1 -1
  105. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_rules/_filters/should_return_at_least_1_enabled_rule.yml +1 -1
  106. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_rules/_filters/should_return_paginated_results.yml +2 -2
  107. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_rules/should_return_at_least_1_rule.yml +1 -1
  108. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_update_rule/should_update_the_disabled_rule_to_be_enabled.yml +1 -1
  109. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/create_test_disabled_rule.yml +1 -1
  110. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/create_test_enabled_rule.yml +1 -1
  111. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Stats/_active_users/should_have_at_least_one_active_user.yml +1 -1
  112. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Stats/_daily_stats/should_have_at_least_one_stats_entry_for_the_timeframe.yml +1 -1
  113. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Tenants/_get_tenant_settings/should_get_the_tenant_settings.yml +1 -1
  114. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Tenants/_get_tenant_settings_with_specific_fields/should_exclude_a_field_not_requested.yml +1 -1
  115. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Tenants/_get_tenant_settings_with_specific_fields/should_include_the_field_requested.yml +1 -1
  116. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Tenants/_update_tenant_settings/should_revert_the_tenant_name.yml +1 -1
  117. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Tenants/_update_tenant_settings/should_update_the_tenant_settings_with_a_new_tenant_name.yml +1 -1
  118. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Tickets/_post_email_verification/should_create_an_email_verification_ticket.yml +1 -1
  119. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Tickets/_post_password_change/should_create_a_password_change_ticket.yml +1 -1
  120. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Tickets/create_test_user.yml +1 -1
  121. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Tickets/delete_test_user.yml +1 -1
  122. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_add_user_permissions/should_add_a_Permissions_for_a_User_successfully.yml +67 -0
  123. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_add_user_roles/should_add_a_Role_to_a_User_successfully.yml +62 -0
  124. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_delete_user/should_delete_the_User_successfully.yml +60 -0
  125. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_delete_user/should_delete_the_secondary_User_successfully.yml +60 -0
  126. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_delete_user_provider/should_attempt_to_delete_the_MFA_provider_for_the_User.yml +60 -0
  127. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_get_enrollments/should_get_Enrollments_for_a_User_successfully.yml +65 -0
  128. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_get_user_permissions/should_get_exactly_1_Permission_for_a_User_successfully.yml +65 -0
  129. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_get_user_permissions/should_get_the_correct_Permission_for_a_User_successfully.yml +65 -0
  130. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_get_user_roles/should_get_Roles_for_a_User_successfully.yml +65 -0
  131. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_invalidate_browsers/should_invalidate_MFA_browsers_for_the_User_successfully.yml +62 -0
  132. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_link_user_account/should_link_two_Users_successfully.yml +67 -0
  133. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_patch_user/should_patch_the_User_successfully.yml +68 -0
  134. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_remove_user_permissions/should_remove_a_Permission_from_a_User_successfully.yml +62 -0
  135. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_remove_user_roles/should_remove_a_Role_from_a_User_successfully.yml +62 -0
  136. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_unlink_user_account/should_unlink_two_Users_successfully.yml +65 -0
  137. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_user/_filters/should_exclude_fields_not_indicated.yml +15 -10
  138. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_user/_filters/should_exclude_the_fields_indicated.yml +15 -13
  139. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_user/_filters/should_include_the_fields_indicated.yml +15 -13
  140. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_user/should_retrieve_the_created_user.yml +15 -16
  141. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_user_logs/should_get_Logs_for_a_User_successfully.yml +69 -0
  142. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_users/_filters/is_expected_to_find_a_user_with_a_v2_search_engine_query.yml +14 -8
  143. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_users/_filters/is_expected_to_find_a_user_with_a_v3_search_engine_query.yml +14 -8
  144. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_users/_filters/should_exclude_the_indicated_fields_when_paginated.yml +13 -7
  145. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_users/_filters/should_include_the_indicated_fields_when_paginated.yml +13 -7
  146. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_users/_filters/should_not_include_other_fields_when_paginated.yml +13 -7
  147. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_users/_filters/should_return_the_correct_number_of_results_when_paginated.yml +13 -7
  148. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_users/should_have_at_least_one_user.yml +13 -7
  149. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/create_secondary_test_user.yml +67 -0
  150. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/create_test_api.yml +67 -0
  151. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/create_test_role.yml +67 -0
  152. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/create_test_user.yml +15 -16
  153. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/delete_test_api.yml +60 -0
  154. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/delete_test_role.yml +60 -0
  155. data/spec/integration/lib/auth0/api/v2/api_anomaly_spec.rb +17 -0
  156. data/spec/integration/lib/auth0/api/v2/api_roles_spec.rb +145 -0
  157. data/spec/integration/lib/auth0/api/v2/api_users_spec.rb +150 -32
  158. data/spec/integration/lib/auth0/auth0_client_spec.rb +3 -4
  159. data/spec/lib/auth0/api/v2/anomaly_spec.rb +26 -0
  160. data/spec/lib/auth0/api/v2/jobs_spec.rb +33 -1
  161. data/spec/lib/auth0/api/v2/roles_spec.rb +360 -0
  162. data/spec/lib/auth0/api/v2/users_spec.rb +406 -66
  163. data/spec/lib/auth0/mixins/httpproxy_spec.rb +57 -0
  164. data/spec/spec_helper.rb +5 -6
  165. data/spec/support/credentials.rb +4 -13
  166. data/spec/support/dummy_class.rb +1 -1
  167. data/spec/support/stub_response.rb +1 -1
  168. metadata +96 -10
  169. data/.travis.yml +0 -18
  170. data/build_travis.sh +0 -7
  171. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_patch_user/should_patch_email_verified_and_return_the_updated_data.yml +0 -68
  172. data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_patch_user/should_patch_user_metadata_and_return_the_updated_user.yml +0 -69
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37765b52eeb99f419d48fb8166e496c566e71dbee391ab8a6d964eab4196e32b
4
- data.tar.gz: 463bdc63eb772dbdb361c955aa51dc6e0e3c72bdfe37a2dafec92924f947bf75
3
+ metadata.gz: 3ed0c706e0b34dba7cd8175c2b9a4e0abd8b319d3ee6128885a8fdcfb6b37d9c
4
+ data.tar.gz: 165ab41e867b81ba5d2d70f11f3e753c9b3fb49617a354a2b3ec747bee86fddb
5
5
  SHA512:
6
- metadata.gz: ae51583299385b8f3bda6ce6b549690ee9ed4e28c95acfad8a66b0479e3aff0a06964773bcc61cfd881ed67eb226ca83a0858dc8ebdbea811c170b25e1dec4f3
7
- data.tar.gz: '018345873306b64d9960fec8d2d7ea50f60f236bced1e546aa3a5bfe098c2291db4a0da9f129e03d9ca3e75f6f6d780b0a4b44b0270e28e748c2f756dc9d8d86'
6
+ metadata.gz: 4ab60f3ca91020f2113f7d804298b0ee483b2aca0b39c28713252ddbdf274de9f2d5fff0834de345fe04d0580a63961aa5b7a71010e3d73ac843de8337781a58
7
+ data.tar.gz: 4b7c48d5a4caec35b982cd62a541dfea0b5761789e37343e28cad955bad770971ad2b31e04f65648c244c17d5dac7d9c3704f18378cf7993beadd7b8d004e43d
@@ -0,0 +1,50 @@
1
+ version: 2.1
2
+ jobs:
3
+ run-tests:
4
+ docker:
5
+ - image: circleci/ruby:2.4.6-jessie
6
+ steps:
7
+ - checkout
8
+ - restore_cache:
9
+ keys:
10
+ - gems-v2-{{ checksum "Gemfile.lock" }}
11
+ - gems-v2-
12
+ - run: bundle check || bundle install
13
+ - persist_to_workspace:
14
+ root: .
15
+ paths:
16
+ - Gemfile
17
+ - Gemfile.lock
18
+ - save_cache:
19
+ key: gems-v2--{{ checksum "Gemfile.lock" }}
20
+ paths:
21
+ - vendor/bundle
22
+ # Must define DOMAIN, CLIENT_ID, CLIENT_SECRET and MASTER_JWT env
23
+ - run: bundle exec rake test
24
+ snyk:
25
+ docker:
26
+ - image: snyk/snyk-cli:rubygems
27
+ steps:
28
+ - attach_workspace:
29
+ at: .
30
+ - run: snyk test
31
+ - run:
32
+ command: |
33
+ if [[ "${CIRCLE_BRANCH}" == "master" ]]
34
+ then
35
+ snyk monitor --org=auth0-sdks
36
+ fi
37
+ when: always
38
+
39
+ workflows:
40
+ tests:
41
+ jobs:
42
+ - run-tests
43
+ snyk:
44
+ jobs:
45
+ - run-tests
46
+ - snyk:
47
+ # Must define SNYK_TOKEN env
48
+ context: snyk-env
49
+ requires:
50
+ - run-tests
@@ -0,0 +1 @@
1
+ * @auth0/sdk-team-approvers
data/.gitignore CHANGED
@@ -11,5 +11,4 @@ coverage
11
11
  *.swo
12
12
  spec/auth0.yml
13
13
  .yardoc
14
- Gemfile.lock
15
14
  .env
@@ -1,5 +1,32 @@
1
1
  # Change Log
2
2
 
3
+ ## [v4.8.0](https://github.com/auth0/ruby-auth0/tree/v4.8.0) (2019-08-01)
4
+ [Full Changelog](https://github.com/auth0/ruby-auth0/compare/v4.7.0...v4.8.0)
5
+
6
+ **Closed issues**
7
+ - Not enough information in exception when Rate Limiting is encountered [\#158](https://github.com/auth0/ruby-auth0/issues/158)
8
+
9
+ **Added**
10
+ - Add Management API Anomaly endpoints [\#179](https://github.com/auth0/ruby-auth0/pull/179) ([makoto-matsumoto](https://github.com/makoto-matsumoto))
11
+ - Add parameters for users imports [\#177](https://github.com/auth0/ruby-auth0/pull/177) ([makoto-matsumoto](https://github.com/makoto-matsumoto))
12
+ - Add failed job error details endpoint [\#176](https://github.com/auth0/ruby-auth0/pull/176) ([makoto-matsumoto](https://github.com/makoto-matsumoto))
13
+ - Add Management API Roles endpoints [\#172](https://github.com/auth0/ruby-auth0/pull/172) ([joshcanhelp](https://github.com/joshcanhelp))
14
+ - Expose rate limiting information [\#170](https://github.com/auth0/ruby-auth0/pull/170) ([philomory](https://github.com/philomory))
15
+ - Add missing User Management API endpoints [\#169](https://github.com/auth0/ruby-auth0/pull/169) ([joshcanhelp](https://github.com/joshcanhelp))
16
+ - Add Gemfile.lock file [\#165](https://github.com/auth0/ruby-auth0/pull/165) ([lbalmaceda](https://github.com/lbalmaceda))
17
+
18
+ **Changed**
19
+ - Add Roles and Users endpoints integration tests [\#174](https://github.com/auth0/ruby-auth0/pull/174) ([joshcanhelp](https://github.com/joshcanhelp))
20
+
21
+ **Deprecated**
22
+ - Deprecate Auth0::Api::V2::Users.delete_users [\#181](https://github.com/auth0/ruby-auth0/pull/181) ([joshcanhelp](https://github.com/joshcanhelp))
23
+
24
+ **Removed**
25
+ - Gemspec: Drop EOL'd property rubyforge_project [\#180](https://github.com/auth0/ruby-auth0/pull/180) ([olleolleolle](https://github.com/olleolleolle))
26
+
27
+ **Security**
28
+ - Fix Yard dependency vulnerability [\#184](https://github.com/auth0/ruby-auth0/pull/184) ([joshcanhelp](https://github.com/joshcanhelp))
29
+
3
30
  ## [v4.7.0](https://github.com/auth0/ruby-auth0/tree/v4.7.0) (2019-03-19)
4
31
  [Full Changelog](https://github.com/auth0/ruby-auth0/compare/v4.6.0...v4.7.0)
5
32
 
@@ -12,17 +12,24 @@ git checkout -b release-X.X.X
12
12
  git push --set-upstream origin release-X.X.X
13
13
 
14
14
  # Update the version number
15
- bundle exec gem bump --version x.y.z
15
+ # This will create a commit with the new version
16
+ bundle exec gem bump --version X.X.X
17
+
18
+ # Make sure the Gemfile.lock is up-to-date
19
+ bundle update
20
+ git commit -am "Update gems"
16
21
 
17
22
  # Generate the changelog
18
23
  github_changelog_generator -t $GITHUB_READ_TOKEN
24
+ # ... or similar.
19
25
  # Review the changelog
20
26
  # Remove "unreleased" section
21
27
  # Make sure the tags are ordered
22
28
 
23
29
  # Commit, push, and create a PR for this release
24
- git commit -am "Release vX.X.X"
25
- git push --set-upstream origin release-X.X.X
30
+ git commit -am "Update CHANGELOG.md"
31
+ git push
32
+
26
33
  # Add related milestone
27
34
  # Create PR on GitHub and assign for review
28
35
  # Merge/rebase and delete branch once approved
@@ -31,6 +38,7 @@ git push --set-upstream origin release-X.X.X
31
38
  git checkout master
32
39
  git pull
33
40
  bundle exec gem tag
41
+ git push origin vX.X.X
34
42
  # Create a new release from this tag on GitHub using markdown from the changelog
35
43
 
36
44
  # Make sure you are an author for this gem here https://rubygems.org/gems/auth0/
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :development do
7
- gem 'terminal-notifier-guard', require: false unless ENV['TRAVIS']
7
+ gem 'terminal-notifier-guard', require: false unless ENV['CIRCLECI']
8
8
  gem 'coveralls', require: false
9
9
  gem 'rubocop', require: false
10
10
  gem 'yard', require: false
@@ -14,4 +14,5 @@ group :test do
14
14
  gem 'webmock', require: false
15
15
  gem 'vcr', require: false
16
16
  gem 'codecov', require: false
17
+ gem 'simplecov'
17
18
  end
@@ -0,0 +1,172 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ auth0 (4.8.0)
5
+ rest-client (~> 2.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.6.0)
11
+ public_suffix (>= 2.0.2, < 4.0)
12
+ ast (2.4.0)
13
+ codecov (0.1.14)
14
+ json
15
+ simplecov
16
+ url
17
+ coderay (1.1.2)
18
+ concurrent-ruby (1.1.5)
19
+ coveralls (0.8.23)
20
+ json (>= 1.8, < 3)
21
+ simplecov (~> 0.16.1)
22
+ term-ansicolor (~> 1.3)
23
+ thor (>= 0.19.4, < 2.0)
24
+ tins (~> 1.6)
25
+ crack (0.4.3)
26
+ safe_yaml (~> 1.0.0)
27
+ diff-lcs (1.3)
28
+ docile (1.3.2)
29
+ domain_name (0.5.20190701)
30
+ unf (>= 0.0.5, < 1.0.0)
31
+ dotenv (2.0.1)
32
+ dotenv-rails (2.0.1)
33
+ dotenv (= 2.0.1)
34
+ faker (1.9.6)
35
+ i18n (>= 0.7)
36
+ ffi (1.11.1)
37
+ formatador (0.2.5)
38
+ fuubar (2.4.1)
39
+ rspec-core (~> 3.0)
40
+ ruby-progressbar (~> 1.4)
41
+ gem-release (0.7.4)
42
+ guard (2.15.0)
43
+ formatador (>= 0.2.4)
44
+ listen (>= 2.7, < 4.0)
45
+ lumberjack (>= 1.0.12, < 2.0)
46
+ nenv (~> 0.1)
47
+ notiffany (~> 0.0)
48
+ pry (>= 0.9.12)
49
+ shellany (~> 0.0)
50
+ thor (>= 0.18.1)
51
+ guard-compat (1.2.1)
52
+ guard-rspec (4.7.3)
53
+ guard (~> 2.1)
54
+ guard-compat (~> 1.1)
55
+ rspec (>= 2.99.0, < 4.0)
56
+ hashdiff (1.0.0)
57
+ http-cookie (1.0.3)
58
+ domain_name (~> 0.5)
59
+ i18n (1.6.0)
60
+ concurrent-ruby (~> 1.0)
61
+ jaro_winkler (1.5.3)
62
+ json (2.2.0)
63
+ listen (3.1.5)
64
+ rb-fsevent (~> 0.9, >= 0.9.4)
65
+ rb-inotify (~> 0.9, >= 0.9.7)
66
+ ruby_dep (~> 1.2)
67
+ lumberjack (1.0.13)
68
+ method_source (0.8.2)
69
+ mime-types (3.2.2)
70
+ mime-types-data (~> 3.2015)
71
+ mime-types-data (3.2019.0331)
72
+ nenv (0.3.0)
73
+ netrc (0.11.0)
74
+ notiffany (0.1.3)
75
+ nenv (~> 0.1)
76
+ shellany (~> 0.0)
77
+ parallel (1.17.0)
78
+ parser (2.6.3.0)
79
+ ast (~> 2.4.0)
80
+ pry (0.10.4)
81
+ coderay (~> 1.1.0)
82
+ method_source (~> 0.8.1)
83
+ slop (~> 3.4)
84
+ pry-nav (0.2.4)
85
+ pry (>= 0.9.10, < 0.11.0)
86
+ public_suffix (3.1.1)
87
+ rack (1.6.11)
88
+ rack-test (0.8.3)
89
+ rack (>= 1.0, < 3)
90
+ rainbow (3.0.0)
91
+ rake (10.5.0)
92
+ rb-fsevent (0.10.3)
93
+ rb-inotify (0.10.0)
94
+ ffi (~> 1.0)
95
+ rest-client (2.0.2)
96
+ http-cookie (>= 1.0.2, < 2.0)
97
+ mime-types (>= 1.16, < 4.0)
98
+ netrc (~> 0.8)
99
+ rspec (3.8.0)
100
+ rspec-core (~> 3.8.0)
101
+ rspec-expectations (~> 3.8.0)
102
+ rspec-mocks (~> 3.8.0)
103
+ rspec-core (3.8.2)
104
+ rspec-support (~> 3.8.0)
105
+ rspec-expectations (3.8.4)
106
+ diff-lcs (>= 1.2.0, < 2.0)
107
+ rspec-support (~> 3.8.0)
108
+ rspec-mocks (3.8.1)
109
+ diff-lcs (>= 1.2.0, < 2.0)
110
+ rspec-support (~> 3.8.0)
111
+ rspec-support (3.8.2)
112
+ rubocop (0.74.0)
113
+ jaro_winkler (~> 1.5.1)
114
+ parallel (~> 1.10)
115
+ parser (>= 2.6)
116
+ rainbow (>= 2.2.2, < 4.0)
117
+ ruby-progressbar (~> 1.7)
118
+ unicode-display_width (>= 1.4.0, < 1.7)
119
+ ruby-progressbar (1.10.1)
120
+ ruby_dep (1.5.0)
121
+ safe_yaml (1.0.5)
122
+ shellany (0.0.1)
123
+ simplecov (0.16.1)
124
+ docile (~> 1.1)
125
+ json (>= 1.8, < 3)
126
+ simplecov-html (~> 0.10.0)
127
+ simplecov-html (0.10.2)
128
+ slop (3.6.0)
129
+ term-ansicolor (1.7.1)
130
+ tins (~> 1.0)
131
+ terminal-notifier-guard (1.7.0)
132
+ thor (0.20.3)
133
+ tins (1.21.1)
134
+ unf (0.1.4)
135
+ unf_ext
136
+ unf_ext (0.0.7.6)
137
+ unicode-display_width (1.6.0)
138
+ url (0.3.2)
139
+ vcr (5.0.0)
140
+ webmock (3.6.2)
141
+ addressable (>= 2.3.6)
142
+ crack (>= 0.3.2)
143
+ hashdiff (>= 0.4.0, < 2.0.0)
144
+ yard (0.9.20)
145
+
146
+ PLATFORMS
147
+ ruby
148
+
149
+ DEPENDENCIES
150
+ auth0!
151
+ codecov
152
+ coveralls
153
+ dotenv-rails (~> 2.0)
154
+ faker (~> 1.4)
155
+ fuubar (~> 2.0)
156
+ gem-release (~> 0.7)
157
+ guard-rspec (~> 4.5)
158
+ pry (~> 0.10)
159
+ pry-nav (~> 0.2.4)
160
+ rack (~> 1.6.4)
161
+ rack-test (~> 0.6)
162
+ rake (~> 10.4)
163
+ rspec (~> 3.1, >= 3.1.0)
164
+ rubocop
165
+ simplecov
166
+ terminal-notifier-guard
167
+ vcr
168
+ webmock
169
+ yard
170
+
171
+ BUNDLED WITH
172
+ 1.17.3
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Auth0 - Ruby
2
2
 
3
- [![Build Status](https://travis-ci.org/auth0/ruby-auth0.svg?branch=master)](https://travis-ci.org/auth0/ruby-auth0)
3
+ [![CircleCI](https://img.shields.io/circleci/project/github/auth0/ruby-auth0/master.svg)](https://circleci.com/gh/auth0/ruby-auth0)
4
4
  [![Gem Version](https://badge.fury.io/rb/auth0.svg)](http://badge.fury.io/rb/auth0)
5
- [![Coverage Status](https://coveralls.io/repos/auth0/ruby-auth0/badge.svg?branch=master)](https://coveralls.io/r/auth0/ruby-auth0?branch=master)
5
+ [![codecov](https://codecov.io/gh/auth0/ruby-auth0/branch/master/graph/badge.svg)](https://codecov.io/gh/auth0/ruby-auth0)
6
6
  [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/auth0/ruby-auth0/master/frames)
7
7
  [![MIT licensed](https://img.shields.io/dub/l/vibe-d.svg?style=flat)](https://github.com/auth0/ruby-auth0/blob/master/LICENSE)
8
8
 
@@ -11,8 +11,6 @@ Gem::Specification.new do |s|
11
11
  s.summary = 'Auth0 API Client'
12
12
  s.description = 'Ruby toolkit for Auth0 API https://auth0.com.'
13
13
 
14
- s.rubyforge_project = 'auth0'
15
-
16
14
  s.files = `git ls-files`.split("\n")
17
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
16
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
@@ -22,7 +20,7 @@ Gem::Specification.new do |s|
22
20
 
23
21
  s.add_development_dependency 'rake', '~> 10.4'
24
22
  s.add_development_dependency 'fuubar', '~> 2.0'
25
- s.add_development_dependency 'guard-rspec', '~> 4.5' unless ENV['TRAVIS']
23
+ s.add_development_dependency 'guard-rspec', '~> 4.5' unless ENV['CIRCLECI']
26
24
  s.add_development_dependency 'dotenv-rails', '~> 2.0'
27
25
  s.add_development_dependency 'pry', '~> 0.10'
28
26
  s.add_development_dependency 'pry-nav', '~> 0.2.4'
@@ -0,0 +1,22 @@
1
+ coverage:
2
+ precision: 2
3
+ round: down
4
+ range: "60...100"
5
+ status:
6
+ project:
7
+ default:
8
+ enabled: true
9
+ target: auto
10
+ threshold: 5%
11
+ if_no_uploads: error
12
+ patch:
13
+ default:
14
+ enabled: true
15
+ target: 80%
16
+ threshold: 30%
17
+ if_no_uploads: error
18
+ changes:
19
+ default:
20
+ enabled: true
21
+ if_no_uploads: error
22
+ comment: false
@@ -14,7 +14,7 @@ cd doc
14
14
  git init
15
15
 
16
16
  # inside this git repo we'll pretend to be a new user
17
- git config user.name "Travis CI"
17
+ git config user.name "Circle CI"
18
18
  git config user.email "build-documentation@auth0.com"
19
19
 
20
20
  # The first and only commit to this new Git repo contains all the
@@ -1,3 +1,4 @@
1
+ require 'auth0/api/v2/anomaly'
1
2
  require 'auth0/api/v2/blacklists'
2
3
  require 'auth0/api/v2/clients'
3
4
  require 'auth0/api/v2/client_grants'
@@ -6,6 +7,7 @@ require 'auth0/api/v2/device_credentials'
6
7
  require 'auth0/api/v2/emails'
7
8
  require 'auth0/api/v2/jobs'
8
9
  require 'auth0/api/v2/rules'
10
+ require 'auth0/api/v2/roles'
9
11
  require 'auth0/api/v2/stats'
10
12
  require 'auth0/api/v2/users'
11
13
  require 'auth0/api/v2/users_by_email'
@@ -19,6 +21,7 @@ module Auth0
19
21
  module Api
20
22
  # https://auth0.com/docs/apiv2
21
23
  module V2
24
+ include Auth0::Api::V2::Anomaly
22
25
  include Auth0::Api::V2::Blacklists
23
26
  include Auth0::Api::V2::Clients
24
27
  include Auth0::Api::V2::ClientGrants
@@ -27,6 +30,7 @@ module Auth0
27
30
  include Auth0::Api::V2::Emails
28
31
  include Auth0::Api::V2::Jobs
29
32
  include Auth0::Api::V2::Rules
33
+ include Auth0::Api::V2::Roles
30
34
  include Auth0::Api::V2::Stats
31
35
  include Auth0::Api::V2::Users
32
36
  include Auth0::Api::V2::UsersByEmail
@@ -0,0 +1,36 @@
1
+ module Auth0
2
+ module Api
3
+ module V2
4
+ # Methods to use the anomaly endpoints
5
+ module Anomaly
6
+ # Use this route to determine if a given IP is currently blocked
7
+ # by the failed login to multiple user accounts trigger.
8
+ # @see https://auth0.com/docs/api/management/v2#!/Anomaly/get_ips_by_id
9
+ # @param ip [string] The IP to check.
10
+ def check_if_ip_is_blocked(ip)
11
+ raise Auth0::InvalidParameter, 'Must specify an IP' if ip.to_s.empty?
12
+
13
+ path = "#{anomaly_path}/#{ip}"
14
+ get(path)
15
+ end
16
+
17
+ # Resets an IP that is currently blocked by the failed login to multiple user accounts trigger.
18
+ # @see https://auth0.com/docs/api/management/v2#!/Anomaly/delete_ips_by_id
19
+ # @param ip [string] The IP to remove block.
20
+ def remove_ip_block(ip)
21
+ raise Auth0::InvalidParameter, 'Must specify an IP' if ip.to_s.empty?
22
+
23
+ path = "#{anomaly_path}/#{ip}"
24
+ delete(path)
25
+ end
26
+
27
+ private
28
+
29
+ # Anomaly API path
30
+ def anomaly_path
31
+ @anomaly_path ||= '/api/v2/anomaly/blocks/ips'
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end