auth0 5.8.1 → 5.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bundle/config +2 -1
- data/.circleci/config.yml +6 -4
- data/.devcontainer/Dockerfile +19 -0
- data/.devcontainer/devcontainer.json +37 -0
- data/CHANGELOG.md +24 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +52 -80
- data/auth0.gemspec +2 -2
- data/examples/ruby-api/Gemfile +3 -2
- data/examples/ruby-api/Gemfile.lock +32 -0
- data/examples/ruby-api/README.md +2 -2
- data/lib/auth0/api/authentication_endpoints.rb +0 -2
- data/lib/auth0/api/v2/connections.rb +6 -3
- data/lib/auth0/api/v2/device_credentials.rb +1 -1
- data/lib/auth0/api/v2/jobs.rb +15 -4
- data/lib/auth0/api/v2/organizations.rb +1 -1
- data/lib/auth0/api/v2/users.rb +10 -1
- data/lib/auth0/mixins/httpproxy.rb +11 -12
- data/lib/auth0/mixins/token_management.rb +1 -1
- data/lib/auth0/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Clients/_patch_client/should_update_the_client_with_the_correct_attributes.yml +2 -1
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Connections/_update_connection/should_update_the_connection.yml +1 -1
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Rules/_update_rule/should_update_the_disabled_rule_to_be_enabled.yml +1 -1
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Tenants/_update_tenant_settings/should_revert_the_tenant_name.yml +1 -1
- 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
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_add_user_roles/should_add_a_Role_to_a_User_successfully.yml +1 -1
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Users/_patch_user/should_patch_the_User_successfully.yml +1 -1
- data/spec/lib/auth0/api/v2/connections_spec.rb +24 -4
- data/spec/lib/auth0/api/v2/jobs_spec.rb +18 -0
- data/spec/lib/auth0/api/v2/users_spec.rb +15 -0
- data/spec/lib/auth0/mixins/httpproxy_spec.rb +53 -17
- data/spec/lib/auth0/mixins/token_management_spec.rb +2 -7
- data/spec/spec_helper.rb +6 -2
- metadata +14 -241
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40aab484c4f3864d285e116a837151c8e57872a9f879485bdf2433a926b4f668
|
4
|
+
data.tar.gz: 7affd4b6a58f93b73bfa66c8aea85c8064e14a0c74e692e8952223dfda8947a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68da74cb1dac1f68810babc29ceef1ea51d5ef16db4f462d728feb904e2734aae58882cf8a2e945710ccdd796d0c2957a378a42e36b2d3aeb0a286dd52604eae
|
7
|
+
data.tar.gz: 16a91e8033143986d95d8857c66f2642640df6b8416ab7e88f0478668336447c95fbf30fda20a058656cea7936ae1b36d376f99ade14953b10e25faa458de4bb
|
data/.bundle/config
CHANGED
data/.circleci/config.yml
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
version: 2.1
|
2
2
|
orbs:
|
3
|
-
ship: auth0/ship@
|
3
|
+
ship: auth0/ship@dev:alpha
|
4
|
+
codecov: codecov/codecov@3
|
4
5
|
|
5
6
|
matrix_ruby_versions: &matrix_ruby_versions
|
6
7
|
matrix:
|
7
8
|
parameters:
|
8
|
-
ruby_version: ["2.
|
9
|
+
ruby_version: ["2.7", "3.0", "3.1"]
|
9
10
|
# Default version of ruby to use for lint and publishing
|
10
|
-
default_ruby_version: &default_ruby_version "
|
11
|
+
default_ruby_version: &default_ruby_version "3.1"
|
11
12
|
|
12
13
|
executors:
|
13
14
|
ruby-image:
|
@@ -29,7 +30,7 @@ jobs:
|
|
29
30
|
ruby_version: << parameters.ruby_version >>
|
30
31
|
steps:
|
31
32
|
- checkout
|
32
|
-
- run: gem install bundler:
|
33
|
+
- run: gem install bundler:2.3.22
|
33
34
|
- run: rm Gemfile.lock
|
34
35
|
- restore_cache:
|
35
36
|
key: gems-v2-{{ checksum "Gemfile.lock" }}
|
@@ -40,6 +41,7 @@ jobs:
|
|
40
41
|
- vendor/bundle
|
41
42
|
# Must define DOMAIN, CLIENT_ID, CLIENT_SECRET and MASTER_JWT env
|
42
43
|
- run: bundle exec rake test
|
44
|
+
- codecov/upload
|
43
45
|
|
44
46
|
workflows:
|
45
47
|
tests:
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ruby/.devcontainer/base.Dockerfile
|
2
|
+
|
3
|
+
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.1, 3.0, 2, 2.7, 3-bullseye, 3.1-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 3-buster, 3.1-buster, 3.0-buster, 2-buster, 2.7-buster
|
4
|
+
ARG VARIANT="3.1-bullseye"
|
5
|
+
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
|
6
|
+
|
7
|
+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
|
8
|
+
ARG NODE_VERSION="none"
|
9
|
+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
10
|
+
|
11
|
+
# [Optional] Uncomment this section to install additional OS packages.
|
12
|
+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
13
|
+
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
14
|
+
|
15
|
+
# [Optional] Uncomment this line to install additional gems.
|
16
|
+
# RUN gem install <your-gem-names-here>
|
17
|
+
|
18
|
+
# [Optional] Uncomment this line to install global node packages.
|
19
|
+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
2
|
+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ruby
|
3
|
+
{
|
4
|
+
"name": "Ruby",
|
5
|
+
"build": {
|
6
|
+
"dockerfile": "Dockerfile",
|
7
|
+
"args": {
|
8
|
+
// Update 'VARIANT' to pick a Ruby version: 3, 3.1, 3.0, 2, 2.7
|
9
|
+
// Append -bullseye or -buster to pin to an OS version.
|
10
|
+
// Use -bullseye variants on local on arm64/Apple Silicon.
|
11
|
+
"VARIANT": "3.1",
|
12
|
+
// Options
|
13
|
+
"NODE_VERSION": "lts/*"
|
14
|
+
}
|
15
|
+
},
|
16
|
+
|
17
|
+
// Configure tool-specific properties.
|
18
|
+
"customizations": {
|
19
|
+
// Configure properties specific to VS Code.
|
20
|
+
"vscode": {
|
21
|
+
// Add the IDs of extensions you want installed when the container is created.
|
22
|
+
"extensions": [
|
23
|
+
"rebornix.Ruby"
|
24
|
+
]
|
25
|
+
}
|
26
|
+
},
|
27
|
+
|
28
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
29
|
+
// "forwardPorts": [],
|
30
|
+
|
31
|
+
// Use 'postCreateCommand' to run commands after the container is created.
|
32
|
+
// "postCreateCommand": "ruby --version",
|
33
|
+
|
34
|
+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
35
|
+
"remoteUser": "vscode"
|
36
|
+
|
37
|
+
}
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v5.10.0](https://github.com/auth0/ruby-auth0/tree/v5.10.0) (2022-10-10)
|
4
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.9.0...v5.10.0)
|
5
|
+
|
6
|
+
**Changed**
|
7
|
+
- Update jwt ~2.5 [\#384](https://github.com/auth0/ruby-auth0/pull/384) ([stevehobbsdev](https://github.com/stevehobbsdev))
|
8
|
+
|
9
|
+
**Fixed**
|
10
|
+
- Stop :get, :delete parameters from bleeding into subsequent requests [\#388](https://github.com/auth0/ruby-auth0/pull/388) ([stevehobbsdev](https://github.com/stevehobbsdev))
|
11
|
+
- Support complex field names in export_users [\#387](https://github.com/auth0/ruby-auth0/pull/387) ([stevehobbsdev](https://github.com/stevehobbsdev))
|
12
|
+
- Reconfigure rate limiting exponential backoff [\#386](https://github.com/auth0/ruby-auth0/pull/386) ([stevehobbsdev](https://github.com/stevehobbsdev))
|
13
|
+
|
14
|
+
## [v5.9.0](https://github.com/auth0/ruby-auth0/tree/v5.9.0) (2022-08-24)
|
15
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.8.1...v5.9.0)
|
16
|
+
|
17
|
+
**Added**
|
18
|
+
- Add Delete All Authenticators API for Users [\#375](https://github.com/auth0/ruby-auth0/pull/375) ([phongnh](https://github.com/phongnh))
|
19
|
+
|
20
|
+
**Changed**
|
21
|
+
- Add include_totals to get connections options [\#357](https://github.com/auth0/ruby-auth0/pull/357) ([stevehobbsdev](https://github.com/stevehobbsdev))
|
22
|
+
|
23
|
+
**Fixed**
|
24
|
+
- Fix typo and remove param that is not used [\#365](https://github.com/auth0/ruby-auth0/pull/365) ([MatthewRDodds](https://github.com/MatthewRDodds))
|
25
|
+
- correct remove_user_roles doc: roles param is ids, not names [\#359](https://github.com/auth0/ruby-auth0/pull/359) ([gbirchmeier](https://github.com/gbirchmeier))
|
26
|
+
|
3
27
|
## [v5.8.1](https://github.com/auth0/ruby-auth0/tree/v5.8.1) (2022-06-30)
|
4
28
|
|
5
29
|
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.8.0...v5.8.1)
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
auth0 (5.
|
4
|
+
auth0 (5.10.0)
|
5
5
|
addressable (~> 2.8)
|
6
|
-
jwt (~> 2.
|
6
|
+
jwt (~> 2.5)
|
7
7
|
rest-client (~> 2.1)
|
8
8
|
retryable (~> 3.0)
|
9
9
|
zache (~> 0.12)
|
@@ -11,30 +11,28 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
actionpack (7.0.
|
15
|
-
actionview (= 7.0.
|
16
|
-
activesupport (= 7.0.
|
14
|
+
actionpack (7.0.4)
|
15
|
+
actionview (= 7.0.4)
|
16
|
+
activesupport (= 7.0.4)
|
17
17
|
rack (~> 2.0, >= 2.2.0)
|
18
18
|
rack-test (>= 0.6.3)
|
19
19
|
rails-dom-testing (~> 2.0)
|
20
20
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
21
|
-
actionview (7.0.
|
22
|
-
activesupport (= 7.0.
|
21
|
+
actionview (7.0.4)
|
22
|
+
activesupport (= 7.0.4)
|
23
23
|
builder (~> 3.1)
|
24
24
|
erubi (~> 1.4)
|
25
25
|
rails-dom-testing (~> 2.0)
|
26
26
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
27
|
-
activesupport (7.0.
|
27
|
+
activesupport (7.0.4)
|
28
28
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
29
29
|
i18n (>= 1.6, < 2)
|
30
30
|
minitest (>= 5.1)
|
31
31
|
tzinfo (~> 2.0)
|
32
|
-
addressable (2.8.
|
33
|
-
public_suffix (>= 2.0.2, <
|
32
|
+
addressable (2.8.1)
|
33
|
+
public_suffix (>= 2.0.2, < 6.0)
|
34
34
|
ast (2.4.2)
|
35
35
|
builder (3.2.4)
|
36
|
-
codecov (0.6.0)
|
37
|
-
simplecov (>= 0.15, < 0.22)
|
38
36
|
coderay (1.1.3)
|
39
37
|
concurrent-ruby (1.1.10)
|
40
38
|
coveralls (0.7.1)
|
@@ -50,77 +48,54 @@ GEM
|
|
50
48
|
docile (1.4.0)
|
51
49
|
domain_name (0.5.20190701)
|
52
50
|
unf (>= 0.0.5, < 1.0.0)
|
53
|
-
dotenv (2.
|
54
|
-
dotenv-rails (2.
|
55
|
-
dotenv (= 2.
|
51
|
+
dotenv (2.8.1)
|
52
|
+
dotenv-rails (2.8.1)
|
53
|
+
dotenv (= 2.8.1)
|
56
54
|
railties (>= 3.2)
|
57
|
-
erubi (1.
|
58
|
-
faker (2.
|
55
|
+
erubi (1.11.0)
|
56
|
+
faker (2.23.0)
|
59
57
|
i18n (>= 1.8.11, < 2)
|
60
|
-
ffi (1.15.5)
|
61
|
-
formatador (1.1.0)
|
62
58
|
fuubar (2.5.1)
|
63
59
|
rspec-core (~> 3.0)
|
64
60
|
ruby-progressbar (~> 1.4)
|
65
61
|
gem-release (0.7.4)
|
66
|
-
guard (2.17.0)
|
67
|
-
formatador (>= 0.2.4)
|
68
|
-
listen (>= 2.7, < 4.0)
|
69
|
-
lumberjack (>= 1.0.12, < 2.0)
|
70
|
-
nenv (~> 0.1)
|
71
|
-
notiffany (~> 0.0)
|
72
|
-
pry (>= 0.9.12)
|
73
|
-
shellany (~> 0.0)
|
74
|
-
thor (>= 0.18.1)
|
75
|
-
guard-compat (1.2.1)
|
76
|
-
guard-rspec (4.7.3)
|
77
|
-
guard (~> 2.1)
|
78
|
-
guard-compat (~> 1.1)
|
79
|
-
rspec (>= 2.99.0, < 4.0)
|
80
62
|
hashdiff (1.0.1)
|
81
63
|
http-accept (1.7.0)
|
82
64
|
http-cookie (1.0.5)
|
83
65
|
domain_name (~> 0.5)
|
84
|
-
i18n (1.
|
66
|
+
i18n (1.12.0)
|
85
67
|
concurrent-ruby (~> 1.0)
|
86
68
|
io-console (0.5.11)
|
87
|
-
irb (1.4.
|
69
|
+
irb (1.4.2)
|
88
70
|
reline (>= 0.3.0)
|
89
71
|
json (2.6.2)
|
90
|
-
jwt (2.
|
91
|
-
|
92
|
-
rb-fsevent (~> 0.10, >= 0.10.3)
|
93
|
-
rb-inotify (~> 0.9, >= 0.9.10)
|
94
|
-
loofah (2.18.0)
|
72
|
+
jwt (2.5.0)
|
73
|
+
loofah (2.19.0)
|
95
74
|
crass (~> 1.0.2)
|
96
75
|
nokogiri (>= 1.5.9)
|
97
|
-
lumberjack (1.2.8)
|
98
76
|
method_source (0.9.2)
|
99
77
|
mime-types (3.4.1)
|
100
78
|
mime-types-data (~> 3.2015)
|
101
79
|
mime-types-data (3.2022.0105)
|
102
|
-
|
103
|
-
minitest (5.16.1)
|
80
|
+
minitest (5.16.3)
|
104
81
|
multi_json (1.15.0)
|
105
|
-
nenv (0.3.0)
|
106
82
|
netrc (0.11.0)
|
107
|
-
nokogiri (1.13.
|
108
|
-
mini_portile2 (~> 2.8.0)
|
83
|
+
nokogiri (1.13.8-x86_64-linux)
|
109
84
|
racc (~> 1.4)
|
110
|
-
notiffany (0.1.3)
|
111
|
-
nenv (~> 0.1)
|
112
|
-
shellany (~> 0.0)
|
113
85
|
parallel (1.22.1)
|
114
|
-
parser (3.1.2.
|
86
|
+
parser (3.1.2.1)
|
115
87
|
ast (~> 2.4.1)
|
88
|
+
pp (0.3.0)
|
89
|
+
prettyprint
|
90
|
+
prettyprint (0.1.1)
|
116
91
|
pry (0.12.2)
|
117
92
|
coderay (~> 1.1.0)
|
118
93
|
method_source (~> 0.9.0)
|
119
94
|
pry-nav (0.3.0)
|
120
95
|
pry (>= 0.9.10, < 0.13.0)
|
121
|
-
public_suffix (
|
96
|
+
public_suffix (5.0.0)
|
122
97
|
racc (1.6.0)
|
123
|
-
rack (2.2.
|
98
|
+
rack (2.2.4)
|
124
99
|
rack-test (0.8.3)
|
125
100
|
rack (>= 1.0, < 3)
|
126
101
|
rails-dom-testing (2.0.3)
|
@@ -128,19 +103,16 @@ GEM
|
|
128
103
|
nokogiri (>= 1.6)
|
129
104
|
rails-html-sanitizer (1.4.3)
|
130
105
|
loofah (~> 2.3)
|
131
|
-
railties (7.0.
|
132
|
-
actionpack (= 7.0.
|
133
|
-
activesupport (= 7.0.
|
106
|
+
railties (7.0.4)
|
107
|
+
actionpack (= 7.0.4)
|
108
|
+
activesupport (= 7.0.4)
|
134
109
|
method_source
|
135
110
|
rake (>= 12.2)
|
136
111
|
thor (~> 1.0)
|
137
112
|
zeitwerk (~> 2.5)
|
138
113
|
rainbow (3.1.1)
|
139
114
|
rake (13.0.6)
|
140
|
-
|
141
|
-
rb-inotify (0.10.1)
|
142
|
-
ffi (~> 1.0)
|
143
|
-
regexp_parser (2.5.0)
|
115
|
+
regexp_parser (2.6.0)
|
144
116
|
reline (0.3.1)
|
145
117
|
io-console (~> 0.5)
|
146
118
|
rest-client (2.1.0)
|
@@ -156,86 +128,86 @@ GEM
|
|
156
128
|
rspec-mocks (~> 3.11.0)
|
157
129
|
rspec-core (3.11.0)
|
158
130
|
rspec-support (~> 3.11.0)
|
159
|
-
rspec-expectations (3.11.
|
131
|
+
rspec-expectations (3.11.1)
|
160
132
|
diff-lcs (>= 1.2.0, < 2.0)
|
161
133
|
rspec-support (~> 3.11.0)
|
162
134
|
rspec-mocks (3.11.1)
|
163
135
|
diff-lcs (>= 1.2.0, < 2.0)
|
164
136
|
rspec-support (~> 3.11.0)
|
165
|
-
rspec-support (3.11.
|
166
|
-
rubocop (1.
|
137
|
+
rspec-support (3.11.1)
|
138
|
+
rubocop (1.36.0)
|
167
139
|
json (~> 2.3)
|
168
140
|
parallel (~> 1.10)
|
169
|
-
parser (>= 3.1.
|
141
|
+
parser (>= 3.1.2.1)
|
170
142
|
rainbow (>= 2.2.2, < 4.0)
|
171
143
|
regexp_parser (>= 1.8, < 3.0)
|
172
144
|
rexml (>= 3.2.5, < 4.0)
|
173
|
-
rubocop-ast (>= 1.
|
145
|
+
rubocop-ast (>= 1.20.1, < 2.0)
|
174
146
|
ruby-progressbar (~> 1.7)
|
175
147
|
unicode-display_width (>= 1.4.0, < 3.0)
|
176
|
-
rubocop-ast (1.
|
148
|
+
rubocop-ast (1.21.0)
|
177
149
|
parser (>= 3.1.1.0)
|
178
|
-
rubocop-rails (2.
|
150
|
+
rubocop-rails (2.16.1)
|
179
151
|
activesupport (>= 4.2.0)
|
180
152
|
rack (>= 1.1)
|
181
|
-
rubocop (>= 1.
|
153
|
+
rubocop (>= 1.33.0, < 2.0)
|
182
154
|
ruby-progressbar (1.11.0)
|
183
|
-
shellany (0.0.1)
|
184
155
|
simplecov (0.21.2)
|
185
156
|
docile (~> 1.1)
|
186
157
|
simplecov-html (~> 0.11)
|
187
158
|
simplecov_json_formatter (~> 0.1)
|
159
|
+
simplecov-cobertura (2.1.0)
|
160
|
+
rexml
|
161
|
+
simplecov (~> 0.19)
|
188
162
|
simplecov-html (0.12.3)
|
189
163
|
simplecov_json_formatter (0.1.4)
|
190
164
|
sync (0.5.0)
|
191
165
|
term-ansicolor (1.7.1)
|
192
166
|
tins (~> 1.0)
|
193
|
-
terminal-notifier-guard (1.7.0)
|
194
167
|
thor (1.2.1)
|
195
168
|
timecop (0.9.5)
|
196
169
|
tins (1.31.1)
|
197
170
|
sync
|
198
|
-
tzinfo (2.0.
|
171
|
+
tzinfo (2.0.5)
|
199
172
|
concurrent-ruby (~> 1.0)
|
200
173
|
unf (0.1.4)
|
201
174
|
unf_ext
|
202
175
|
unf_ext (0.0.8.2)
|
203
|
-
unicode-display_width (2.
|
176
|
+
unicode-display_width (2.3.0)
|
204
177
|
vcr (6.1.0)
|
205
|
-
webmock (3.
|
178
|
+
webmock (3.18.1)
|
206
179
|
addressable (>= 2.8.0)
|
207
180
|
crack (>= 0.3.2)
|
208
181
|
hashdiff (>= 0.4.0, < 2.0.0)
|
209
182
|
zache (0.12.0)
|
210
|
-
zeitwerk (2.6.
|
183
|
+
zeitwerk (2.6.1)
|
211
184
|
|
212
185
|
PLATFORMS
|
213
|
-
|
186
|
+
x86_64-linux
|
214
187
|
|
215
188
|
DEPENDENCIES
|
216
189
|
auth0!
|
217
190
|
bundler
|
218
|
-
codecov
|
219
191
|
coveralls
|
220
192
|
dotenv-rails (~> 2.0)
|
221
193
|
faker (~> 2.0)
|
222
194
|
fuubar (~> 2.0)
|
223
195
|
gem-release (~> 0.7)
|
224
|
-
guard-rspec (~> 4.5)
|
225
196
|
irb
|
197
|
+
pp
|
226
198
|
pry (~> 0.10)
|
227
199
|
pry-nav (~> 0.2)
|
228
200
|
rack (~> 2.1)
|
229
201
|
rack-test (~> 0.6)
|
230
202
|
rake (~> 13.0)
|
231
|
-
rspec (~> 3.
|
203
|
+
rspec (~> 3.11)
|
232
204
|
rubocop
|
233
205
|
rubocop-rails
|
234
|
-
simplecov
|
235
|
-
|
206
|
+
simplecov (~> 0.9)
|
207
|
+
simplecov-cobertura
|
236
208
|
timecop
|
237
209
|
vcr
|
238
210
|
webmock
|
239
211
|
|
240
212
|
BUNDLED WITH
|
241
|
-
|
213
|
+
2.3.11
|
data/auth0.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.require_paths = ['lib']
|
18
18
|
|
19
19
|
s.add_runtime_dependency 'rest-client', '~> 2.1'
|
20
|
-
s.add_runtime_dependency 'jwt', '~> 2.
|
20
|
+
s.add_runtime_dependency 'jwt', '~> 2.5'
|
21
21
|
s.add_runtime_dependency 'zache', '~> 0.12'
|
22
22
|
s.add_runtime_dependency 'addressable', '~> 2.8'
|
23
23
|
s.add_runtime_dependency 'retryable', '~> 3.0'
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_development_dependency 'dotenv-rails', '~> 2.0'
|
30
30
|
s.add_development_dependency 'pry', '~> 0.10'
|
31
31
|
s.add_development_dependency 'pry-nav', '~> 0.2'
|
32
|
-
s.add_development_dependency 'rspec', '~> 3.
|
32
|
+
s.add_development_dependency 'rspec', '~> 3.11'
|
33
33
|
s.add_development_dependency 'rack-test', '~> 0.6'
|
34
34
|
s.add_development_dependency 'rack', '~> 2.1'
|
35
35
|
s.add_development_dependency 'simplecov', '~> 0.9'
|
data/examples/ruby-api/Gemfile
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
dotenv (2.8.1)
|
5
|
+
jwt (2.5.0)
|
6
|
+
mustermann (2.0.2)
|
7
|
+
ruby2_keywords (~> 0.0.1)
|
8
|
+
nio4r (2.5.8)
|
9
|
+
puma (5.6.5)
|
10
|
+
nio4r (~> 2.0)
|
11
|
+
rack (2.2.4)
|
12
|
+
rack-protection (2.2.2)
|
13
|
+
rack
|
14
|
+
ruby2_keywords (0.0.5)
|
15
|
+
sinatra (2.2.2)
|
16
|
+
mustermann (~> 2.0)
|
17
|
+
rack (~> 2.2)
|
18
|
+
rack-protection (= 2.2.2)
|
19
|
+
tilt (~> 2.0)
|
20
|
+
tilt (2.0.11)
|
21
|
+
|
22
|
+
PLATFORMS
|
23
|
+
aarch64-linux
|
24
|
+
|
25
|
+
DEPENDENCIES
|
26
|
+
dotenv
|
27
|
+
jwt (~> 2.5)
|
28
|
+
puma
|
29
|
+
sinatra (~> 2.2)
|
30
|
+
|
31
|
+
BUNDLED WITH
|
32
|
+
2.3.7
|
data/examples/ruby-api/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
#Auth0 + Ruby API Seed
|
1
|
+
# Auth0 + Ruby API Seed
|
2
2
|
|
3
3
|
This is the seed project you need to use if you're going to create a Ruby API. You'll mostly use this API either for a SPA or a Mobile app.
|
4
4
|
|
5
|
-
#Running the example
|
5
|
+
# Running the example
|
6
6
|
|
7
7
|
In order to run the example you need to have ruby installed.
|
8
8
|
|
@@ -170,8 +170,6 @@ module Auth0
|
|
170
170
|
# @see https://auth0.com/docs/api/authentication#change-password
|
171
171
|
# @see https://auth0.com/docs/connections/database/password-change
|
172
172
|
# @param email [string] User's current email
|
173
|
-
# @param password [string] User's new password; empty to trigger a
|
174
|
-
# password reset email
|
175
173
|
# @param connection_name [string] Database connection name
|
176
174
|
# @param client_id [string] Client ID override (to allow forwarding
|
177
175
|
# to a different application's login URI on password reset success page)
|
@@ -14,6 +14,7 @@ module Auth0
|
|
14
14
|
# @param include_fields [boolean] True if the fields specified are to be included in the result, false otherwise.
|
15
15
|
# @param page [int] Page number to get, 0-based.
|
16
16
|
# @param per_page [int] Results per page if also passing a page number.
|
17
|
+
# @param include_totals [boolean] True if query totals should be included in the result. Defaults to false.
|
17
18
|
# @return [json] Returns the existing connections matching the strategy.
|
18
19
|
def connections(
|
19
20
|
strategy: nil,
|
@@ -21,7 +22,8 @@ module Auth0
|
|
21
22
|
fields: nil,
|
22
23
|
include_fields: nil,
|
23
24
|
page: nil,
|
24
|
-
per_page: nil
|
25
|
+
per_page: nil,
|
26
|
+
include_totals: nil
|
25
27
|
)
|
26
28
|
include_fields = true if !fields.nil? && include_fields.nil?
|
27
29
|
request_params = {
|
@@ -30,7 +32,8 @@ module Auth0
|
|
30
32
|
fields: fields.is_a?(Array) ? fields.join(',') : fields,
|
31
33
|
include_fields: include_fields,
|
32
34
|
page: !page.nil? ? page.to_i : nil,
|
33
|
-
per_page: !page.nil? && !per_page.nil? ? per_page.to_i : nil
|
35
|
+
per_page: !page.nil? && !per_page.nil? ? per_page.to_i : nil,
|
36
|
+
include_totals: include_totals
|
34
37
|
}
|
35
38
|
get(connections_path, request_params)
|
36
39
|
end
|
@@ -38,7 +41,7 @@ module Auth0
|
|
38
41
|
|
39
42
|
# Creates a new connection according to the JSON object received in body.
|
40
43
|
# @see https://auth0.com/docs/api/v2#!/Connections/post_connections
|
41
|
-
# @param body [hash] The Hash options used to define the
|
44
|
+
# @param body [hash] The Hash options used to define the connections's properties.
|
42
45
|
#
|
43
46
|
# @return [json] Returns the created connection.
|
44
47
|
def create_connection(body)
|
data/lib/auth0/api/v2/jobs.rb
CHANGED
@@ -60,6 +60,9 @@ module Auth0
|
|
60
60
|
# :format [string] The format of the file. Valid values are: "json" and "csv".
|
61
61
|
# :limit [integer] Limit the number of users to export.
|
62
62
|
# :fields [array] A list of fields to be included in the CSV.
|
63
|
+
# This can either be an array of strings representing field names, or an object.
|
64
|
+
# If it's a string, it is mapped to the correct { name: '<field name>' } object required by the endpoint.
|
65
|
+
# If it's an object, it is passed through as-is to the endpoint.
|
63
66
|
# If omitted, a set of predefined fields will be exported.
|
64
67
|
#
|
65
68
|
# @return [json] Returns the job status and properties.
|
@@ -109,14 +112,22 @@ module Auth0
|
|
109
112
|
@jobs_path ||= '/api/v2/jobs'
|
110
113
|
end
|
111
114
|
|
112
|
-
# Map array of
|
113
|
-
# @param fields [array]
|
114
|
-
|
115
|
+
# Map array of fields for export to array of objects
|
116
|
+
# @param fields [array] Fields to be included in the export
|
117
|
+
# This can either be an array of strings representing field names, or an object.
|
118
|
+
# If it's a string, it is mapped to the correct { name: '<field name>' } object required by the endpoint.
|
119
|
+
# If it's an object, it is passed through as-is to the endpoint.
|
115
120
|
# @return [array] Returns the fields mapped as array of objects for the export_users endpoint
|
116
121
|
def fields_for_export(fields)
|
117
122
|
return nil if fields.to_s.empty?
|
118
123
|
|
119
|
-
fields.map { |field|
|
124
|
+
fields.map { |field|
|
125
|
+
if field.is_a? String
|
126
|
+
{ name: field }
|
127
|
+
else
|
128
|
+
field
|
129
|
+
end
|
130
|
+
}
|
120
131
|
end
|
121
132
|
end
|
122
133
|
end
|
@@ -9,7 +9,7 @@ module Auth0
|
|
9
9
|
|
10
10
|
# Get all organizations.
|
11
11
|
# @see https://auth0.com/docs/api/management/v2/#!/Organizations/get_organizations
|
12
|
-
# @param options [hash] The Hash options used to define the paging of
|
12
|
+
# @param options [hash] The Hash options used to define the paging of results
|
13
13
|
# * :per_page [integer] The amount of entries per page. Default: 50. Max value: 100.
|
14
14
|
# * :page [integer] The page number. Zero based.
|
15
15
|
# * :from [string] For checkpoint pagination, the ID from which to start selection from.
|
data/lib/auth0/api/v2/users.rb
CHANGED
@@ -111,6 +111,15 @@ module Auth0
|
|
111
111
|
end
|
112
112
|
alias update_user patch_user
|
113
113
|
|
114
|
+
# Delete all authenticators
|
115
|
+
# @see https://auth0.com/docs/api/management/v2#!/Users/delete_authenticators
|
116
|
+
# @param user_id [string] The user_id of the user to delete all authenticators
|
117
|
+
def delete_user_authenticators(user_id)
|
118
|
+
raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
|
119
|
+
path = "#{users_path}/#{user_id}/authenticators"
|
120
|
+
delete(path)
|
121
|
+
end
|
122
|
+
|
114
123
|
# Delete a user's multifactor provider
|
115
124
|
# @see https://auth0.com/docs/api/v2#!/Users/delete_multifactor_by_provider
|
116
125
|
# @param user_id [string] The user_id of the user to delete the multifactor provider from.
|
@@ -215,7 +224,7 @@ module Auth0
|
|
215
224
|
# @see https://auth0.com/docs/api/management/v2#!/Users/delete_user_roles
|
216
225
|
#
|
217
226
|
# @param user_id [string] The user_id of the roles to remove.
|
218
|
-
# @param roles [array] An array of role
|
227
|
+
# @param roles [array] An array of role ids to remove.
|
219
228
|
def remove_user_roles(user_id, roles)
|
220
229
|
raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
|
221
230
|
validate_strings_array roles
|