auth0 5.18.0 → 5.18.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6bc03a5197ed3cf51db9076e4d7429e56a418f94eb440b7f69c1542f1014a7cf
4
- data.tar.gz: bb4f921acd2af07f5139b0920064265a539e61862827dac10e5f39988297fbf4
3
+ metadata.gz: f9f09b3cbb82970d76ce07a4e20b7791059f9e6c8874e8c7723b9e02fa2f7221
4
+ data.tar.gz: ac5451e6f51c813f40ad9f233253a9d3556e7aa4a1908aec8d6ed95b3a1a99a9
5
5
  SHA512:
6
- metadata.gz: '08beebcb81144352182b6af63c5745d55abcf22ef30fee4928141a89c24f61cd5d81414f63f76f6cf6bd9935b5c49d5fe83b92b29298800fefd4a5bd1a2efa87'
7
- data.tar.gz: ac02d18db80d57720502db87c88ab4c3f8d07ef00d2f9792e8e41ae383d5d28082523f2d7cd735cfb2b6f7ec94d39ab8a42856b86fae151b838ad0569cc82dcb
6
+ metadata.gz: fdaf8bf8869532464bd71f51fbba1503e1d529d9fd06e35a9d88dc346400858a60c4b0de7a85b2a079f45fec342e62fca3042c8872ad3cdd48efa6d27dba1f04
7
+ data.tar.gz: f43c6fc7a97a0ff55acd7b92f7f6376a52877f3988219b102c8c69625e753ca7540f50be464771f137b4e45e577a4665ee44f87e493c3f814d7d1e74636f1d00
@@ -36,18 +36,18 @@ jobs:
36
36
  run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
37
37
 
38
38
  - name: Checkout
39
- uses: actions/checkout@v4
39
+ uses: actions/checkout@v6
40
40
 
41
41
  - name: Initialize CodeQL
42
- uses: github/codeql-action/init@v3
42
+ uses: github/codeql-action/init@v4
43
43
  with:
44
44
  languages: ${{ matrix.language }}
45
45
  queries: +security-and-quality
46
46
 
47
47
  - name: Autobuild
48
- uses: github/codeql-action/autobuild@v3
48
+ uses: github/codeql-action/autobuild@v4
49
49
 
50
50
  - name: Perform CodeQL Analysis
51
- uses: github/codeql-action/analyze@v3
51
+ uses: github/codeql-action/analyze@v4
52
52
  with:
53
53
  category: "/language:${{ matrix.language }}"
@@ -29,7 +29,7 @@ jobs:
29
29
 
30
30
  steps:
31
31
  - name: Checkout code
32
- uses: actions/checkout@v4
32
+ uses: actions/checkout@v6
33
33
 
34
34
  - name: Configure Ruby
35
35
  uses: ./.github/actions/setup
@@ -20,7 +20,7 @@ jobs:
20
20
 
21
21
  steps:
22
22
  # Checkout the code
23
- - uses: actions/checkout@v4
23
+ - uses: actions/checkout@v6
24
24
  with:
25
25
  fetch-depth: 0
26
26
 
@@ -31,7 +31,7 @@ jobs:
31
31
  - if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
32
32
  run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
33
33
 
34
- - uses: actions/checkout@v4
34
+ - uses: actions/checkout@v6
35
35
  with:
36
36
  ref: ${{ github.event.pull_request.head.sha || github.ref }}
37
37
 
@@ -29,7 +29,7 @@ jobs:
29
29
  - if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
30
30
  run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
31
31
 
32
- - uses: actions/checkout@v4
32
+ - uses: actions/checkout@v6
33
33
  with:
34
34
  ref: ${{ github.event.pull_request.head.sha || github.ref }}
35
35
 
@@ -29,7 +29,7 @@ jobs:
29
29
  matrix: ${{ steps.set-matrix.outputs.matrix }}
30
30
 
31
31
  steps:
32
- - uses: actions/checkout@v4
32
+ - uses: actions/checkout@v6
33
33
  with:
34
34
  ref: ${{ github.event.pull_request.head.sha || github.ref }}
35
35
 
@@ -54,7 +54,7 @@ jobs:
54
54
 
55
55
  steps:
56
56
  - name: Checkout code
57
- uses: actions/checkout@v4
57
+ uses: actions/checkout@v6
58
58
 
59
59
  - name: Configure Ruby
60
60
  uses: ./.github/actions/setup
@@ -66,4 +66,4 @@ jobs:
66
66
 
67
67
  - name: Upload coverage
68
68
  if: matrix.ruby == '3.2' || matrix.ruby == '3.3'
69
- uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # pin@3.1.5
69
+ uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # pin@5.5.2
data/.snyk CHANGED
@@ -9,3 +9,9 @@ ignore:
9
9
  - dotenv-rails > railties > actionpack > rack-test:
10
10
  reason: No direct upgrade available
11
11
  expires: "2023-11-02T12:00:00.000Z"
12
+ snyk:lic:rubygems:json:Ruby:
13
+ - '*':
14
+ reason: Ruby standard library gem, Ruby license is acceptable
15
+ snyk:lic:rubygems:reline:Ruby:
16
+ - '*':
17
+ reason: Ruby standard library gem, Ruby license is acceptable
data/.version CHANGED
@@ -1 +1 @@
1
- v5.18.0
1
+ v5.18.1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Change Log
2
2
 
3
+ ## [v5.18.1](https://github.com/auth0/ruby-auth0/tree/v5.18.1) (2026-03-13)
4
+ [Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.18.0...v5.18.1)
5
+
6
+ **Changed**
7
+ - chore(deps): bump zache from 0.15.0 to 0.15.2 [\#691](https://github.com/auth0/ruby-auth0/pull/691) ([dependabot[bot]](https://github.com/apps/dependabot))
8
+ - chore(deps): bump jwt from 2.9.3 to 2.10.2 [\#682](https://github.com/auth0/ruby-auth0/pull/682) ([dependabot[bot]](https://github.com/apps/dependabot))
9
+ - chore(deps): bump addressable from 2.8.7 to 2.8.8 [\#686](https://github.com/auth0/ruby-auth0/pull/686) ([dependabot[bot]](https://github.com/apps/dependabot))
10
+ - chore(deps): bump zache from 0.13.2 to 0.15.0 [\#649](https://github.com/auth0/ruby-auth0/pull/649) ([dependabot[bot]](https://github.com/apps/dependabot))
11
+
12
+ **Fixed**
13
+ - fix deleting array content when passing an array as payload [\#697](https://github.com/auth0/ruby-auth0/pull/697) ([carlastabile](https://github.com/carlastabile))
14
+
15
+ **Security**
16
+ - fix(deps): upgrade dev dependencies to resolve Snyk security vulnerab… [\#704](https://github.com/auth0/ruby-auth0/pull/704) ([arpit-jn](https://github.com/arpit-jn))
17
+
3
18
  ## [v5.18.0](https://github.com/auth0/ruby-auth0/tree/v5.18.0) (2024-11-25)
4
19
  [Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.17.0...v5.18.0)
5
20
 
data/Gemfile CHANGED
@@ -5,10 +5,8 @@ gemspec
5
5
 
6
6
  group :development do
7
7
  gem 'terminal-notifier-guard', require: false unless ENV['CIRCLECI']
8
- gem 'coveralls', require: false
9
8
  gem 'rubocop', require: false
10
9
  gem 'rubocop-rails', require: false
11
- gem 'irb', require: false
12
10
  end
13
11
 
14
12
  group :test do
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- auth0 (5.18.0)
4
+ auth0 (5.18.1)
5
5
  addressable (~> 2.8)
6
6
  jwt (~> 2.7)
7
7
  rest-client (~> 2.1)
@@ -11,83 +11,56 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actionpack (8.0.0)
15
- actionview (= 8.0.0)
16
- activesupport (= 8.0.0)
17
- nokogiri (>= 1.8.5)
18
- rack (>= 2.2.4)
19
- rack-session (>= 1.0.1)
20
- rack-test (>= 0.6.3)
21
- rails-dom-testing (~> 2.2)
22
- rails-html-sanitizer (~> 1.6)
23
- useragent (~> 0.16)
24
- actionview (8.0.0)
25
- activesupport (= 8.0.0)
26
- builder (~> 3.1)
27
- erubi (~> 1.11)
28
- rails-dom-testing (~> 2.2)
29
- rails-html-sanitizer (~> 1.6)
30
- activesupport (8.0.0)
14
+ activesupport (8.1.2)
31
15
  base64
32
- benchmark (>= 0.3)
33
16
  bigdecimal
34
17
  concurrent-ruby (~> 1.0, >= 1.3.1)
35
18
  connection_pool (>= 2.2.5)
36
19
  drb
37
20
  i18n (>= 1.6, < 2)
21
+ json
38
22
  logger (>= 1.4.2)
39
23
  minitest (>= 5.1)
40
24
  securerandom (>= 0.3)
41
25
  tzinfo (~> 2.0, >= 2.0.5)
42
26
  uri (>= 0.13.1)
43
- addressable (2.8.7)
44
- public_suffix (>= 2.0.2, < 7.0)
45
- ast (2.4.2)
46
- base64 (0.2.0)
47
- benchmark (0.4.0)
48
- bigdecimal (3.1.8)
49
- builder (3.3.0)
27
+ addressable (2.8.9)
28
+ public_suffix (>= 2.0.2, < 8.0)
29
+ ast (2.4.3)
30
+ base64 (0.3.0)
31
+ bigdecimal (4.0.1)
50
32
  coderay (1.1.3)
51
- concurrent-ruby (1.3.4)
52
- connection_pool (2.4.1)
53
- coveralls (0.7.1)
54
- multi_json (~> 1.3)
55
- rest-client
56
- simplecov (>= 0.7)
57
- term-ansicolor
58
- thor
59
- crack (1.0.0)
33
+ concurrent-ruby (1.3.6)
34
+ connection_pool (3.0.2)
35
+ crack (1.0.1)
60
36
  bigdecimal
61
37
  rexml
62
- crass (1.0.6)
63
- diff-lcs (1.5.1)
38
+ diff-lcs (1.6.2)
64
39
  docile (1.4.1)
65
40
  domain_name (0.6.20240107)
66
- dotenv (2.8.1)
67
- dotenv-rails (2.8.1)
68
- dotenv (= 2.8.1)
69
- railties (>= 3.2)
70
- drb (2.2.1)
71
- erubi (1.13.0)
41
+ dotenv (3.2.0)
42
+ drb (2.2.3)
72
43
  faker (2.23.0)
73
44
  i18n (>= 1.8.11, < 2)
74
- ffi (1.17.0-aarch64-linux-gnu)
75
- ffi (1.17.0-aarch64-linux-musl)
76
- ffi (1.17.0-arm-linux-gnu)
77
- ffi (1.17.0-arm-linux-musl)
78
- ffi (1.17.0-arm64-darwin)
79
- ffi (1.17.0-x86-linux-gnu)
80
- ffi (1.17.0-x86-linux-musl)
81
- ffi (1.17.0-x86_64-darwin)
82
- ffi (1.17.0-x86_64-linux-gnu)
83
- ffi (1.17.0-x86_64-linux-musl)
84
- formatador (1.1.0)
45
+ ffi (1.17.3-aarch64-linux-gnu)
46
+ ffi (1.17.3-aarch64-linux-musl)
47
+ ffi (1.17.3-arm-linux-gnu)
48
+ ffi (1.17.3-arm-linux-musl)
49
+ ffi (1.17.3-arm64-darwin)
50
+ ffi (1.17.3-x86-linux-gnu)
51
+ ffi (1.17.3-x86-linux-musl)
52
+ ffi (1.17.3-x86_64-darwin)
53
+ ffi (1.17.3-x86_64-linux-gnu)
54
+ ffi (1.17.3-x86_64-linux-musl)
55
+ formatador (1.2.3)
56
+ reline
85
57
  fuubar (2.5.1)
86
58
  rspec-core (~> 3.0)
87
59
  ruby-progressbar (~> 1.4)
88
- guard (2.19.0)
60
+ guard (2.20.1)
89
61
  formatador (>= 0.2.4)
90
62
  listen (>= 2.7, < 4.0)
63
+ logger (~> 1.6)
91
64
  lumberjack (>= 1.0.12, < 2.0)
92
65
  nenv (~> 0.1)
93
66
  notiffany (~> 0.0)
@@ -99,97 +72,64 @@ GEM
99
72
  guard (~> 2.1)
100
73
  guard-compat (~> 1.1)
101
74
  rspec (>= 2.99.0, < 4.0)
102
- hashdiff (1.1.2)
75
+ hashdiff (1.2.1)
103
76
  http-accept (1.7.0)
104
- http-cookie (1.0.7)
77
+ http-cookie (1.1.0)
105
78
  domain_name (~> 0.5)
106
- i18n (1.14.6)
79
+ i18n (1.14.8)
107
80
  concurrent-ruby (~> 1.0)
108
- io-console (0.7.2)
109
- irb (1.14.1)
110
- rdoc (>= 4.0.0)
111
- reline (>= 0.4.2)
112
- json (2.8.2)
113
- jwt (2.9.3)
81
+ io-console (0.8.2)
82
+ json (2.19.1)
83
+ json-schema (6.2.0)
84
+ addressable (~> 2.8)
85
+ bigdecimal (>= 3.1, < 5)
86
+ jwt (2.10.2)
114
87
  base64
115
- language_server-protocol (3.17.0.3)
116
- listen (3.9.0)
88
+ language_server-protocol (3.17.0.5)
89
+ lint_roller (1.1.0)
90
+ listen (3.10.0)
91
+ logger
117
92
  rb-fsevent (~> 0.10, >= 0.10.3)
118
93
  rb-inotify (~> 0.9, >= 0.9.10)
119
- logger (1.6.1)
120
- loofah (2.23.1)
121
- crass (~> 1.0.2)
122
- nokogiri (>= 1.12.0)
123
- lumberjack (1.2.10)
94
+ logger (1.7.0)
95
+ lumberjack (1.4.2)
96
+ mcp (0.8.0)
97
+ json-schema (>= 4.1)
124
98
  method_source (1.1.0)
125
- mime-types (3.6.0)
99
+ mime-types (3.7.0)
126
100
  logger
127
- mime-types-data (~> 3.2015)
128
- mime-types-data (3.2024.1105)
129
- minitest (5.25.2)
130
- multi_json (1.15.0)
101
+ mime-types-data (~> 3.2025, >= 3.2025.0507)
102
+ mime-types-data (3.2026.0303)
103
+ minitest (6.0.2)
104
+ drb (~> 2.0)
105
+ prism (~> 1.5)
131
106
  nenv (0.3.0)
132
107
  netrc (0.11.0)
133
- nokogiri (1.16.7-aarch64-linux)
134
- racc (~> 1.4)
135
- nokogiri (1.16.7-arm-linux)
136
- racc (~> 1.4)
137
- nokogiri (1.16.7-arm64-darwin)
138
- racc (~> 1.4)
139
- nokogiri (1.16.7-x86-linux)
140
- racc (~> 1.4)
141
- nokogiri (1.16.7-x86_64-darwin)
142
- racc (~> 1.4)
143
- nokogiri (1.16.7-x86_64-linux)
144
- racc (~> 1.4)
145
108
  notiffany (0.1.3)
146
109
  nenv (~> 0.1)
147
110
  shellany (~> 0.0)
148
- parallel (1.26.3)
149
- parser (3.3.6.0)
111
+ parallel (1.27.0)
112
+ parser (3.3.10.2)
150
113
  ast (~> 2.4.1)
151
114
  racc
152
- pp (0.6.1)
115
+ pp (0.6.3)
153
116
  prettyprint
154
117
  prettyprint (0.2.0)
155
- pry (0.15.0)
118
+ prism (1.9.0)
119
+ pry (0.16.0)
156
120
  coderay (~> 1.1)
157
121
  method_source (~> 1.0)
158
- psych (5.2.0)
159
- stringio
160
- public_suffix (6.0.1)
122
+ reline (>= 0.6.0)
123
+ public_suffix (7.0.5)
161
124
  racc (1.8.1)
162
- rack (3.1.8)
163
- rack-session (2.0.0)
164
- rack (>= 3.0.0)
165
- rack-test (2.1.0)
166
- rack (>= 1.3)
167
- rackup (2.2.1)
168
- rack (>= 3)
169
- rails-dom-testing (2.2.0)
170
- activesupport (>= 5.0.0)
171
- minitest
172
- nokogiri (>= 1.6)
173
- rails-html-sanitizer (1.6.0)
174
- loofah (~> 2.21)
175
- nokogiri (~> 1.14)
176
- railties (8.0.0)
177
- actionpack (= 8.0.0)
178
- activesupport (= 8.0.0)
179
- irb (~> 1.13)
180
- rackup (>= 1.0.0)
181
- rake (>= 12.2)
182
- thor (~> 1.0, >= 1.2.2)
183
- zeitwerk (~> 2.6)
125
+ rack (3.2.5)
184
126
  rainbow (3.1.1)
185
- rake (13.2.1)
127
+ rake (13.3.1)
186
128
  rb-fsevent (0.11.2)
187
129
  rb-inotify (0.11.1)
188
130
  ffi (~> 1.0)
189
- rdoc (6.8.1)
190
- psych (>= 4.0.0)
191
- regexp_parser (2.9.2)
192
- reline (0.5.11)
131
+ regexp_parser (2.11.3)
132
+ reline (0.6.3)
193
133
  io-console (~> 0.5)
194
134
  rest-client (2.1.0)
195
135
  http-accept (>= 1.7.0, < 2.0)
@@ -197,72 +137,68 @@ GEM
197
137
  mime-types (>= 1.16, < 4.0)
198
138
  netrc (~> 0.8)
199
139
  retryable (3.0.5)
200
- rexml (3.3.9)
201
- rspec (3.13.0)
140
+ rexml (3.4.4)
141
+ rspec (3.13.2)
202
142
  rspec-core (~> 3.13.0)
203
143
  rspec-expectations (~> 3.13.0)
204
144
  rspec-mocks (~> 3.13.0)
205
- rspec-core (3.13.2)
145
+ rspec-core (3.13.6)
206
146
  rspec-support (~> 3.13.0)
207
- rspec-expectations (3.13.3)
147
+ rspec-expectations (3.13.5)
208
148
  diff-lcs (>= 1.2.0, < 2.0)
209
149
  rspec-support (~> 3.13.0)
210
- rspec-mocks (3.13.2)
150
+ rspec-mocks (3.13.8)
211
151
  diff-lcs (>= 1.2.0, < 2.0)
212
152
  rspec-support (~> 3.13.0)
213
- rspec-support (3.13.1)
214
- rubocop (1.68.0)
153
+ rspec-support (3.13.7)
154
+ rubocop (1.85.1)
215
155
  json (~> 2.3)
216
- language_server-protocol (>= 3.17.0)
156
+ language_server-protocol (~> 3.17.0.2)
157
+ lint_roller (~> 1.1.0)
158
+ mcp (~> 0.6)
217
159
  parallel (~> 1.10)
218
160
  parser (>= 3.3.0.2)
219
161
  rainbow (>= 2.2.2, < 4.0)
220
- regexp_parser (>= 2.4, < 3.0)
221
- rubocop-ast (>= 1.32.2, < 2.0)
162
+ regexp_parser (>= 2.9.3, < 3.0)
163
+ rubocop-ast (>= 1.49.0, < 2.0)
222
164
  ruby-progressbar (~> 1.7)
223
- unicode-display_width (>= 2.4.0, < 3.0)
224
- rubocop-ast (1.36.1)
225
- parser (>= 3.3.1.0)
226
- rubocop-rails (2.27.0)
165
+ unicode-display_width (>= 2.4.0, < 4.0)
166
+ rubocop-ast (1.49.1)
167
+ parser (>= 3.3.7.2)
168
+ prism (~> 1.7)
169
+ rubocop-rails (2.34.3)
227
170
  activesupport (>= 4.2.0)
171
+ lint_roller (~> 1.1)
228
172
  rack (>= 1.1)
229
- rubocop (>= 1.52.0, < 2.0)
230
- rubocop-ast (>= 1.31.1, < 2.0)
173
+ rubocop (>= 1.75.0, < 2.0)
174
+ rubocop-ast (>= 1.44.0, < 2.0)
231
175
  ruby-progressbar (1.13.0)
232
- securerandom (0.3.2)
176
+ securerandom (0.4.1)
233
177
  shellany (0.0.1)
234
178
  simplecov (0.22.0)
235
179
  docile (~> 1.1)
236
180
  simplecov-html (~> 0.11)
237
181
  simplecov_json_formatter (~> 0.1)
238
- simplecov-cobertura (2.1.0)
182
+ simplecov-cobertura (3.1.0)
239
183
  rexml
240
184
  simplecov (~> 0.19)
241
- simplecov-html (0.13.1)
185
+ simplecov-html (0.13.2)
242
186
  simplecov_json_formatter (0.1.4)
243
- stringio (3.1.2)
244
- sync (0.5.0)
245
- term-ansicolor (1.11.2)
246
- tins (~> 1.0)
247
187
  terminal-notifier-guard (1.7.0)
248
- thor (1.3.2)
188
+ thor (1.5.0)
249
189
  timecop (0.9.10)
250
- tins (1.37.0)
251
- bigdecimal
252
- sync
253
190
  tzinfo (2.0.6)
254
191
  concurrent-ruby (~> 1.0)
255
- unicode-display_width (2.6.0)
256
- uri (1.0.2)
257
- useragent (0.16.10)
258
- vcr (6.3.1)
259
- base64
260
- webmock (3.24.0)
192
+ unicode-display_width (3.2.0)
193
+ unicode-emoji (~> 4.1)
194
+ unicode-emoji (4.2.0)
195
+ uri (1.1.1)
196
+ vcr (6.4.0)
197
+ webmock (3.26.1)
261
198
  addressable (>= 2.8.0)
262
199
  crack (>= 0.3.2)
263
200
  hashdiff (>= 0.4.0, < 2.0.0)
264
- zache (0.13.2)
265
- zeitwerk (2.7.1)
201
+ zache (0.15.2)
266
202
 
267
203
  PLATFORMS
268
204
  aarch64-linux
@@ -283,12 +219,10 @@ PLATFORMS
283
219
  DEPENDENCIES
284
220
  auth0!
285
221
  bundler
286
- coveralls
287
- dotenv-rails (~> 2.0)
222
+ dotenv (~> 3.0)
288
223
  faker (~> 2.0)
289
224
  fuubar (~> 2.0)
290
225
  guard-rspec (~> 4.5)
291
- irb
292
226
  pp
293
227
  rake (~> 13.0)
294
228
  rspec (~> 3.11)
data/README.md CHANGED
@@ -7,6 +7,7 @@ Ruby API client for the [Auth0](https://auth0.com) platform.
7
7
  [![codecov](https://codecov.io/gh/auth0/ruby-auth0/branch/master/graph/badge.svg)](https://codecov.io/gh/auth0/ruby-auth0)
8
8
  [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/auth0/ruby-auth0/master/frames)
9
9
  [![MIT licensed](https://img.shields.io/dub/l/vibe-d.svg?style=flat)](https://github.com/auth0/ruby-auth0/blob/master/LICENSE)
10
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/auth0/ruby-auth0)
10
11
 
11
12
  <div>
12
13
  📚 <a href="#documentation">Documentation</a> - 🚀 <a href="#getting-started">Getting started</a> - 💻 <a href="#api-reference">API reference</a> - 💬 <a href="#feedback">Feedback</a>
@@ -127,4 +128,4 @@ Please do not report security vulnerabilities on the public GitHub issue tracker
127
128
  </p>
128
129
  <p align="center">
129
130
  This project is licensed under the MIT license. See the <a href="https://github.com/auth0/ruby-auth0/blob/master/LICENSE"> LICENSE</a> file for more info.
130
- </p>
131
+ </p>
data/auth0.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.add_development_dependency 'rake', '~> 13.0'
27
27
  s.add_development_dependency 'fuubar', '~> 2.0'
28
28
  s.add_development_dependency 'guard-rspec', '~> 4.5' unless ENV['CIRCLECI']
29
- s.add_development_dependency 'dotenv-rails', '~> 2.0'
29
+ s.add_development_dependency 'dotenv', '~> 3.0'
30
30
  s.add_development_dependency 'rspec', '~> 3.11'
31
31
  s.add_development_dependency 'simplecov', '~> 0.9'
32
32
  s.add_development_dependency 'faker', '~> 2.0'
@@ -3,7 +3,7 @@
3
3
  source 'http://rubygems.org'
4
4
 
5
5
  # gem "rails"
6
- gem 'sinatra', '~> 2.2'
6
+ gem 'sinatra', '~> 4.2'
7
7
  gem 'jwt', '~> 2.5'
8
8
  gem 'dotenv'
9
9
  gem 'puma'
@@ -1,23 +1,32 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
+ base64 (0.3.0)
4
5
  dotenv (2.8.1)
5
6
  jwt (2.5.0)
6
- mustermann (2.0.2)
7
+ logger (1.7.0)
8
+ mustermann (3.0.4)
7
9
  ruby2_keywords (~> 0.0.1)
8
10
  nio4r (2.7.3)
9
11
  puma (5.6.9)
10
12
  nio4r (~> 2.0)
11
- rack (2.2.9)
12
- rack-protection (2.2.3)
13
- rack
13
+ rack (3.2.5)
14
+ rack-protection (4.2.0)
15
+ base64 (>= 0.1.0)
16
+ logger (>= 1.6.0)
17
+ rack (>= 3.0.0, < 4)
18
+ rack-session (2.1.1)
19
+ base64 (>= 0.1.0)
20
+ rack (>= 3.0.0)
14
21
  ruby2_keywords (0.0.5)
15
- sinatra (2.2.3)
16
- mustermann (~> 2.0)
17
- rack (~> 2.2)
18
- rack-protection (= 2.2.3)
22
+ sinatra (4.2.0)
23
+ logger (>= 1.6.0)
24
+ mustermann (~> 3.0)
25
+ rack (>= 3.0.0, < 4)
26
+ rack-protection (= 4.2.0)
27
+ rack-session (>= 2.0.0, < 3)
19
28
  tilt (~> 2.0)
20
- tilt (2.0.11)
29
+ tilt (2.7.0)
21
30
 
22
31
  PLATFORMS
23
32
  aarch64-linux
@@ -27,7 +36,7 @@ DEPENDENCIES
27
36
  dotenv
28
37
  jwt (~> 2.5)
29
38
  puma
30
- sinatra (~> 2.2)
39
+ sinatra (~> 4.2)
31
40
 
32
41
  BUNDLED WITH
33
42
  2.3.7
@@ -1,7 +1,7 @@
1
1
  module Auth0
2
2
  module Api
3
3
  module V2
4
- # Methods to use the users endpoints
4
+ # Methods to use the users' endpoints
5
5
  module Users
6
6
  include Auth0::Mixins::Validation
7
7
 
@@ -94,10 +94,10 @@ module Auth0
94
94
  # Some considerations:
95
95
  # The properties of the new object will replace the old ones.
96
96
  # The metadata fields are an exception to this rule (user_metadata and app_metadata). These properties are
97
- # merged instead of being replaced but be careful, the merge only occurs on the first level.
97
+ # merged instead of being replaced, but be careful, the merge only occurs on the first level.
98
98
  # If you are updating email_verified, phone_verified, username or password you need to specify the connection
99
99
  # property too.
100
- # If your are updating email or phone_number you need to specify the connection and the client_id properties.
100
+ # If you are updating email or phone_number you need to specify the connection and the client_id properties.
101
101
  # @see https://auth0.com/docs/api/v2#!/Users/patch_users_by_id
102
102
  # @param user_id [string] The user_id of the user to update.
103
103
  # @param body [hash] The optional parameters to update.
@@ -137,7 +137,7 @@ module Auth0
137
137
  # update:current_user_identities scope. In this case only the link_with param is required in the body,
138
138
  # containing the JWT obtained upon the secondary account's authentication.
139
139
  # 2. With an API V2 generated token with update:users scope. In this case you need to send provider and user_id
140
- # in the body. Optionally you can also send the connection_id param which is suitable for identifying a
140
+ # in the body. Optionally, you can also send the connection_id param, which is suitable for identifying a
141
141
  # particular database connection for the 'auth0' provider.
142
142
  # @see https://auth0.com/docs/api/v2#!/Users/post_identities
143
143
  # @param user_id [string] The user_id of the primary identity where you are linking the secondary account to.
@@ -1,6 +1,8 @@
1
- require "addressable/uri"
2
- require "retryable"
3
- require_relative "../exception.rb"
1
+ # frozen_string_literal: true
2
+
3
+ require 'addressable/uri'
4
+ require 'retryable'
5
+ require_relative '../exception'
4
6
 
5
7
  module Auth0
6
8
  module Mixins
@@ -8,6 +10,7 @@ module Auth0
8
10
  # for now, if you want to feel free to use your own http client
9
11
  module HTTPProxy
10
12
  attr_accessor :headers, :base_uri, :timeout, :retry_count
13
+
11
14
  DEFAULT_RETRIES = 3
12
15
  MAX_ALLOWED_RETRIES = 10
13
16
  MAX_REQUEST_RETRY_JITTER = 250
@@ -16,10 +19,10 @@ module Auth0
16
19
  BASE_DELAY = 100
17
20
 
18
21
  # proxying requests from instance methods to HTTP class methods
19
- %i(get post post_file post_form put patch delete delete_with_body).each do |method|
22
+ %i[get post post_file post_form put patch delete delete_with_body].each do |method|
20
23
  define_method(method) do |uri, body = {}, extra_headers = {}|
21
- body = body.delete_if { |_, v| v.nil? }
22
- token = get_token()
24
+ body = safe_merge_body(body, extra_headers)
25
+ token = get_token
23
26
  authorization_header(token) unless token.nil?
24
27
  request_with_retry(method, uri, body, extra_headers)
25
28
  end
@@ -27,8 +30,8 @@ module Auth0
27
30
 
28
31
  def retry_options
29
32
  sleep_timer = lambda do |attempt|
30
- wait = BASE_DELAY * (2**attempt-1) # Exponential delay with each subsequent request attempt.
31
- wait += rand(wait+1..wait+MAX_REQUEST_RETRY_JITTER) # Add jitter to the delay window.
33
+ wait = BASE_DELAY * (2**attempt - 1) # Exponential delay with each subsequent request attempt.
34
+ wait += rand(wait + 1..wait + MAX_REQUEST_RETRY_JITTER) # Add jitter to the delay window.
32
35
  wait = [MAX_REQUEST_RETRY_DELAY, wait].min # Cap delay at MAX_REQUEST_RETRY_DELAY.
33
36
  wait = [MIN_REQUEST_RETRY_DELAY, wait].max # Ensure delay is no less than MIN_REQUEST_RETRY_DELAY.
34
37
  wait / 1000.to_f.round(2) # convert ms to seconds
@@ -55,6 +58,7 @@ module Auth0
55
58
 
56
59
  def add_headers(h = {})
57
60
  raise ArgumentError, 'Headers must be an object which responds to #to_hash' unless h.respond_to?(:to_hash)
61
+
58
62
  @headers ||= {}
59
63
  @headers.merge!(h.to_hash)
60
64
  end
@@ -72,28 +76,29 @@ module Auth0
72
76
  end
73
77
 
74
78
  def request(method, uri, body = {}, extra_headers = {})
75
- result = if method == :get
76
- @headers ||= {}
77
- get_headers = @headers.merge({params: body}).merge(extra_headers)
78
- call(:get, encode_uri(uri), timeout, get_headers)
79
- elsif method == :delete
80
- @headers ||= {}
81
- delete_headers = @headers.merge({ params: body })
82
- call(:delete, encode_uri(uri), timeout, delete_headers)
83
- elsif method == :delete_with_body
84
- call(:delete, encode_uri(uri), timeout, headers, body.to_json)
85
- elsif method == :post_file
86
- body.merge!(multipart: true)
87
- # Ignore the default Content-Type headers and let the HTTP client define them
88
- post_file_headers = headers.except('Content-Type') if headers != nil
89
- # Actual call with the altered headers
90
- call(:post, encode_uri(uri), timeout, post_file_headers, body)
91
- elsif method == :post_form
92
- form_post_headers = headers.except('Content-Type') if headers != nil
93
- call(:post, encode_uri(uri), timeout, form_post_headers, body.compact)
94
- else
95
- call(method, encode_uri(uri), timeout, headers, body.to_json)
96
- end
79
+ result = case method
80
+ when :get
81
+ @headers ||= {}
82
+ get_headers = @headers.merge({ params: body }).merge(extra_headers)
83
+ call(:get, encode_uri(uri), timeout, get_headers)
84
+ when :delete
85
+ @headers ||= {}
86
+ delete_headers = @headers.merge({ params: body })
87
+ call(:delete, encode_uri(uri), timeout, delete_headers)
88
+ when :delete_with_body
89
+ call(:delete, encode_uri(uri), timeout, headers, body.to_json)
90
+ when :post_file
91
+ body.merge!(multipart: true)
92
+ # Ignore the default Content-Type headers and let the HTTP client define them
93
+ post_file_headers = headers.except('Content-Type') unless headers.nil?
94
+ # Actual call with the altered headers
95
+ call(:post, encode_uri(uri), timeout, post_file_headers, body)
96
+ when :post_form
97
+ form_post_headers = headers.except('Content-Type') unless headers.nil?
98
+ call(:post, encode_uri(uri), timeout, form_post_headers, body.compact)
99
+ else
100
+ call(method, encode_uri(uri), timeout, headers, body.to_json)
101
+ end
97
102
 
98
103
  case result.code
99
104
  when 200...226 then safe_parse_json(result.body)
@@ -101,7 +106,8 @@ module Auth0
101
106
  when 401 then raise Auth0::Unauthorized.new(result.body, code: result.code, headers: result.headers)
102
107
  when 403 then raise Auth0::AccessDenied.new(result.body, code: result.code, headers: result.headers)
103
108
  when 404 then raise Auth0::NotFound.new(result.body, code: result.code, headers: result.headers)
104
- when 429 then raise Auth0::RateLimitEncountered.new(result.body, code: result.code, headers: result.headers)
109
+ when 429 then raise Auth0::RateLimitEncountered.new(result.body, code: result.code,
110
+ headers: result.headers)
105
111
  when 500 then raise Auth0::ServerError.new(result.body, code: result.code, headers: result.headers)
106
112
  else raise Auth0::Unsupported.new(result.body, code: result.code, headers: result.headers)
107
113
  end
@@ -118,11 +124,19 @@ module Auth0
118
124
  rescue RestClient::Exception => e
119
125
  case e
120
126
  when RestClient::RequestTimeout
121
- raise Auth0::RequestTimeout.new(e.message)
127
+ raise Auth0::RequestTimeout, e.message
122
128
  else
123
- return e.response
129
+ e.response
124
130
  end
125
131
  end
132
+
133
+ private
134
+
135
+ def safe_merge_body(body, extra = {})
136
+ return body unless body.is_a?(Hash)
137
+ merged = extra.any? ? body.merge(extra) : body
138
+ merged.compact
139
+ end
126
140
  end
127
141
  end
128
142
  end
data/lib/auth0/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # current version of gem
2
2
  module Auth0
3
- VERSION = '5.18.0'.freeze
3
+ VERSION = '5.18.1'.freeze
4
4
  end
@@ -272,6 +272,55 @@ describe Auth0::Mixins::HTTPProxy do
272
272
 
273
273
  %i(post post_form put patch).each do |http_method|
274
274
  context ".#{http_method}" do
275
+ context 'when body is an Array' do
276
+ let(:payload) { [{ permission_name: 'read:data', resource_server_identifier: 'https://api.example.com' }] }
277
+
278
+ if http_method == :post_form
279
+ it 'sends the array as-is without wrapping in a Hash' do
280
+ expect(RestClient::Request).to receive(:execute) do |args|
281
+ expect(args[:payload]).to be_an(Array)
282
+ expect(args[:payload]).to eq(payload)
283
+ end.and_return(StubResponse.new('[]', true, 200))
284
+
285
+ @instance.send(http_method, '/test', payload)
286
+ end
287
+ else
288
+ it 'sends the array as-is without wrapping in a Hash' do
289
+ expect(RestClient::Request).to receive(:execute) do |args|
290
+ parsed = JSON.parse(args[:payload], symbolize_names: true)
291
+ expect(parsed).to be_an(Array)
292
+ expect(parsed).to eq(payload)
293
+ end.and_return(StubResponse.new('[]', true, 200))
294
+
295
+ @instance.send(http_method, '/test', payload)
296
+ end
297
+ end
298
+ end
299
+
300
+ context 'when body is a Hash' do
301
+ let(:payload) { { permission_name: 'read:data', resource_server_identifier: 'https://api.example.com' } }
302
+
303
+ if http_method == :post_form
304
+ it 'sends the Hash without modification' do
305
+ expect(RestClient::Request).to receive(:execute) do |args|
306
+ expect(args[:payload]).to be_a(Hash)
307
+ expect(args[:payload]).to include(payload)
308
+ end.and_return(StubResponse.new('{}', true, 200))
309
+
310
+ @instance.send(http_method, '/test', payload)
311
+ end
312
+ else
313
+ it 'sends the Hash as JSON without modification' do
314
+ expect(RestClient::Request).to receive(:execute) do |args|
315
+ parsed = JSON.parse(args[:payload], symbolize_names: true)
316
+ expect(parsed).to be_a(Hash)
317
+ expect(parsed).to eq(payload)
318
+ end.and_return(StubResponse.new('{}', true, 200))
319
+
320
+ @instance.send(http_method, '/test', payload)
321
+ end
322
+ end
323
+ end
275
324
  it { expect(@instance).to respond_to(http_method.to_sym) }
276
325
  it "should call send http #{http_method} method to path defined through HTTP"do
277
326
  expect(RestClient::Request).to receive(:execute).with(expected_payload(http_method))
@@ -279,6 +328,19 @@ describe Auth0::Mixins::HTTPProxy do
279
328
  expect { @instance.send(http_method, '/test') }.not_to raise_error
280
329
  end
281
330
 
331
+ it "should handle array parameters for #{http_method} method" do
332
+ array_data = ['param1', 'param2']
333
+ if http_method == :post_form
334
+ expected_params = expected_payload(http_method, { payload: array_data })
335
+ else
336
+ expected_params = expected_payload(http_method, { payload: array_data.to_json })
337
+ end
338
+
339
+ expect(RestClient::Request).to receive(:execute).with(expected_params)
340
+ .and_return(StubResponse.new({}, true, 200))
341
+ expect { @instance.send(http_method, '/test', array_data) }.not_to raise_error
342
+ end
343
+
282
344
  it 'should not raise exception if data returned not in json format (should be fixed in v2)' do
283
345
  allow(RestClient::Request).to receive(:execute).with(expected_payload(http_method))
284
346
  .and_return(StubResponse.new('Some random text here', true, 200))
@@ -452,6 +514,7 @@ describe Auth0::Mixins::HTTPProxy do
452
514
  end
453
515
  end
454
516
  end
517
+
455
518
  end
456
519
  end
457
520
 
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth0
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.18.0
4
+ version: 5.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Auth0
8
8
  - Jose Romaniello
9
9
  - Ivan Petroe
10
10
  - Patrik Ragnarsson
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-12-03 00:00:00.000000000 Z
14
+ date: 2026-03-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rest-client
@@ -140,19 +140,19 @@ dependencies:
140
140
  - !ruby/object:Gem::Version
141
141
  version: '4.5'
142
142
  - !ruby/object:Gem::Dependency
143
- name: dotenv-rails
143
+ name: dotenv
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - "~>"
147
147
  - !ruby/object:Gem::Version
148
- version: '2.0'
148
+ version: '3.0'
149
149
  type: :development
150
150
  prerelease: false
151
151
  version_requirements: !ruby/object:Gem::Requirement
152
152
  requirements:
153
153
  - - "~>"
154
154
  - !ruby/object:Gem::Version
155
- version: '2.0'
155
+ version: '3.0'
156
156
  - !ruby/object:Gem::Dependency
157
157
  name: rspec
158
158
  requirement: !ruby/object:Gem::Requirement
@@ -591,7 +591,7 @@ homepage: https://github.com/auth0/ruby-auth0
591
591
  licenses:
592
592
  - MIT
593
593
  metadata: {}
594
- post_install_message:
594
+ post_install_message:
595
595
  rdoc_options: []
596
596
  require_paths:
597
597
  - lib
@@ -607,7 +607,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
607
607
  version: '0'
608
608
  requirements: []
609
609
  rubygems_version: 3.4.19
610
- signing_key:
610
+ signing_key:
611
611
  specification_version: 4
612
612
  summary: Auth0 API Client
613
613
  test_files: []