auth0 5.6.1 → 5.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -1
  3. data/.gitignore +0 -1
  4. data/CHANGELOG.md +11 -1
  5. data/Gemfile.lock +233 -0
  6. data/lib/auth0/api/v2/attack_protection.rb +79 -0
  7. data/lib/auth0/api/v2/organizations.rb +1 -1
  8. data/lib/auth0/api/v2.rb +2 -0
  9. data/lib/auth0/version.rb +1 -1
  10. data/spec/lib/auth0/api/v2/actions_spec.rb +13 -13
  11. data/spec/lib/auth0/api/v2/attack_protection_spec.rb +132 -0
  12. data/spec/lib/auth0/api/v2/blacklists_spec.rb +2 -2
  13. data/spec/lib/auth0/api/v2/branding_spec.rb +4 -3
  14. data/spec/lib/auth0/api/v2/client_grants_spec.rb +8 -8
  15. data/spec/lib/auth0/api/v2/clients_spec.rb +12 -12
  16. data/spec/lib/auth0/api/v2/connections_spec.rb +10 -10
  17. data/spec/lib/auth0/api/v2/device_credentials_spec.rb +4 -4
  18. data/spec/lib/auth0/api/v2/emails_spec.rb +2 -2
  19. data/spec/lib/auth0/api/v2/grants_spec.rb +10 -10
  20. data/spec/lib/auth0/api/v2/jobs_spec.rb +18 -17
  21. data/spec/lib/auth0/api/v2/log_streams_spec.rb +3 -3
  22. data/spec/lib/auth0/api/v2/logs_spec.rb +2 -2
  23. data/spec/lib/auth0/api/v2/organizations_spec.rb +13 -13
  24. data/spec/lib/auth0/api/v2/resource_servers_spec.rb +5 -5
  25. data/spec/lib/auth0/api/v2/roles_spec.rb +22 -22
  26. data/spec/lib/auth0/api/v2/rules_spec.rb +7 -7
  27. data/spec/lib/auth0/api/v2/stats_spec.rb +1 -1
  28. data/spec/lib/auth0/api/v2/tenants_spec.rb +1 -1
  29. data/spec/lib/auth0/api/v2/tickets_spec.rb +14 -14
  30. data/spec/lib/auth0/api/v2/user_blocks_spec.rb +2 -2
  31. data/spec/lib/auth0/api/v2/users_by_email_spec.rb +2 -2
  32. data/spec/lib/auth0/api/v2/users_spec.rb +23 -23
  33. metadata +7 -3
@@ -17,23 +17,23 @@ describe Auth0::Api::V2::Roles do
17
17
 
18
18
  it 'is expected to get Roles with default parameters' do
19
19
  expect(@instance).to receive(:get).with(
20
- '/api/v2/roles',
20
+ '/api/v2/roles', {
21
21
  per_page: nil,
22
22
  page: nil,
23
23
  include_totals: nil,
24
24
  name_filter: nil
25
- )
25
+ })
26
26
  expect { @instance.get_roles }.not_to raise_error
27
27
  end
28
28
 
29
29
  it 'is expected to get Roles with custom parameters' do
30
30
  expect(@instance).to receive(:get).with(
31
- '/api/v2/roles',
31
+ '/api/v2/roles', {
32
32
  per_page: 10,
33
33
  page: 3,
34
34
  include_totals: true,
35
35
  name_filter: 'test'
36
- )
36
+ })
37
37
  expect do
38
38
  @instance.get_roles(per_page: 10, page: 3, include_totals: true, name_filter: 'test')
39
39
  end.not_to raise_error
@@ -76,10 +76,10 @@ describe Auth0::Api::V2::Roles do
76
76
 
77
77
  it 'is expected to post a new Role' do
78
78
  expect(@instance).to receive(:post).with(
79
- '/api/v2/roles',
79
+ '/api/v2/roles', {
80
80
  name: 'ROLE_NAME',
81
81
  description: 'ROLE_DESCRIPTION'
82
- )
82
+ })
83
83
  expect do
84
84
  @instance.create_role(
85
85
  'ROLE_NAME',
@@ -103,10 +103,10 @@ describe Auth0::Api::V2::Roles do
103
103
 
104
104
  it 'is expected to post an updated Role' do
105
105
  expect(@instance).to receive(:patch).with(
106
- '/api/v2/roles/ROLE_ID',
106
+ '/api/v2/roles/ROLE_ID', {
107
107
  name: 'ROLE_NAME',
108
108
  description: 'ROLE_DESCRIPTION'
109
- )
109
+ })
110
110
  expect do
111
111
  @instance.update_role(
112
112
  'ROLE_ID',
@@ -149,25 +149,25 @@ describe Auth0::Api::V2::Roles do
149
149
 
150
150
  it 'is expected to get Users for a Role with default parameters' do
151
151
  expect(@instance).to receive(:get).with(
152
- '/api/v2/roles/ROLE_ID/users',
152
+ '/api/v2/roles/ROLE_ID/users', {
153
153
  per_page: nil,
154
154
  page: nil,
155
155
  from: nil,
156
156
  take: nil,
157
157
  include_totals: nil
158
- )
158
+ })
159
159
  expect { @instance.get_role_users('ROLE_ID') }.not_to raise_error
160
160
  end
161
161
 
162
162
  it 'is expected to get Users for a Role with custom parameters' do
163
163
  expect(@instance).to receive(:get).with(
164
- '/api/v2/roles/ROLE_ID/users',
164
+ '/api/v2/roles/ROLE_ID/users', {
165
165
  per_page: 30,
166
166
  page: 4,
167
167
  from: 'org_id',
168
168
  take: 50,
169
169
  include_totals: true
170
- )
170
+ })
171
171
  expect do
172
172
  @instance.get_role_users('ROLE_ID', per_page: 30, page: 4, from: 'org_id', take: 50, include_totals: true)
173
173
  end.not_to raise_error
@@ -202,9 +202,9 @@ describe Auth0::Api::V2::Roles do
202
202
 
203
203
  it 'is expected to add Users to a Role' do
204
204
  expect(@instance).to receive(:post).with(
205
- '/api/v2/roles/ROLE_ID/users',
205
+ '/api/v2/roles/ROLE_ID/users', {
206
206
  users: %w[test|user-01 test|user-02]
207
- )
207
+ })
208
208
  expect do
209
209
  @instance.add_role_users('ROLE_ID', %w[test|user-01 test|user-02])
210
210
  end.not_to raise_error
@@ -225,21 +225,21 @@ describe Auth0::Api::V2::Roles do
225
225
 
226
226
  it 'is expected to get Roles with default parameters' do
227
227
  expect(@instance).to receive(:get).with(
228
- '/api/v2/roles/ROLE_ID/permissions',
228
+ '/api/v2/roles/ROLE_ID/permissions', {
229
229
  per_page: nil,
230
230
  page: nil,
231
231
  include_totals: nil
232
- )
232
+ })
233
233
  expect { @instance.get_role_permissions('ROLE_ID') }.not_to raise_error
234
234
  end
235
235
 
236
236
  it 'is expected to get Roles with custom parameters' do
237
237
  expect(@instance).to receive(:get).with(
238
- '/api/v2/roles/ROLE_ID/permissions',
238
+ '/api/v2/roles/ROLE_ID/permissions', {
239
239
  per_page: 15,
240
240
  page: 5,
241
241
  include_totals: true
242
- )
242
+ })
243
243
  expect do
244
244
  @instance.get_role_permissions('ROLE_ID', per_page: 15, page: 5, include_totals: true)
245
245
  end.not_to raise_error
@@ -281,7 +281,7 @@ describe Auth0::Api::V2::Roles do
281
281
 
282
282
  it 'is expected to add permissions to a Role' do
283
283
  expect(@instance).to receive(:post).with(
284
- '/api/v2/roles/ROLE_ID/permissions',
284
+ '/api/v2/roles/ROLE_ID/permissions', {
285
285
  permissions: [
286
286
  {
287
287
  permission_name: 'permission-name-1',
@@ -292,7 +292,7 @@ describe Auth0::Api::V2::Roles do
292
292
  resource_server_identifier: 'server-id-2'
293
293
  }
294
294
  ]
295
- )
295
+ })
296
296
  expect do
297
297
  @instance.add_role_permissions(
298
298
  'ROLE_ID',
@@ -340,7 +340,7 @@ describe Auth0::Api::V2::Roles do
340
340
 
341
341
  it 'is expected to remove permissions from a Role' do
342
342
  expect(@instance).to receive(:delete_with_body).with(
343
- '/api/v2/roles/ROLE_ID/permissions',
343
+ '/api/v2/roles/ROLE_ID/permissions', {
344
344
  permissions: [
345
345
  {
346
346
  permission_name: 'permission-name-3',
@@ -351,7 +351,7 @@ describe Auth0::Api::V2::Roles do
351
351
  resource_server_identifier: 'server-id-4'
352
352
  }
353
353
  ]
354
- )
354
+ })
355
355
  expect do
356
356
  @instance.remove_role_permissions(
357
357
  'ROLE_ID',
@@ -12,27 +12,27 @@ describe Auth0::Api::V2::Rules do
12
12
 
13
13
  it 'is expected to call get /api/v2/rules' do
14
14
  expect(@instance).to receive(:get).with(
15
- '/api/v2/rules',
15
+ '/api/v2/rules', {
16
16
  enabled: nil,
17
17
  fields: nil,
18
18
  include_fields: nil,
19
19
  stage: nil,
20
20
  page: nil,
21
21
  per_page: nil
22
- )
22
+ })
23
23
  expect { @instance.rules }.not_to raise_error
24
24
  end
25
25
 
26
26
  it 'is expected to call get /api/v2/rules with pagination' do
27
27
  expect(@instance).to receive(:get).with(
28
- '/api/v2/rules',
28
+ '/api/v2/rules', {
29
29
  enabled: nil,
30
30
  fields: nil,
31
31
  include_fields: nil,
32
32
  stage: nil,
33
33
  page: 1,
34
34
  per_page: 2
35
- )
35
+ })
36
36
  expect {
37
37
  @instance.rules(page: 1, per_page: 2)
38
38
  }.not_to raise_error
@@ -43,7 +43,7 @@ describe Auth0::Api::V2::Rules do
43
43
  it { expect(@instance).to respond_to(:rule) }
44
44
  it 'is expected to call get /api/v2/rules/test' do
45
45
  expect(@instance).to receive(:get).with(
46
- '/api/v2/rules/test', fields: nil, include_fields: nil
46
+ '/api/v2/rules/test', { fields: nil, include_fields: nil }
47
47
  )
48
48
  expect { @instance.rule('test') }.not_to raise_error
49
49
  end
@@ -57,7 +57,7 @@ describe Auth0::Api::V2::Rules do
57
57
  it 'is expected to call post /api/v2/rules' do
58
58
  expect(@instance).to receive(:post).with(
59
59
  '/api/v2/rules',
60
- name: 'test', script: 'script', order: 'order', enabled: false, stage: 'login_success'
60
+ { name: 'test', script: 'script', order: 'order', enabled: false, stage: 'login_success' }
61
61
  )
62
62
  expect { @instance.create_rule('test', 'script', 'order', false) }.not_to raise_error
63
63
  end
@@ -72,7 +72,7 @@ describe Auth0::Api::V2::Rules do
72
72
  it { expect(@instance).to respond_to(:update_rule) }
73
73
  it 'is expected to call put /api/v2/rules/test' do
74
74
  expect(@instance).to receive(:patch).with(
75
- '/api/v2/rules/test', script: 'script', order: 'order', enabled: true, stage: 'some_stage'
75
+ '/api/v2/rules/test', { script: 'script', order: 'order', enabled: true, stage: 'some_stage' }
76
76
  )
77
77
  expect do
78
78
  @instance.update_rule('test', script: 'script', order: 'order', enabled: true, stage: 'some_stage')
@@ -15,7 +15,7 @@ describe Auth0::Api::V2::Stats do
15
15
  context '.daily_stats' do
16
16
  it { expect(@instance).to respond_to(:daily_stats) }
17
17
  it 'expect client to send get to /api/v2/stats/daily' do
18
- expect(@instance).to receive(:get).with('/api/v2/stats/daily', from: '20120222', to: '20151222')
18
+ expect(@instance).to receive(:get).with('/api/v2/stats/daily', { from: '20120222', to: '20151222' })
19
19
  expect { @instance.daily_stats('20120222', '20151222') }.not_to raise_error
20
20
  end
21
21
  end
@@ -7,7 +7,7 @@ describe Auth0::Api::V2::Tenants do
7
7
  context '.get_tenant_settings' do
8
8
  it { expect(@instance).to respond_to(:get_tenant_settings) }
9
9
  it 'expect client to send post to /api/v2/tenants/settings with fields' do
10
- expect(@instance).to receive(:get).with('/api/v2/tenants/settings', fields: 'field', include_fields: true)
10
+ expect(@instance).to receive(:get).with('/api/v2/tenants/settings', { fields: 'field', include_fields: true })
11
11
  expect { @instance.get_tenant_settings(fields: 'field') }.not_to raise_error
12
12
  end
13
13
  end
@@ -7,28 +7,28 @@ describe Auth0::Api::V2::Tickets do
7
7
  context '.post_email_verification' do
8
8
  it { expect(@instance).to respond_to(:post_email_verification) }
9
9
  it 'expect client to send post to /api/v2/tickets/email-verification with body' do
10
- expect(@instance).to receive(:post).with('/api/v2/tickets/email-verification', user_id: 'user_id',
11
- result_url: nil, ttl_sec: nil)
10
+ expect(@instance).to receive(:post).with('/api/v2/tickets/email-verification', { user_id: 'user_id',
11
+ result_url: nil, ttl_sec: nil })
12
12
  expect { @instance.post_email_verification('user_id') }.not_to raise_error
13
13
  end
14
14
  it 'expect client to accept integer ttl_sec' do
15
- expect(@instance).to receive(:post).with('/api/v2/tickets/email-verification', user_id: 'user_id',
16
- result_url: nil, ttl_sec: 300)
15
+ expect(@instance).to receive(:post).with('/api/v2/tickets/email-verification', { user_id: 'user_id',
16
+ result_url: nil, ttl_sec: 300 })
17
17
  expect { @instance.post_email_verification('user_id', ttl_sec: 300) }.not_to raise_error
18
18
  end
19
19
  it 'expect client to return nil when calling with a non-integer ttl_sec' do
20
- expect(@instance).to receive(:post).with('/api/v2/tickets/email-verification', user_id: 'user_id',
21
- result_url: nil, ttl_sec: nil)
20
+ expect(@instance).to receive(:post).with('/api/v2/tickets/email-verification', { user_id: 'user_id',
21
+ result_url: nil, ttl_sec: nil })
22
22
  expect { @instance.post_email_verification('user_id', ttl_sec: "noninteger") }.not_to raise_error
23
23
  end
24
24
  it 'expect client to accept hash identity' do
25
- expect(@instance).to receive(:post).with('/api/v2/tickets/email-verification', user_id: 'user_id',
25
+ expect(@instance).to receive(:post).with('/api/v2/tickets/email-verification', { user_id: 'user_id',
26
26
  result_url: nil,
27
27
  ttl_sec: nil,
28
28
  identity: {
29
29
  provider: "auth0",
30
30
  user_id: "user_id"
31
- })
31
+ }})
32
32
  expect {
33
33
  @instance.post_email_verification('user_id', identity: { provider: "auth0", user_id: "user_id"})
34
34
  }.not_to raise_error
@@ -48,7 +48,7 @@ describe Auth0::Api::V2::Tickets do
48
48
  context '.post_password_change' do
49
49
  it { expect(@instance).to respond_to(:post_password_change) }
50
50
  it 'expect client to send post to /api/v2/tickets/password-change with body' do
51
- expect(@instance).to receive(:post).with('/api/v2/tickets/password-change',
51
+ expect(@instance).to receive(:post).with('/api/v2/tickets/password-change', {
52
52
  result_url: nil,
53
53
  user_id: nil,
54
54
  connection_id: nil,
@@ -56,12 +56,12 @@ describe Auth0::Api::V2::Tickets do
56
56
  ttl_sec: nil,
57
57
  mark_email_as_verified: nil,
58
58
  includeEmailInRedirect: nil,
59
- new_password: nil)
59
+ new_password: nil })
60
60
  expect {@instance.post_password_change}.not_to raise_error
61
61
  end
62
62
 
63
63
  it 'expect client to accept organization_id' do
64
- expect(@instance).to receive(:post).with('/api/v2/tickets/password-change',
64
+ expect(@instance).to receive(:post).with('/api/v2/tickets/password-change', {
65
65
  result_url: nil,
66
66
  user_id: nil,
67
67
  connection_id: nil,
@@ -72,7 +72,7 @@ describe Auth0::Api::V2::Tickets do
72
72
  new_password: nil,
73
73
  client_id: '123',
74
74
  organization_id: '999'
75
- )
75
+ })
76
76
  expect {
77
77
  @instance.post_password_change(
78
78
  result_url: nil,
@@ -89,7 +89,7 @@ describe Auth0::Api::V2::Tickets do
89
89
  end
90
90
 
91
91
  it 'expect client to accept client_id' do
92
- expect(@instance).to receive(:post).with('/api/v2/tickets/password-change',
92
+ expect(@instance).to receive(:post).with('/api/v2/tickets/password-change', {
93
93
  result_url: nil,
94
94
  user_id: nil,
95
95
  connection_id: nil,
@@ -99,7 +99,7 @@ describe Auth0::Api::V2::Tickets do
99
99
  includeEmailInRedirect: nil,
100
100
  new_password: nil,
101
101
  client_id: '123'
102
- )
102
+ })
103
103
  expect {
104
104
  @instance.post_password_change(
105
105
  result_url: nil,
@@ -9,7 +9,7 @@ describe Auth0::Api::V2::UserBlocks do
9
9
  context '.user_blocks' do
10
10
  it { expect(@instance).to respond_to(:user_blocks) }
11
11
  it 'is expected to call /api/v2/user-blocks?identifier=Test' do
12
- expect(@instance).to receive(:get).with('/api/v2/user-blocks', identifier: 'Test')
12
+ expect(@instance).to receive(:get).with('/api/v2/user-blocks', { identifier: 'Test' })
13
13
  expect { @instance.user_blocks('Test') }.not_to raise_error
14
14
  end
15
15
  it 'expect client to raise an error when calling with empty identifier' do
@@ -20,7 +20,7 @@ describe Auth0::Api::V2::UserBlocks do
20
20
  context '.delete_user_blocks' do
21
21
  it { expect(@instance).to respond_to(:delete_user_blocks) }
22
22
  it 'is expected to call /api/v2/user-blocks?identifier=Test' do
23
- expect(@instance).to receive(:delete).with('/api/v2/user-blocks', identifier: 'Test')
23
+ expect(@instance).to receive(:delete).with('/api/v2/user-blocks', { identifier: 'Test' })
24
24
  expect { @instance.delete_user_blocks('Test') }.not_to raise_error
25
25
  end
26
26
  it 'expect client to raise an error when calling with empty identifier' do
@@ -10,11 +10,11 @@ describe Auth0::Api::V2::UsersByEmail do
10
10
  it { expect(@instance).to respond_to(:users_by_email) }
11
11
  it 'is expected to call /api/v2/users-by-email' do
12
12
  expect(@instance).to receive(:get).with(
13
- '/api/v2/users-by-email',
13
+ '/api/v2/users-by-email', {
14
14
  fields: nil,
15
15
  include_fields: nil,
16
16
  email: 'email'
17
- )
17
+ })
18
18
  expect { @instance.users_by_email('email') }.not_to raise_error
19
19
  end
20
20
  end
@@ -17,7 +17,7 @@ describe Auth0::Api::V2::Users do
17
17
 
18
18
  it 'is expected to get /api/v2/users' do
19
19
  expect(@instance).to receive(:get).with(
20
- '/api/v2/users',
20
+ '/api/v2/users', {
21
21
  per_page: nil,
22
22
  page: nil,
23
23
  include_totals: nil,
@@ -27,13 +27,13 @@ describe Auth0::Api::V2::Users do
27
27
  include_fields: nil,
28
28
  q: nil,
29
29
  search_engine: nil
30
- )
30
+ })
31
31
  expect { @instance.users }.not_to raise_error
32
32
  end
33
33
 
34
34
  it 'is expected to get /api/v2/users with custom parameters' do
35
35
  expect(@instance).to receive(:get).with(
36
- '/api/v2/users',
36
+ '/api/v2/users', {
37
37
  per_page: 10,
38
38
  page: 1,
39
39
  include_totals: true,
@@ -43,7 +43,7 @@ describe Auth0::Api::V2::Users do
43
43
  include_fields: nil,
44
44
  q: nil,
45
45
  search_engine: 'v3'
46
- )
46
+ })
47
47
  expect do
48
48
  @instance.users(
49
49
  search_engine: 'v3',
@@ -64,10 +64,10 @@ describe Auth0::Api::V2::Users do
64
64
 
65
65
  it 'is expected to call get request to /api/v2/users/USER_ID' do
66
66
  expect(@instance).to receive(:get).with(
67
- '/api/v2/users/USER_ID',
67
+ '/api/v2/users/USER_ID', {
68
68
  fields: nil,
69
69
  include_fields: true
70
- )
70
+ })
71
71
  expect { @instance.user('USER_ID') }.not_to raise_error
72
72
  end
73
73
 
@@ -83,11 +83,11 @@ describe Auth0::Api::V2::Users do
83
83
 
84
84
  it 'is expected to post to /api/v2/users' do
85
85
  expect(@instance).to receive(:post).with(
86
- '/api/v2/users',
86
+ '/api/v2/users', {
87
87
  email: 'test@test.com',
88
88
  password: 'password',
89
89
  connection: 'conn'
90
- )
90
+ })
91
91
  expect do
92
92
  @instance.create_user(
93
93
  'conn',
@@ -169,12 +169,12 @@ describe Auth0::Api::V2::Users do
169
169
 
170
170
  it 'is expected to patch /api/v2/users/USER_ID' do
171
171
  expect(@instance).to receive(:patch).with(
172
- '/api/v2/users/USER_ID',
172
+ '/api/v2/users/USER_ID', {
173
173
  email: 'test@test.com',
174
174
  password: 'password',
175
175
  connection: 'conn',
176
176
  name: 'name'
177
- )
177
+ })
178
178
  @instance.patch_user(
179
179
  'USER_ID',
180
180
  email: 'test@test.com',
@@ -199,7 +199,7 @@ describe Auth0::Api::V2::Users do
199
199
  end
200
200
 
201
201
  it 'is expected to post to /api/v2/users/UserId/identities' do
202
- expect(@instance).to receive(:post).with('/api/v2/users/USER_ID/identities', body: 'json body')
202
+ expect(@instance).to receive(:post).with('/api/v2/users/USER_ID/identities', { body: 'json body' })
203
203
  @instance.link_user_account('USER_ID', body: 'json body')
204
204
  end
205
205
 
@@ -255,12 +255,12 @@ describe Auth0::Api::V2::Users do
255
255
 
256
256
  it 'is expected to get /api/v2/USER_ID/logs' do
257
257
  expect(@instance).to receive(:get).with(
258
- '/api/v2/users/USER_ID/logs',
258
+ '/api/v2/users/USER_ID/logs', {
259
259
  per_page: nil,
260
260
  page: nil,
261
261
  include_totals: nil,
262
262
  sort: nil
263
- )
263
+ })
264
264
  expect { @instance.user_logs('USER_ID') }.not_to raise_error
265
265
  end
266
266
 
@@ -292,21 +292,21 @@ describe Auth0::Api::V2::Users do
292
292
 
293
293
  it 'is expected to get roles with default parameters' do
294
294
  expect(@instance).to receive(:get).with(
295
- '/api/v2/users/USER_ID/roles',
295
+ '/api/v2/users/USER_ID/roles', {
296
296
  per_page: nil,
297
297
  page: nil,
298
298
  include_totals: nil
299
- )
299
+ })
300
300
  expect { @instance.get_user_roles('USER_ID') }.not_to raise_error
301
301
  end
302
302
 
303
303
  it 'is expected to get roles with custom parameters' do
304
304
  expect(@instance).to receive(:get).with(
305
- '/api/v2/users/USER_ID/roles',
305
+ '/api/v2/users/USER_ID/roles', {
306
306
  per_page: 20,
307
307
  page: 2,
308
308
  include_totals: true
309
- )
309
+ })
310
310
  expect do
311
311
  @instance.get_user_roles('USER_ID', per_page: 20, page: 2, include_totals: true)
312
312
  end.not_to raise_error
@@ -401,11 +401,11 @@ describe Auth0::Api::V2::Users do
401
401
 
402
402
  it 'is expected to get permissions' do
403
403
  expect(@instance).to receive(:get).with(
404
- '/api/v2/users/USER_ID/permissions',
404
+ '/api/v2/users/USER_ID/permissions', {
405
405
  per_page: nil,
406
406
  page: nil,
407
407
  include_totals: nil,
408
- )
408
+ })
409
409
  expect do
410
410
  @instance.get_user_permissions('USER_ID')
411
411
  end.not_to raise_error
@@ -413,11 +413,11 @@ describe Auth0::Api::V2::Users do
413
413
 
414
414
  it 'is expected to get permissions with custom parameters' do
415
415
  expect(@instance).to receive(:get).with(
416
- '/api/v2/users/USER_ID/permissions',
416
+ '/api/v2/users/USER_ID/permissions', {
417
417
  per_page: 10,
418
418
  page: 3,
419
419
  include_totals: true
420
- )
420
+ })
421
421
  expect do
422
422
  @instance.get_user_permissions('USER_ID', per_page: 10, page: 3, include_totals: true)
423
423
  end.not_to raise_error
@@ -445,7 +445,7 @@ describe Auth0::Api::V2::Users do
445
445
 
446
446
  it 'is expected to remove permissions' do
447
447
  expect(@instance).to receive(:delete_with_body).with(
448
- '/api/v2/users/USER_ID/permissions',
448
+ '/api/v2/users/USER_ID/permissions', {
449
449
  permissions: [
450
450
  {
451
451
  permission_name: 'permission-name-1',
@@ -456,7 +456,7 @@ describe Auth0::Api::V2::Users do
456
456
  resource_server_identifier: 'server-id-2'
457
457
  }
458
458
  ]
459
- )
459
+ })
460
460
  expect do
461
461
  @instance.remove_user_permissions(
462
462
  'USER_ID',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth0
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.1
4
+ version: 5.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Auth0
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-11-09 00:00:00.000000000 Z
14
+ date: 2022-02-17 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rest-client
@@ -292,6 +292,7 @@ files:
292
292
  - DEPLOYMENT.md
293
293
  - Dockerfile
294
294
  - Gemfile
295
+ - Gemfile.lock
295
296
  - Guardfile
296
297
  - LICENSE
297
298
  - README.md
@@ -372,6 +373,7 @@ files:
372
373
  - lib/auth0/api/v2.rb
373
374
  - lib/auth0/api/v2/actions.rb
374
375
  - lib/auth0/api/v2/anomaly.rb
376
+ - lib/auth0/api/v2/attack_protection.rb
375
377
  - lib/auth0/api/v2/blacklists.rb
376
378
  - lib/auth0/api/v2/branding.rb
377
379
  - lib/auth0/api/v2/client_grants.rb
@@ -588,6 +590,7 @@ files:
588
590
  - spec/integration/lib/auth0/auth0_client_spec.rb
589
591
  - spec/lib/auth0/api/v2/actions_spec.rb
590
592
  - spec/lib/auth0/api/v2/anomaly_spec.rb
593
+ - spec/lib/auth0/api/v2/attack_protection_spec.rb
591
594
  - spec/lib/auth0/api/v2/blacklists_spec.rb
592
595
  - spec/lib/auth0/api/v2/branding_spec.rb
593
596
  - spec/lib/auth0/api/v2/client_grants_spec.rb
@@ -643,7 +646,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
643
646
  - !ruby/object:Gem::Version
644
647
  version: '0'
645
648
  requirements: []
646
- rubygems_version: 3.1.4
649
+ rubygems_version: 3.2.22
647
650
  signing_key:
648
651
  specification_version: 4
649
652
  summary: Auth0 API Client
@@ -827,6 +830,7 @@ test_files:
827
830
  - spec/integration/lib/auth0/auth0_client_spec.rb
828
831
  - spec/lib/auth0/api/v2/actions_spec.rb
829
832
  - spec/lib/auth0/api/v2/anomaly_spec.rb
833
+ - spec/lib/auth0/api/v2/attack_protection_spec.rb
830
834
  - spec/lib/auth0/api/v2/blacklists_spec.rb
831
835
  - spec/lib/auth0/api/v2/branding_spec.rb
832
836
  - spec/lib/auth0/api/v2/client_grants_spec.rb