auth0 5.17.0 → 5.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 001f09f32948583c13fb7a3bf421d34a469ba5cd4b0b8ce080a5febaf2e8369b
4
- data.tar.gz: 671271047cdaa71aa6cbf6595d35623b9cfdc79e59aa2a5f9f6e8af59e1d6e52
3
+ metadata.gz: 6bc03a5197ed3cf51db9076e4d7429e56a418f94eb440b7f69c1542f1014a7cf
4
+ data.tar.gz: bb4f921acd2af07f5139b0920064265a539e61862827dac10e5f39988297fbf4
5
5
  SHA512:
6
- metadata.gz: 5d95a176bd531635ac2502eb147384da9ac0417020dc17e6e0592ba508ece19c70cd1e7037718ffcfdb4b1bcedb3dd6c2866746923328fe5777c075e542aabb0
7
- data.tar.gz: 9e693a863adeabb6940f06832ecfd67c30fbcfb6106108f228c3e3959b1bb0892601cca649a5d3a009ec645b24750f5a467a3942be4202c9c30d353102fb4722
6
+ metadata.gz: '08beebcb81144352182b6af63c5745d55abcf22ef30fee4928141a89c24f61cd5d81414f63f76f6cf6bd9935b5c49d5fe83b92b29298800fefd4a5bd1a2efa87'
7
+ data.tar.gz: ac02d18db80d57720502db87c88ab4c3f8d07ef00d2f9792e8e41ae383d5d28082523f2d7cd735cfb2b6f7ec94d39ab8a42856b86fae151b838ad0569cc82dcb
data/.github/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @auth0/dx-sdks-engineer
1
+ * @auth0/project-dx-sdks-engineer-codeowner
@@ -0,0 +1,71 @@
1
+ name: 'Reversing Labs Scanner'
2
+ description: 'Runs the Reversing Labs scanner on a specified artifact.'
3
+ inputs:
4
+ artifact-path:
5
+ description: 'Path to the artifact to be scanned.'
6
+ required: true
7
+ version:
8
+ description: 'Version of the artifact.'
9
+ required: true
10
+
11
+ runs:
12
+ using: 'composite'
13
+ steps:
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: '3.10'
18
+
19
+ - name: Install Python dependencies
20
+ shell: bash
21
+ run: |
22
+ pip install boto3 requests
23
+
24
+ - name: Configure AWS credentials
25
+ uses: aws-actions/configure-aws-credentials@v1
26
+ with:
27
+ role-to-assume: ${{ env.PRODSEC_TOOLS_ARN }}
28
+ aws-region: us-east-1
29
+ mask-aws-account-id: true
30
+
31
+ - name: Install RL Wrapper
32
+ shell: bash
33
+ run: |
34
+ pip install rl-wrapper>=1.0.0 --index-url "https://${{ env.PRODSEC_TOOLS_USER }}:${{ env.PRODSEC_TOOLS_TOKEN }}@a0us.jfrog.io/artifactory/api/pypi/python-local/simple"
35
+
36
+ - name: Run RL Scanner
37
+ shell: bash
38
+ env:
39
+ RLSECURE_LICENSE: ${{ env.RLSECURE_LICENSE }}
40
+ RLSECURE_SITE_KEY: ${{ env.RLSECURE_SITE_KEY }}
41
+ SIGNAL_HANDLER_TOKEN: ${{ env.SIGNAL_HANDLER_TOKEN }}
42
+ PYTHONUNBUFFERED: 1
43
+ run: |
44
+ if [ ! -f "${{ inputs.artifact-path }}" ]; then
45
+ echo "Artifact not found: ${{ inputs.artifact-path }}"
46
+ exit 1
47
+ fi
48
+
49
+ rl-wrapper \
50
+ --artifact "${{ inputs.artifact-path }}" \
51
+ --name "${{ github.event.repository.name }}" \
52
+ --version "${{ inputs.version }}" \
53
+ --repository "${{ github.repository }}" \
54
+ --commit "${{ github.sha }}" \
55
+ --build-env "github_actions" \
56
+ --suppress_output
57
+
58
+ # Check the outcome of the scanner
59
+ if [ $? -ne 0 ]; then
60
+ echo "RL Scanner failed."
61
+ echo "scan-status=failed" >> $GITHUB_ENV
62
+ exit 1
63
+ else
64
+ echo "RL Scanner passed."
65
+ echo "scan-status=success" >> $GITHUB_ENV
66
+ fi
67
+
68
+ outputs:
69
+ scan-status:
70
+ description: 'The outcome of the scan process.'
71
+ value: ${{ env.scan-status }}
@@ -8,13 +8,27 @@ on:
8
8
 
9
9
  permissions:
10
10
  contents: write
11
+ id-token: write # This is required for requesting the JWT
11
12
 
12
13
  ### TODO: Replace instances of './.github/workflow/' w/ `auth0/dx-sdk-actions/` and append `@latest` after the common `dx-sdk-actions` repo is made public.
13
14
  ### TODO: Also remove `get-prerelease`, `get-version`, `rubygems-publish`, `release-create`, `tag-create` and `tag-exists` actions from this repo's .github/actions folder and `ruby-release` from `./github/workflows` once the repo is public.
14
15
 
15
16
  jobs:
17
+ rl-scanner:
18
+ uses: ./.github/workflows/rl-scanner.yml
19
+ with:
20
+ ruby-version: 3.2
21
+ secrets:
22
+ RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }}
23
+ RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }}
24
+ SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }}
25
+ PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }}
26
+ PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }}
27
+ PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }}
28
+
16
29
  release:
17
30
  uses: ./.github/workflows/ruby-release.yml
31
+ needs: rl-scanner
18
32
  with:
19
33
  ruby-version: 3.2
20
34
  secrets:
@@ -0,0 +1,65 @@
1
+ name: RL-Secure Workflow
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ ruby-version:
7
+ required: true
8
+ type: string
9
+ secrets:
10
+ RLSECURE_LICENSE:
11
+ required: true
12
+ RLSECURE_SITE_KEY:
13
+ required: true
14
+ SIGNAL_HANDLER_TOKEN:
15
+ required: true
16
+ PRODSEC_TOOLS_USER:
17
+ required: true
18
+ PRODSEC_TOOLS_TOKEN:
19
+ required: true
20
+ PRODSEC_TOOLS_ARN:
21
+ required: true
22
+
23
+ jobs:
24
+ rl-scanner:
25
+ if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
26
+ runs-on: ubuntu-latest
27
+ outputs:
28
+ scan-status: ${{ steps.rl-scan-conclusion.outcome }}
29
+
30
+ steps:
31
+ - name: Checkout code
32
+ uses: actions/checkout@v4
33
+
34
+ - name: Configure Ruby
35
+ uses: ./.github/actions/setup
36
+ with:
37
+ ruby-version: ${{ inputs.ruby-version }}
38
+
39
+ - name: Build RubyGems
40
+ shell: bash
41
+ run: |
42
+ gem build *.gemspec
43
+ export GEM_FILE=$(ls *.gem)
44
+ echo "gem_file=$GEM_FILE" >> $GITHUB_ENV
45
+
46
+ - name: Get Artifact Version
47
+ id: get_version
48
+ uses: ./.github/actions/get-version
49
+
50
+ - name: Run RL Scanner
51
+ id: rl-scan-conclusion
52
+ uses: ./.github/actions/rl-scanner
53
+ with:
54
+ artifact-path: "$(pwd)/${{ env.gem_file }}"
55
+ version: "${{ steps.get_version.outputs.version }}"
56
+ env:
57
+ RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }}
58
+ RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }}
59
+ SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }}
60
+ PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }}
61
+ PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }}
62
+ PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }}
63
+
64
+ - name: Output scan result
65
+ run: echo "scan-status=${{ steps.rl-scan-conclusion.outcome }}" >> $GITHUB_ENV
@@ -2,7 +2,7 @@ name: Semgrep
2
2
 
3
3
  on:
4
4
  merge_group:
5
- pull_request_target:
5
+ pull_request:
6
6
  types:
7
7
  - opened
8
8
  - synchronize
@@ -20,16 +20,7 @@ concurrency:
20
20
  cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
21
21
 
22
22
  jobs:
23
- authorize:
24
- name: Authorize
25
- environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
26
- runs-on: ubuntu-latest
27
- steps:
28
- - run: true
29
-
30
23
  run:
31
- needs: authorize # Require approval before running on forked pull requests
32
-
33
24
  name: Check for Vulnerabilities
34
25
  runs-on: ubuntu-latest
35
26
 
@@ -3,7 +3,7 @@ name: Snyk
3
3
  on:
4
4
  merge_group:
5
5
  workflow_dispatch:
6
- pull_request_target:
6
+ pull_request:
7
7
  types:
8
8
  - opened
9
9
  - synchronize
@@ -21,16 +21,7 @@ concurrency:
21
21
  cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
22
22
 
23
23
  jobs:
24
- authorize:
25
- name: Authorize
26
- environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
27
- runs-on: ubuntu-latest
28
- steps:
29
- - run: true
30
-
31
24
  check:
32
- needs: authorize
33
-
34
25
  name: Check for Vulnerabilities
35
26
  runs-on: ubuntu-latest
36
27
 
data/.version CHANGED
@@ -1 +1 @@
1
- v5.17.0
1
+ v5.18.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## [v5.18.0](https://github.com/auth0/ruby-auth0/tree/v5.18.0) (2024-11-25)
4
+ [Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.17.0...v5.18.0)
5
+
6
+ **Added**
7
+ - Add Refresh Token endpoints for the Auth0 Management API #614 [\#623](https://github.com/auth0/ruby-auth0/pull/623) ([arpit-jn](https://github.com/arpit-jn))
8
+ - Add Management API calls for session API endpoints #613 [\#616](https://github.com/auth0/ruby-auth0/pull/616) ([arpit-jn](https://github.com/arpit-jn))
9
+
3
10
  ## [v5.17.0](https://github.com/auth0/ruby-auth0/tree/v5.17.0) (2024-05-24)
4
11
  [Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.16.0...v5.17.0)
5
12
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- auth0 (5.17.0)
4
+ auth0 (5.18.0)
5
5
  addressable (~> 2.8)
6
6
  jwt (~> 2.7)
7
7
  rest-client (~> 2.1)
@@ -11,40 +11,44 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actionpack (7.1.3.3)
15
- actionview (= 7.1.3.3)
16
- activesupport (= 7.1.3.3)
14
+ actionpack (8.0.0)
15
+ actionview (= 8.0.0)
16
+ activesupport (= 8.0.0)
17
17
  nokogiri (>= 1.8.5)
18
- racc
19
18
  rack (>= 2.2.4)
20
19
  rack-session (>= 1.0.1)
21
20
  rack-test (>= 0.6.3)
22
21
  rails-dom-testing (~> 2.2)
23
22
  rails-html-sanitizer (~> 1.6)
24
- actionview (7.1.3.3)
25
- activesupport (= 7.1.3.3)
23
+ useragent (~> 0.16)
24
+ actionview (8.0.0)
25
+ activesupport (= 8.0.0)
26
26
  builder (~> 3.1)
27
27
  erubi (~> 1.11)
28
28
  rails-dom-testing (~> 2.2)
29
29
  rails-html-sanitizer (~> 1.6)
30
- activesupport (7.1.3.3)
30
+ activesupport (8.0.0)
31
31
  base64
32
+ benchmark (>= 0.3)
32
33
  bigdecimal
33
- concurrent-ruby (~> 1.0, >= 1.0.2)
34
+ concurrent-ruby (~> 1.0, >= 1.3.1)
34
35
  connection_pool (>= 2.2.5)
35
36
  drb
36
37
  i18n (>= 1.6, < 2)
38
+ logger (>= 1.4.2)
37
39
  minitest (>= 5.1)
38
- mutex_m
39
- tzinfo (~> 2.0)
40
- addressable (2.8.6)
41
- public_suffix (>= 2.0.2, < 6.0)
40
+ securerandom (>= 0.3)
41
+ tzinfo (~> 2.0, >= 2.0.5)
42
+ uri (>= 0.13.1)
43
+ addressable (2.8.7)
44
+ public_suffix (>= 2.0.2, < 7.0)
42
45
  ast (2.4.2)
43
46
  base64 (0.2.0)
47
+ benchmark (0.4.0)
44
48
  bigdecimal (3.1.8)
45
- builder (3.2.4)
49
+ builder (3.3.0)
46
50
  coderay (1.1.3)
47
- concurrent-ruby (1.2.3)
51
+ concurrent-ruby (1.3.4)
48
52
  connection_pool (2.4.1)
49
53
  coveralls (0.7.1)
50
54
  multi_json (~> 1.3)
@@ -57,22 +61,31 @@ GEM
57
61
  rexml
58
62
  crass (1.0.6)
59
63
  diff-lcs (1.5.1)
60
- docile (1.4.0)
64
+ docile (1.4.1)
61
65
  domain_name (0.6.20240107)
62
66
  dotenv (2.8.1)
63
67
  dotenv-rails (2.8.1)
64
68
  dotenv (= 2.8.1)
65
69
  railties (>= 3.2)
66
70
  drb (2.2.1)
67
- erubi (1.12.0)
71
+ erubi (1.13.0)
68
72
  faker (2.23.0)
69
73
  i18n (>= 1.8.11, < 2)
70
- ffi (1.16.3)
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)
71
84
  formatador (1.1.0)
72
85
  fuubar (2.5.1)
73
86
  rspec-core (~> 3.0)
74
87
  ruby-progressbar (~> 1.4)
75
- guard (2.18.1)
88
+ guard (2.19.0)
76
89
  formatador (>= 0.2.4)
77
90
  listen (>= 2.7, < 4.0)
78
91
  lumberjack (>= 1.0.12, < 2.0)
@@ -86,69 +99,73 @@ GEM
86
99
  guard (~> 2.1)
87
100
  guard-compat (~> 1.1)
88
101
  rspec (>= 2.99.0, < 4.0)
89
- hashdiff (1.1.0)
102
+ hashdiff (1.1.2)
90
103
  http-accept (1.7.0)
91
- http-cookie (1.0.5)
104
+ http-cookie (1.0.7)
92
105
  domain_name (~> 0.5)
93
- i18n (1.14.5)
106
+ i18n (1.14.6)
94
107
  concurrent-ruby (~> 1.0)
95
108
  io-console (0.7.2)
96
- irb (1.13.1)
109
+ irb (1.14.1)
97
110
  rdoc (>= 4.0.0)
98
111
  reline (>= 0.4.2)
99
- json (2.7.2)
100
- jwt (2.8.1)
112
+ json (2.8.2)
113
+ jwt (2.9.3)
101
114
  base64
102
115
  language_server-protocol (3.17.0.3)
103
116
  listen (3.9.0)
104
117
  rb-fsevent (~> 0.10, >= 0.10.3)
105
118
  rb-inotify (~> 0.9, >= 0.9.10)
106
- loofah (2.22.0)
119
+ logger (1.6.1)
120
+ loofah (2.23.1)
107
121
  crass (~> 1.0.2)
108
122
  nokogiri (>= 1.12.0)
109
123
  lumberjack (1.2.10)
110
124
  method_source (1.1.0)
111
- mime-types (3.5.2)
125
+ mime-types (3.6.0)
126
+ logger
112
127
  mime-types-data (~> 3.2015)
113
- mime-types-data (3.2024.0507)
114
- minitest (5.23.1)
128
+ mime-types-data (3.2024.1105)
129
+ minitest (5.25.2)
115
130
  multi_json (1.15.0)
116
- mutex_m (0.2.0)
117
131
  nenv (0.3.0)
118
132
  netrc (0.11.0)
119
- nokogiri (1.16.5-aarch64-linux)
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)
120
138
  racc (~> 1.4)
121
- nokogiri (1.16.5-arm64-darwin)
139
+ nokogiri (1.16.7-x86-linux)
122
140
  racc (~> 1.4)
123
- nokogiri (1.16.5-x86_64-darwin)
141
+ nokogiri (1.16.7-x86_64-darwin)
124
142
  racc (~> 1.4)
125
- nokogiri (1.16.5-x86_64-linux)
143
+ nokogiri (1.16.7-x86_64-linux)
126
144
  racc (~> 1.4)
127
145
  notiffany (0.1.3)
128
146
  nenv (~> 0.1)
129
147
  shellany (~> 0.0)
130
- parallel (1.24.0)
131
- parser (3.3.1.0)
148
+ parallel (1.26.3)
149
+ parser (3.3.6.0)
132
150
  ast (~> 2.4.1)
133
151
  racc
134
- pp (0.5.0)
152
+ pp (0.6.1)
135
153
  prettyprint
136
154
  prettyprint (0.2.0)
137
- pry (0.14.2)
155
+ pry (0.15.0)
138
156
  coderay (~> 1.1)
139
157
  method_source (~> 1.0)
140
- psych (5.1.2)
158
+ psych (5.2.0)
141
159
  stringio
142
- public_suffix (5.0.5)
143
- racc (1.8.0)
144
- rack (3.0.11)
160
+ public_suffix (6.0.1)
161
+ racc (1.8.1)
162
+ rack (3.1.8)
145
163
  rack-session (2.0.0)
146
164
  rack (>= 3.0.0)
147
165
  rack-test (2.1.0)
148
166
  rack (>= 1.3)
149
- rackup (2.1.0)
167
+ rackup (2.2.1)
150
168
  rack (>= 3)
151
- webrick (~> 1.8)
152
169
  rails-dom-testing (2.2.0)
153
170
  activesupport (>= 5.0.0)
154
171
  minitest
@@ -156,10 +173,10 @@ GEM
156
173
  rails-html-sanitizer (1.6.0)
157
174
  loofah (~> 2.21)
158
175
  nokogiri (~> 1.14)
159
- railties (7.1.3.3)
160
- actionpack (= 7.1.3.3)
161
- activesupport (= 7.1.3.3)
162
- irb
176
+ railties (8.0.0)
177
+ actionpack (= 8.0.0)
178
+ activesupport (= 8.0.0)
179
+ irb (~> 1.13)
163
180
  rackup (>= 1.0.0)
164
181
  rake (>= 12.2)
165
182
  thor (~> 1.0, >= 1.2.2)
@@ -169,10 +186,10 @@ GEM
169
186
  rb-fsevent (0.11.2)
170
187
  rb-inotify (0.11.1)
171
188
  ffi (~> 1.0)
172
- rdoc (6.7.0)
189
+ rdoc (6.8.1)
173
190
  psych (>= 4.0.0)
174
191
  regexp_parser (2.9.2)
175
- reline (0.5.7)
192
+ reline (0.5.11)
176
193
  io-console (~> 0.5)
177
194
  rest-client (2.1.0)
178
195
  http-accept (>= 1.7.0, < 2.0)
@@ -180,40 +197,39 @@ GEM
180
197
  mime-types (>= 1.16, < 4.0)
181
198
  netrc (~> 0.8)
182
199
  retryable (3.0.5)
183
- rexml (3.2.8)
184
- strscan (>= 3.0.9)
200
+ rexml (3.3.9)
185
201
  rspec (3.13.0)
186
202
  rspec-core (~> 3.13.0)
187
203
  rspec-expectations (~> 3.13.0)
188
204
  rspec-mocks (~> 3.13.0)
189
- rspec-core (3.13.0)
205
+ rspec-core (3.13.2)
190
206
  rspec-support (~> 3.13.0)
191
- rspec-expectations (3.13.0)
207
+ rspec-expectations (3.13.3)
192
208
  diff-lcs (>= 1.2.0, < 2.0)
193
209
  rspec-support (~> 3.13.0)
194
- rspec-mocks (3.13.1)
210
+ rspec-mocks (3.13.2)
195
211
  diff-lcs (>= 1.2.0, < 2.0)
196
212
  rspec-support (~> 3.13.0)
197
213
  rspec-support (3.13.1)
198
- rubocop (1.64.0)
214
+ rubocop (1.68.0)
199
215
  json (~> 2.3)
200
216
  language_server-protocol (>= 3.17.0)
201
217
  parallel (~> 1.10)
202
218
  parser (>= 3.3.0.2)
203
219
  rainbow (>= 2.2.2, < 4.0)
204
- regexp_parser (>= 1.8, < 3.0)
205
- rexml (>= 3.2.5, < 4.0)
206
- rubocop-ast (>= 1.31.1, < 2.0)
220
+ regexp_parser (>= 2.4, < 3.0)
221
+ rubocop-ast (>= 1.32.2, < 2.0)
207
222
  ruby-progressbar (~> 1.7)
208
223
  unicode-display_width (>= 2.4.0, < 3.0)
209
- rubocop-ast (1.31.3)
224
+ rubocop-ast (1.36.1)
210
225
  parser (>= 3.3.1.0)
211
- rubocop-rails (2.25.0)
226
+ rubocop-rails (2.27.0)
212
227
  activesupport (>= 4.2.0)
213
228
  rack (>= 1.1)
214
- rubocop (>= 1.33.0, < 2.0)
229
+ rubocop (>= 1.52.0, < 2.0)
215
230
  rubocop-ast (>= 1.31.1, < 2.0)
216
231
  ruby-progressbar (1.13.0)
232
+ securerandom (0.3.2)
217
233
  shellany (0.0.1)
218
234
  simplecov (0.22.0)
219
235
  docile (~> 1.1)
@@ -222,37 +238,47 @@ GEM
222
238
  simplecov-cobertura (2.1.0)
223
239
  rexml
224
240
  simplecov (~> 0.19)
225
- simplecov-html (0.12.3)
241
+ simplecov-html (0.13.1)
226
242
  simplecov_json_formatter (0.1.4)
227
- stringio (3.1.0)
228
- strscan (3.1.0)
243
+ stringio (3.1.2)
229
244
  sync (0.5.0)
230
- term-ansicolor (1.8.0)
245
+ term-ansicolor (1.11.2)
231
246
  tins (~> 1.0)
232
247
  terminal-notifier-guard (1.7.0)
233
- thor (1.3.1)
234
- timecop (0.9.8)
235
- tins (1.33.0)
248
+ thor (1.3.2)
249
+ timecop (0.9.10)
250
+ tins (1.37.0)
236
251
  bigdecimal
237
252
  sync
238
253
  tzinfo (2.0.6)
239
254
  concurrent-ruby (~> 1.0)
240
- unicode-display_width (2.5.0)
241
- vcr (6.2.0)
242
- webmock (3.23.1)
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)
243
261
  addressable (>= 2.8.0)
244
262
  crack (>= 0.3.2)
245
263
  hashdiff (>= 0.4.0, < 2.0.0)
246
- webrick (1.8.1)
247
- zache (0.13.1)
248
- zeitwerk (2.6.14)
264
+ zache (0.13.2)
265
+ zeitwerk (2.7.1)
249
266
 
250
267
  PLATFORMS
251
268
  aarch64-linux
252
- arm64-darwin-21
253
- arm64-darwin-22
254
- x86_64-darwin-21
269
+ aarch64-linux-gnu
270
+ aarch64-linux-musl
271
+ arm-linux
272
+ arm-linux-gnu
273
+ arm-linux-musl
274
+ arm64-darwin
275
+ x86-linux
276
+ x86-linux-gnu
277
+ x86-linux-musl
278
+ x86_64-darwin
255
279
  x86_64-linux
280
+ x86_64-linux-gnu
281
+ x86_64-linux-musl
256
282
 
257
283
  DEPENDENCIES
258
284
  auth0!
@@ -276,4 +302,4 @@ DEPENDENCIES
276
302
  webmock
277
303
 
278
304
  BUNDLED WITH
279
- 2.3.7
305
+ 2.5.23
@@ -5,10 +5,10 @@ GEM
5
5
  jwt (2.5.0)
6
6
  mustermann (2.0.2)
7
7
  ruby2_keywords (~> 0.0.1)
8
- nio4r (2.7.0)
9
- puma (5.6.8)
8
+ nio4r (2.7.3)
9
+ puma (5.6.9)
10
10
  nio4r (~> 2.0)
11
- rack (2.2.6.4)
11
+ rack (2.2.9)
12
12
  rack-protection (2.2.3)
13
13
  rack
14
14
  ruby2_keywords (0.0.5)
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Auth0
4
+ module Api
5
+ module V2
6
+ # Methods to use the Refresh Token endpoints
7
+ module RefreshTokens
8
+ # Retrieve refresh token information.
9
+ # @see https://auth0.com/docs/api/management/v2/refresh-tokens/get-refresh-token
10
+ # @param id [string] The id of the refresh token to retrieve
11
+ def refresh_token(id)
12
+ raise Auth0::InvalidParameter, 'Must supply a valid id' if id.to_s.empty?
13
+
14
+ get "#{resource_path}/#{id}"
15
+ end
16
+
17
+ # Delete a refresh token by its ID.
18
+ # @see https://auth0.com/docs/api/management/v2/refresh-tokens/delete-refresh-token
19
+ # @param id [string] The id of the refresh token to delete
20
+ def delete_refresh_token(id)
21
+ raise Auth0::InvalidParameter, 'Must supply a valid id' if id.to_s.empty?
22
+
23
+ delete "#{resource_path}/#{id}"
24
+ end
25
+
26
+ private
27
+
28
+ def resource_path
29
+ @resource_path ||= '/api/v2/refresh-tokens'
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Auth0
4
+ module Api
5
+ module V2
6
+ # Methods to use the Session endpoints
7
+ module Sessions
8
+ # Retrieve session information by id
9
+ # @see https://auth0.com/docs/api/management/v2/sessions/get-session
10
+ # @param id [string] The id of the session to retrieve.
11
+ def session(session_id)
12
+ raise Auth0::InvalidParameter, 'Must supply a valid session_id' if session_id.to_s.empty?
13
+
14
+ get "#{sessions_path}/#{session_id}"
15
+ end
16
+
17
+ # Deletes a session by id
18
+ # @see https://auth0.com/docs/api/management/v2/sessions/delete-session
19
+ # @param id [string] The id of the session to delete.
20
+ def delete_session(session_id)
21
+ raise Auth0::InvalidParameter, 'Must supply a valid session_id' if session_id.to_s.empty?
22
+
23
+ delete "#{sessions_path}/#{session_id}"
24
+ end
25
+
26
+ # Revokes a session by ID and all associated refresh tokens
27
+ # @see https://auth0.com/docs/api/management/v2/sessions/revoke-session
28
+ # @param id [string] The ID of the session to revoke
29
+ def revoke_session(session_id)
30
+ raise Auth0::InvalidParameter, 'Must supply a valid session_id' if session_id.to_s.empty?
31
+
32
+ post "#{sessions_path}/#{session_id}/revoke"
33
+ end
34
+
35
+ private
36
+
37
+ def sessions_path
38
+ @sessions_path ||= '/api/v2/sessions'
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -465,13 +465,45 @@ module Auth0
465
465
  get "#{users_path}/#{user_id}/sessions"
466
466
  end
467
467
 
468
+ # Retrieve details for a user's refresh tokens.
469
+ # @see https://auth0.com/docs/api/management/v2/users/get-refresh-tokens-for-user
470
+ #
471
+ # @param use_id [String] The user ID
472
+ # @param options [hash] A hash of options for getting permissions
473
+ # * :take [Integer] Number of results per page. Defaults to 50.
474
+ # * :from [String] Optional token ID from which to start selection (exclusive).
475
+ # * :include_totals [boolean] Return results inside an object that contains the total result count (true)
476
+ # or as a direct array of results (false, default)
477
+ #
478
+ # @return [json] Returns refresh tokens for the given user_id.
479
+ def user_refresh_tokens(user_id, options = {})
480
+ raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
481
+
482
+ request_params = {
483
+ take: options.fetch(:take, nil),
484
+ from: options.fetch(:from, nil),
485
+ include_totals: options.fetch(:include_totals, nil)
486
+ }
487
+
488
+ get "#{users_path}/#{user_id}/refresh-tokens", request_params
489
+ end
490
+
491
+ # Delete all refresh tokens for a user.
492
+ #
493
+ # @param user_id [String] ID of the user to get remove refresh tokens for
494
+ # @see https://auth0.com/docs/api/management/v2/users/delete-refresh-tokens-for-user
495
+ def delete_user_refresh_tokens(user_id)
496
+ raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
497
+
498
+ delete "#{users_path}/#{user_id}/refresh-tokens"
499
+ end
500
+
468
501
  private
469
502
 
470
503
  # Users API path
471
504
  def users_path
472
505
  @users_path ||= '/api/v2/users'
473
506
  end
474
-
475
507
  end
476
508
  end
477
509
  end
data/lib/auth0/api/v2.rb CHANGED
@@ -11,6 +11,7 @@ require 'auth0/api/v2/emails'
11
11
  require 'auth0/api/v2/jobs'
12
12
  require 'auth0/api/v2/prompts'
13
13
  require 'auth0/api/v2/organizations'
14
+ require 'auth0/api/v2/refresh_tokens'
14
15
  require 'auth0/api/v2/rules'
15
16
  require 'auth0/api/v2/roles'
16
17
  require 'auth0/api/v2/stats'
@@ -24,6 +25,7 @@ require 'auth0/api/v2/log_streams'
24
25
  require 'auth0/api/v2/resource_servers'
25
26
  require 'auth0/api/v2/guardian'
26
27
  require 'auth0/api/v2/attack_protection'
28
+ require 'auth0/api/v2/sessions'
27
29
 
28
30
  module Auth0
29
31
  module Api
@@ -45,6 +47,7 @@ module Auth0
45
47
  include Auth0::Api::V2::LogStreams
46
48
  include Auth0::Api::V2::Prompts
47
49
  include Auth0::Api::V2::Organizations
50
+ include Auth0::Api::V2::RefreshTokens
48
51
  include Auth0::Api::V2::Rules
49
52
  include Auth0::Api::V2::Roles
50
53
  include Auth0::Api::V2::Stats
@@ -55,6 +58,7 @@ module Auth0
55
58
  include Auth0::Api::V2::Tenants
56
59
  include Auth0::Api::V2::Tickets
57
60
  include Auth0::Api::V2::AttackProtection
61
+ include Auth0::Api::V2::Sessions
58
62
  end
59
63
  end
60
64
  end
data/lib/auth0/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # current version of gem
2
2
  module Auth0
3
- VERSION = '5.17.0'.freeze
3
+ VERSION = '5.18.0'.freeze
4
4
  end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Auth0::Api::V2::RefreshTokens do
6
+ before :all do
7
+ dummy_instance = DummyClass.new
8
+ dummy_instance.extend(Auth0::Api::V2::RefreshTokens)
9
+ @instance = dummy_instance
10
+ end
11
+
12
+ describe '.refresh_token' do
13
+ it 'is expected to respond to a refresh_token method' do
14
+ expect(@instance).to respond_to(:refresh_token)
15
+ end
16
+
17
+ it 'is expected to GET a refresh_token' do
18
+ expect(@instance).to receive(:get).with(
19
+ '/api/v2/refresh-tokens/REFRESH_TOKEN_ID'
20
+ )
21
+
22
+ expect do
23
+ @instance.refresh_token('REFRESH_TOKEN_ID')
24
+ end.not_to raise_error
25
+ end
26
+
27
+ it 'is expected to raise an exception when the id is empty' do
28
+ expect { @instance.refresh_token(nil) }.to raise_error('Must supply a valid id')
29
+ end
30
+ end
31
+
32
+ describe '.delete_refresh_token' do
33
+ it 'is expected to respond to a delete_refresh_token method' do
34
+ expect(@instance).to respond_to(:delete_refresh_token)
35
+ end
36
+
37
+ it 'is expected to DELETE a refresh_token' do
38
+ expect(@instance).to receive(:delete).with(
39
+ '/api/v2/refresh-tokens/REFRESH_TOKEN_ID'
40
+ )
41
+
42
+ expect do
43
+ @instance.delete_refresh_token('REFRESH_TOKEN_ID')
44
+ end.not_to raise_error
45
+ end
46
+
47
+ it 'is expected to raise an exception when the id is empty' do
48
+ expect { @instance.delete_refresh_token(nil) }.to raise_error('Must supply a valid id')
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Auth0::Api::V2::Sessions do
6
+ before :all do
7
+ dummy_instance = DummyClass.new
8
+ dummy_instance.extend(Auth0::Api::V2::Sessions)
9
+ @instance = dummy_instance
10
+ end
11
+
12
+ context '.session' do
13
+ it 'is expected to respond to a session method' do
14
+ expect(@instance).to respond_to(:session)
15
+ end
16
+
17
+ it 'is expected to GET a session' do
18
+ expect(@instance).to receive(:get).with(
19
+ '/api/v2/sessions/SESSION_ID'
20
+ )
21
+
22
+ expect do
23
+ @instance.session('SESSION_ID')
24
+ end.not_to raise_error
25
+ end
26
+
27
+ it 'is expected to raise an exception when the session ID is empty' do
28
+ expect { @instance.session(nil) }.to raise_error('Must supply a valid session_id')
29
+ end
30
+ end
31
+
32
+ context '.delete_session' do
33
+ it 'is expected to respond to a delete_session method' do
34
+ expect(@instance).to respond_to(:delete_session)
35
+ end
36
+
37
+ it 'is expected to DELETE a session' do
38
+ expect(@instance).to receive(:delete).with(
39
+ '/api/v2/sessions/SESSION_ID'
40
+ )
41
+
42
+ expect do
43
+ @instance.delete_session('SESSION_ID')
44
+ end.not_to raise_error
45
+ end
46
+
47
+ it 'is expected to raise an exception when the session ID is empty' do
48
+ expect { @instance.delete_session(nil) }.to raise_error('Must supply a valid session_id')
49
+ end
50
+ end
51
+
52
+ context '.revoke_session' do
53
+ it 'is expected to respond to a revoke_session method' do
54
+ expect(@instance).to respond_to(:revoke_session)
55
+ end
56
+
57
+ it 'is expected to POST to /api/v2/sessions/{id}/revoke' do
58
+ expect(@instance).to receive(:post).with(
59
+ '/api/v2/sessions/SESSION_ID/revoke'
60
+ )
61
+
62
+ expect do
63
+ @instance.revoke_session('SESSION_ID')
64
+ end.not_to raise_error
65
+ end
66
+
67
+ it 'is expected to raise an exception when the session ID is empty' do
68
+ expect { @instance.revoke_session(nil) }.to raise_error('Must supply a valid session_id')
69
+ end
70
+ end
71
+ end
@@ -843,7 +843,62 @@ describe Auth0::Api::V2::Users do
843
843
  expect do
844
844
  @instance.user_sessions('USER_ID')
845
845
  end.not_to raise_error
846
+ end
847
+ end
846
848
 
849
+ context '.user_refresh_tokens' do
850
+ it 'is expected to respond to a user_refresh_tokens method' do
851
+ expect(@instance).to respond_to(:user_refresh_tokens)
852
+ end
853
+
854
+ it 'is expected to raise an exception when the user ID is empty' do
855
+ expect { @instance.user_refresh_tokens(nil) }.to raise_exception(Auth0::MissingUserId)
856
+ end
857
+
858
+ it 'is expected to get user refresh tokens' do
859
+ expect(@instance).to receive(:get).with(
860
+ '/api/v2/users/USER_ID/refresh-tokens', {
861
+ from: nil,
862
+ take: nil,
863
+ include_totals: nil
864
+ }
865
+ )
866
+ expect do
867
+ @instance.user_refresh_tokens('USER_ID')
868
+ end.not_to raise_error
869
+ end
870
+
871
+ it 'is expected to get user refresh tokens with custom parameters' do
872
+ expect(@instance).to receive(:get).with(
873
+ '/api/v2/users/USER_ID/refresh-tokens', {
874
+ from: 'TOKEN_ID',
875
+ take: 10,
876
+ include_totals: true
877
+ }
878
+ )
879
+ expect do
880
+ @instance.user_refresh_tokens('USER_ID', from: 'TOKEN_ID', take: 10, include_totals: true)
881
+ end.not_to raise_error
882
+ end
883
+ end
884
+
885
+ context '.delete_user_refresh_tokens' do
886
+ it 'is expected to respond to delete_user_refresh_tokens' do
887
+ expect(@instance).to respond_to(:delete_user_refresh_tokens)
888
+ end
889
+
890
+ it 'is expected to raise an exception for a missing user ID' do
891
+ expect { @instance.delete_user_refresh_tokens(nil) }.to raise_exception(Auth0::MissingUserId)
892
+ end
893
+
894
+ it 'is expected to call the endpoint' do
895
+ expect(@instance).to receive(:delete).with(
896
+ '/api/v2/users/USER_ID/refresh-tokens'
897
+ )
898
+
899
+ expect do
900
+ @instance.delete_user_refresh_tokens 'USER_ID'
901
+ end.to_not raise_error
847
902
  end
848
903
  end
849
904
  end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'rack/test'
2
1
  require 'faker'
3
2
  require 'json'
4
3
  require 'auth0'
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.17.0
4
+ version: 5.18.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: 2024-05-28 00:00:00.000000000 Z
14
+ date: 2024-12-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rest-client
@@ -215,6 +215,7 @@ files:
215
215
  - ".github/actions/get-release-notes/action.yml"
216
216
  - ".github/actions/get-version/action.yml"
217
217
  - ".github/actions/release-create/action.yml"
218
+ - ".github/actions/rl-scanner/action.yml"
218
219
  - ".github/actions/rubygems-publish/action.yml"
219
220
  - ".github/actions/setup/action.yml"
220
221
  - ".github/actions/tag-exists/action.yml"
@@ -223,6 +224,7 @@ files:
223
224
  - ".github/workflows/codeql.yml"
224
225
  - ".github/workflows/matrix.json"
225
226
  - ".github/workflows/release.yml"
227
+ - ".github/workflows/rl-scanner.yml"
226
228
  - ".github/workflows/ruby-release.yml"
227
229
  - ".github/workflows/semgrep.yml"
228
230
  - ".github/workflows/snyk.yml"
@@ -339,9 +341,11 @@ files:
339
341
  - lib/auth0/api/v2/logs.rb
340
342
  - lib/auth0/api/v2/organizations.rb
341
343
  - lib/auth0/api/v2/prompts.rb
344
+ - lib/auth0/api/v2/refresh_tokens.rb
342
345
  - lib/auth0/api/v2/resource_servers.rb
343
346
  - lib/auth0/api/v2/roles.rb
344
347
  - lib/auth0/api/v2/rules.rb
348
+ - lib/auth0/api/v2/sessions.rb
345
349
  - lib/auth0/api/v2/stats.rb
346
350
  - lib/auth0/api/v2/tenants.rb
347
351
  - lib/auth0/api/v2/tickets.rb
@@ -559,9 +563,11 @@ files:
559
563
  - spec/lib/auth0/api/v2/logs_spec.rb
560
564
  - spec/lib/auth0/api/v2/organizations_spec.rb
561
565
  - spec/lib/auth0/api/v2/prompts_spec.rb
566
+ - spec/lib/auth0/api/v2/refresh_tokens_spec.rb
562
567
  - spec/lib/auth0/api/v2/resource_servers_spec.rb
563
568
  - spec/lib/auth0/api/v2/roles_spec.rb
564
569
  - spec/lib/auth0/api/v2/rules_spec.rb
570
+ - spec/lib/auth0/api/v2/sessions_spec.rb
565
571
  - spec/lib/auth0/api/v2/stats_spec.rb
566
572
  - spec/lib/auth0/api/v2/tenants_spec.rb
567
573
  - spec/lib/auth0/api/v2/tickets_spec.rb