auth0 4.13.0 → 4.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +23 -23
- data/lib/auth0/api/v1/clients.rb +12 -2
- data/lib/auth0/api/v1/connections.rb +15 -0
- data/lib/auth0/api/v1/logs.rb +9 -0
- data/lib/auth0/api/v1/rules.rb +12 -0
- data/lib/auth0/api/v1/users.rb +63 -0
- data/lib/auth0/mixins/validation.rb +0 -8
- data/lib/auth0/version.rb +1 -1
- data/spec/lib/auth0/mixins/validation_spec.rb +0 -8
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc1dbd26961a59010e19ffa75076a5e28080735900aaaf4c9c8537656094809e
|
4
|
+
data.tar.gz: 27520c6efd37f253b532d6521b5e46599d9a093dd46500d46997ff3e7f9030ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a95ccde21a047bd9689f04cb972caf49d7a1cfb409bb72275b0bd0464d6c75f29d1ddb2475ec377b619230c71dfa13f08543557c33a8fc93f40521c322b190d7
|
7
|
+
data.tar.gz: fe75df00376402b03ba921d0bd7bba8d1df3c725966f282bca92948ba18a7343a1c544edc2b722e98b963678d7469d884204e1579d3bf9056fa65574fd4df851
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v4.14.0](https://github.com/auth0/ruby-auth0/tree/v4.14.0) (2020-07-20)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v4.13.0...v4.14.0)
|
6
|
+
|
7
|
+
**Deprecated**
|
8
|
+
|
9
|
+
- Deprecate mgmt v1 calls [\#230](https://github.com/auth0/ruby-auth0/pull/230) ([davidpatrick](https://github.com/davidpatrick))
|
10
|
+
|
11
|
+
**Removed**
|
12
|
+
|
13
|
+
- Remove iat claim value check [\#229](https://github.com/auth0/ruby-auth0/pull/229) ([lbalmaceda](https://github.com/lbalmaceda))
|
14
|
+
|
15
|
+
**Fixed**
|
16
|
+
|
17
|
+
- Handle missing reset header [\#228](https://github.com/auth0/ruby-auth0/pull/228) ([Widcket](https://github.com/Widcket))
|
18
|
+
|
3
19
|
## [v4.13.0](https://github.com/auth0/ruby-auth0/tree/v4.13.0) (2020-06-18)
|
4
20
|
|
5
21
|
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v4.12.0...v4.13.0)
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
auth0 (4.
|
4
|
+
auth0 (4.14.0)
|
5
5
|
jwt (~> 2.2.0)
|
6
6
|
rest-client (~> 2.0.0)
|
7
7
|
zache (~> 0.12.0)
|
@@ -32,11 +32,12 @@ GEM
|
|
32
32
|
public_suffix (>= 2.0.2, < 5.0)
|
33
33
|
ast (2.4.1)
|
34
34
|
builder (3.2.4)
|
35
|
-
codecov (0.
|
35
|
+
codecov (0.2.2)
|
36
|
+
colorize
|
36
37
|
json
|
37
38
|
simplecov
|
38
|
-
url
|
39
39
|
coderay (1.1.3)
|
40
|
+
colorize (0.8.1)
|
40
41
|
concurrent-ruby (1.1.6)
|
41
42
|
coveralls (0.7.1)
|
42
43
|
multi_json (~> 1.3)
|
@@ -47,14 +48,14 @@ GEM
|
|
47
48
|
crack (0.4.3)
|
48
49
|
safe_yaml (~> 1.0.0)
|
49
50
|
crass (1.0.6)
|
50
|
-
diff-lcs (1.
|
51
|
+
diff-lcs (1.4.4)
|
51
52
|
docile (1.3.2)
|
52
53
|
domain_name (0.5.20190701)
|
53
54
|
unf (>= 0.0.5, < 1.0.0)
|
54
|
-
dotenv (2.7.
|
55
|
-
dotenv-rails (2.7.
|
56
|
-
dotenv (= 2.7.
|
57
|
-
railties (>= 3.2
|
55
|
+
dotenv (2.7.6)
|
56
|
+
dotenv-rails (2.7.6)
|
57
|
+
dotenv (= 2.7.6)
|
58
|
+
railties (>= 3.2)
|
58
59
|
erubi (1.9.0)
|
59
60
|
faker (1.9.6)
|
60
61
|
i18n (>= 0.7)
|
@@ -81,9 +82,9 @@ GEM
|
|
81
82
|
hashdiff (1.0.1)
|
82
83
|
http-cookie (1.0.3)
|
83
84
|
domain_name (~> 0.5)
|
84
|
-
i18n (1.8.
|
85
|
+
i18n (1.8.4)
|
85
86
|
concurrent-ruby (~> 1.0)
|
86
|
-
json (2.3.
|
87
|
+
json (2.3.1)
|
87
88
|
jwt (2.2.1)
|
88
89
|
listen (3.2.1)
|
89
90
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
@@ -91,24 +92,24 @@ GEM
|
|
91
92
|
loofah (2.6.0)
|
92
93
|
crass (~> 1.0.2)
|
93
94
|
nokogiri (>= 1.5.9)
|
94
|
-
lumberjack (1.2.
|
95
|
+
lumberjack (1.2.6)
|
95
96
|
method_source (0.8.2)
|
96
97
|
mime-types (3.3.1)
|
97
98
|
mime-types-data (~> 3.2015)
|
98
99
|
mime-types-data (3.2020.0512)
|
99
100
|
mini_portile2 (2.4.0)
|
100
101
|
minitest (5.14.1)
|
101
|
-
multi_json (1.
|
102
|
+
multi_json (1.15.0)
|
102
103
|
nenv (0.3.0)
|
103
104
|
netrc (0.11.0)
|
104
|
-
nokogiri (1.10.
|
105
|
+
nokogiri (1.10.10)
|
105
106
|
mini_portile2 (~> 2.4.0)
|
106
107
|
notiffany (0.1.3)
|
107
108
|
nenv (~> 0.1)
|
108
109
|
shellany (~> 0.0)
|
109
110
|
parallel (1.19.2)
|
110
|
-
parser (2.7.1.
|
111
|
-
ast (~> 2.4.
|
111
|
+
parser (2.7.1.4)
|
112
|
+
ast (~> 2.4.1)
|
112
113
|
pry (0.10.4)
|
113
114
|
coderay (~> 1.1.0)
|
114
115
|
method_source (~> 0.8.1)
|
@@ -154,21 +155,21 @@ GEM
|
|
154
155
|
diff-lcs (>= 1.2.0, < 2.0)
|
155
156
|
rspec-support (~> 3.9.0)
|
156
157
|
rspec-support (3.9.3)
|
157
|
-
rubocop (0.
|
158
|
+
rubocop (0.88.0)
|
158
159
|
parallel (~> 1.10)
|
159
|
-
parser (>= 2.7.
|
160
|
+
parser (>= 2.7.1.1)
|
160
161
|
rainbow (>= 2.2.2, < 4.0)
|
161
162
|
regexp_parser (>= 1.7)
|
162
163
|
rexml
|
163
|
-
rubocop-ast (>= 0.0.
|
164
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
164
165
|
ruby-progressbar (~> 1.7)
|
165
166
|
unicode-display_width (>= 1.4.0, < 2.0)
|
166
|
-
rubocop-ast (0.0
|
167
|
+
rubocop-ast (0.2.0)
|
167
168
|
parser (>= 2.7.0.1)
|
168
|
-
rubocop-rails (2.
|
169
|
+
rubocop-rails (2.7.0)
|
169
170
|
activesupport (>= 4.2.0)
|
170
171
|
rack (>= 1.1)
|
171
|
-
rubocop (>= 0.
|
172
|
+
rubocop (>= 0.87.0)
|
172
173
|
ruby-progressbar (1.10.1)
|
173
174
|
safe_yaml (1.0.5)
|
174
175
|
shellany (0.0.1)
|
@@ -191,7 +192,6 @@ GEM
|
|
191
192
|
unf_ext
|
192
193
|
unf_ext (0.0.7.7)
|
193
194
|
unicode-display_width (1.7.0)
|
194
|
-
url (0.3.2)
|
195
195
|
vcr (6.0.0)
|
196
196
|
webmock (3.8.3)
|
197
197
|
addressable (>= 2.3.6)
|
@@ -199,7 +199,7 @@ GEM
|
|
199
199
|
hashdiff (>= 0.4.0, < 2.0.0)
|
200
200
|
yard (0.9.25)
|
201
201
|
zache (0.12.0)
|
202
|
-
zeitwerk (2.
|
202
|
+
zeitwerk (2.4.0)
|
203
203
|
|
204
204
|
PLATFORMS
|
205
205
|
ruby
|
data/lib/auth0/api/v1/clients.rb
CHANGED
@@ -4,7 +4,10 @@ module Auth0
|
|
4
4
|
# {https://auth0.com/docs/api#applications}
|
5
5
|
module Clients
|
6
6
|
# {https://auth0.com/docs/api#!#get--api-clients}
|
7
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Clients
|
8
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
7
9
|
def clients
|
10
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
8
11
|
path = '/api/clients'
|
9
12
|
get(path)
|
10
13
|
end
|
@@ -12,7 +15,10 @@ module Auth0
|
|
12
15
|
alias get_clients clients
|
13
16
|
|
14
17
|
# {https://auth0.com/docs/api#!#post--api-clients}
|
18
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Clients
|
19
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
15
20
|
def create_client(name, callbacks = '')
|
21
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
16
22
|
path = '/api/clients'
|
17
23
|
request_params = {
|
18
24
|
name: name,
|
@@ -21,10 +27,11 @@ module Auth0
|
|
21
27
|
post(path, request_params)
|
22
28
|
end
|
23
29
|
|
24
|
-
# @deprecated use {#patch_client}
|
25
30
|
# {https://auth0.com/docs/api#!#put--api-clients--client-id-}
|
31
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Clients
|
32
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
26
33
|
def update_client(name, callbacks = '', client_id = @client_id)
|
27
|
-
warn
|
34
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
28
35
|
path = "/api/clients/#{client_id}"
|
29
36
|
request_params = {
|
30
37
|
name: name,
|
@@ -34,7 +41,10 @@ module Auth0
|
|
34
41
|
end
|
35
42
|
|
36
43
|
# {https://auth0.com/docs/api#!#patch--api-clients--client-id-}
|
44
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Clients
|
45
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
37
46
|
def patch_client(name, callbacks = '', client_id = @client_id)
|
47
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
38
48
|
path = "/api/clients/#{client_id}"
|
39
49
|
request_params = {
|
40
50
|
name: name,
|
@@ -4,26 +4,38 @@ module Auth0
|
|
4
4
|
# {https://auth0.com/docs/api#connections}
|
5
5
|
module Connections
|
6
6
|
# {https://auth0.com/docs/api#!#get--api-connections}
|
7
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Connections
|
8
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
7
9
|
def connections
|
10
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
8
11
|
get('/api/connections')
|
9
12
|
end
|
10
13
|
alias get_connections connections
|
11
14
|
|
12
15
|
# {https://auth0.com/docs/api#!#get--api-connections--connection-name-}
|
16
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Connections
|
17
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
13
18
|
def connection(connection_name)
|
19
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
14
20
|
path = "/api/connections/#{connection_name}"
|
15
21
|
get(path)
|
16
22
|
end
|
17
23
|
alias get_connection connection
|
18
24
|
|
19
25
|
# {https://auth0.com/docs/api#!#delete--api-connections--connection-name-}
|
26
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Connections
|
27
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
20
28
|
def delete_connection(connection_name)
|
29
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
21
30
|
path = "/api/connections/#{connection_name}"
|
22
31
|
delete(path)
|
23
32
|
end
|
24
33
|
|
25
34
|
# {https://auth0.com/docs/api#!#post--api-connections}
|
35
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Connections
|
36
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
26
37
|
def create_connection(connection_name, strategy, tenant_domain, domain_aliases = nil)
|
38
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
27
39
|
path = '/api/connections'
|
28
40
|
request_params = {
|
29
41
|
name: connection_name,
|
@@ -37,7 +49,10 @@ module Auth0
|
|
37
49
|
end
|
38
50
|
|
39
51
|
# {https://auth0.com/docs/api#!#put--api-connections--connection-name-}
|
52
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Connections
|
53
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
40
54
|
def update_connection(connection_name, tenant_domain, status = true)
|
55
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
41
56
|
path = "/api/connections/#{connection_name}"
|
42
57
|
request_params = {
|
43
58
|
status: status,
|
data/lib/auth0/api/v1/logs.rb
CHANGED
@@ -4,7 +4,10 @@ module Auth0
|
|
4
4
|
# {https://auth0.com/docs/api#logs}
|
5
5
|
module Logs
|
6
6
|
# https://auth0.com/docs/api/v1#!#logs
|
7
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Logs
|
8
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
7
9
|
def logs(options = {})
|
10
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
8
11
|
acceptable_params = %i(take from search_criteria page per_page sort fields exclude_fields)
|
9
12
|
options.reject! do |key, value|
|
10
13
|
next unless key.nil? || value.nil? || !acceptable_params.include?(key.to_sym)
|
@@ -18,13 +21,19 @@ module Auth0
|
|
18
21
|
alias search_logs logs
|
19
22
|
|
20
23
|
# {https://auth0.com/docs/api#!#get--api-logs--_id-}
|
24
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Logs
|
25
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
21
26
|
def log(id)
|
27
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
22
28
|
path = "/api/logs/#{id}"
|
23
29
|
get(path)
|
24
30
|
end
|
25
31
|
|
26
32
|
# {https://auth0.com/docs/api#!#get--api-users--user_id--logs-page--number--per_page--items-}
|
33
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Logs
|
34
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
27
35
|
def user_logs(user_id, page = 0, per_page = 50)
|
36
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
28
37
|
path = "/api/users/#{user_id}/logs?page=#{page}&per_page=#{per_page}"
|
29
38
|
get(path)
|
30
39
|
end
|
data/lib/auth0/api/v1/rules.rb
CHANGED
@@ -4,7 +4,10 @@ module Auth0
|
|
4
4
|
# https://auth0.com/docs/api#rules
|
5
5
|
module Rules
|
6
6
|
# https://auth0.com/docs/api#!#get--api-rules
|
7
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Rules
|
8
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
7
9
|
def rules
|
10
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
8
11
|
path = '/api/rules'
|
9
12
|
get(path)
|
10
13
|
end
|
@@ -12,7 +15,10 @@ module Auth0
|
|
12
15
|
alias get_rules rules
|
13
16
|
|
14
17
|
# https://auth0.com/docs/api#!#post--api-rules
|
18
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Rules
|
19
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
15
20
|
def create_rule(name, script, order = nil, status = true)
|
21
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
16
22
|
path = '/api/rules'
|
17
23
|
request_params = {
|
18
24
|
name: name,
|
@@ -24,7 +30,10 @@ module Auth0
|
|
24
30
|
end
|
25
31
|
|
26
32
|
# https://auth0.com/docs/api#!#put--api-rules--rule-name-
|
33
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Rules
|
34
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
27
35
|
def update_rule(name, script, order = nil, status = true)
|
36
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
28
37
|
path = "/api/rules/#{name}"
|
29
38
|
request_params = {
|
30
39
|
status: status,
|
@@ -35,7 +44,10 @@ module Auth0
|
|
35
44
|
end
|
36
45
|
|
37
46
|
# https://auth0.com/docs/api#!#delete--api-rules--rule-name-
|
47
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Rules
|
48
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
38
49
|
def delete_rule(name)
|
50
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
39
51
|
path = "/api/rules/#{name}"
|
40
52
|
delete(path)
|
41
53
|
end
|
data/lib/auth0/api/v1/users.rb
CHANGED
@@ -7,7 +7,10 @@ module Auth0
|
|
7
7
|
# {https://auth0.com/docs/api#!#get--api-users}
|
8
8
|
#
|
9
9
|
# {https://auth0.com/docs/api#!#get--api-users-search--criteria-}
|
10
|
+
# @deprecated - 4.14.0, please use Auth0::Api::V2::Users
|
11
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
10
12
|
def users(search = nil)
|
13
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
11
14
|
path = '/api/users'
|
12
15
|
path += "?search=#{search}" unless search.to_s.empty?
|
13
16
|
get(path)
|
@@ -17,7 +20,10 @@ module Auth0
|
|
17
20
|
alias get_users users
|
18
21
|
|
19
22
|
# {https://auth0.com/docs/api#!#get--api-users--user_id-}
|
23
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
24
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
20
25
|
def user(user_id)
|
26
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
21
27
|
path = "/api/users/#{user_id}"
|
22
28
|
get(path)
|
23
29
|
end
|
@@ -25,14 +31,20 @@ module Auth0
|
|
25
31
|
alias get_user user
|
26
32
|
|
27
33
|
# {https://auth0.com/docs/api#!#get--api-users--user_id--devices}
|
34
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
35
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
28
36
|
def user_devices(user_id)
|
37
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
29
38
|
path = "/api/users/#{user_id}/devices"
|
30
39
|
get(path)
|
31
40
|
end
|
32
41
|
|
33
42
|
# {https://auth0.com/docs/api#!#get--api-connections--connection--users}
|
34
43
|
# {https://auth0.com/docs/api#!#get--api-connections--connection--users-search--criteria-}
|
44
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
45
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
35
46
|
def connection_users(connection_name, search = nil)
|
47
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
36
48
|
path = "/api/connections/#{connection_name}/users"
|
37
49
|
path += "?search=#{search}" unless search.to_s.empty?
|
38
50
|
get(path)
|
@@ -41,25 +53,37 @@ module Auth0
|
|
41
53
|
alias search_connection_users connection_users
|
42
54
|
|
43
55
|
# {https://auth0.com/docs/api#!#get--api-enterpriseconnections-users-search--criteria-}
|
56
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
57
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
44
58
|
def enterpriseconnections_users(search_criteria = nil, per_page = 500)
|
59
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
45
60
|
path = "/api/enterpriseconnections/users?search=#{search_criteria}&per_page=#{per_page.to_i}"
|
46
61
|
get(path)
|
47
62
|
end
|
48
63
|
|
49
64
|
# {https://auth0.com/docs/api#!#get--api-socialconnections-users-search--criteria-}
|
65
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
66
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
50
67
|
def socialconnections_users(search_criteria = nil, per_page = 500)
|
68
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
51
69
|
path = "/api/socialconnections/users?search=#{search_criteria}&per_page=#{per_page.to_i}"
|
52
70
|
get(path)
|
53
71
|
end
|
54
72
|
|
55
73
|
# {https://auth0.com/docs/api#!#get--api-clients--client-id--users}
|
74
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
75
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
56
76
|
def client_users(client_id = @client_id)
|
77
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
57
78
|
path = "/api/clients/#{client_id}/users"
|
58
79
|
get(path)
|
59
80
|
end
|
60
81
|
|
61
82
|
# {https://auth0.com/docs/api#!#post--api-users}
|
83
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
84
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
62
85
|
def create_user(email, password, connection_name, request_params = {})
|
86
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
63
87
|
options = { email: email, password: password, connection: connection_name }
|
64
88
|
request_params.merge!(options)
|
65
89
|
path = '/api/users'
|
@@ -67,55 +91,79 @@ module Auth0
|
|
67
91
|
end
|
68
92
|
|
69
93
|
# {https://auth0.com/docs/api#!#post--api-users--user_id--send_verification_email}
|
94
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
95
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
70
96
|
def send_verification_email(user_id)
|
97
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
71
98
|
path = "/api/users/#{user_id}/send_verification_email"
|
72
99
|
post(path)
|
73
100
|
end
|
74
101
|
|
75
102
|
# {https://auth0.com/docs/api#!#post--api-users--user_id--change_password_ticket}
|
103
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
104
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
76
105
|
def change_password_ticket(user_id, new_password, result_url = nil)
|
106
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
77
107
|
request_params = { 'newPassword' => new_password, 'resultUrl' => result_url }
|
78
108
|
path = "/api/users/#{user_id}/change_password_ticket"
|
79
109
|
post(path, request_params)
|
80
110
|
end
|
81
111
|
|
82
112
|
# {https://auth0.com/docs/api#!#post--api-users--user_id--verification_ticket}
|
113
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
114
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
83
115
|
def verification_ticket(user_id, result_url = nil)
|
116
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
84
117
|
request_params = { 'resultUrl' => result_url }
|
85
118
|
path = "/api/users/#{user_id}/verification_ticket"
|
86
119
|
post(path, request_params)
|
87
120
|
end
|
88
121
|
|
89
122
|
# {https://auth0.com/docs/api#!#post--api-users--user_id--publickey}
|
123
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
124
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
90
125
|
def create_public_key(user_id, device, public_key)
|
126
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
91
127
|
path = "/api/users/#{user_id}/public_key"
|
92
128
|
request_params = { device: device, public_key: public_key }
|
93
129
|
post(path, request_params)
|
94
130
|
end
|
95
131
|
|
96
132
|
# {https://auth0.com/docs/api#!#put--api-users--user_id--email}
|
133
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
134
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
97
135
|
def update_user_email(user_id, email, verify = true)
|
136
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
98
137
|
path = "/api/users/#{user_id}/email"
|
99
138
|
request_params = { email: email, verify: verify }
|
100
139
|
put(path, request_params)
|
101
140
|
end
|
102
141
|
|
103
142
|
# {https://auth0.com/docs/api#!#put--api-users--user_id--metadata}
|
143
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
144
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
104
145
|
# This will overwrite user's metadata, be really carefull, preffer using patch instead
|
105
146
|
def update_user_metadata(user_id, metadata = {})
|
147
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
106
148
|
path = "/api/users/#{user_id}/metadata"
|
107
149
|
put(path, metadata)
|
108
150
|
end
|
109
151
|
|
110
152
|
# {https://auth0.com/docs/api#!#put--api-users--user_id--password}
|
153
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
154
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
111
155
|
def update_user_password(user_id, password, verify = true)
|
156
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
112
157
|
path = "/api/users/#{user_id}/password"
|
113
158
|
request_params = { password: password, verify: verify }
|
114
159
|
put(path, request_params)
|
115
160
|
end
|
116
161
|
|
117
162
|
# {https://auth0.com/docs/api#!#put--api-users--email--password}
|
163
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
164
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
118
165
|
def update_user_password_using_email(email, password, connection_name, verify = true)
|
166
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
119
167
|
request_params = {
|
120
168
|
email: email,
|
121
169
|
password: password,
|
@@ -127,34 +175,49 @@ module Auth0
|
|
127
175
|
end
|
128
176
|
|
129
177
|
# {https://auth0.com/docs/api#!#patch--api-users--user_id--metadata}
|
178
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
179
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
130
180
|
def patch_user_metadata(user_id, metadata = {})
|
181
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
131
182
|
path = "/api/users/#{user_id}/metadata"
|
132
183
|
patch(path, metadata)
|
133
184
|
end
|
134
185
|
|
135
186
|
# {https://auth0.com/docs/api#!#delete--api-users}
|
187
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
188
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
136
189
|
#
|
137
190
|
# This will remove all your users
|
138
191
|
def delete_users
|
192
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
139
193
|
path = '/api/users/'
|
140
194
|
delete(path)
|
141
195
|
end
|
142
196
|
|
143
197
|
# {https://auth0.com/docs/api#!#delete--api-users--user_id-}
|
198
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
199
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
144
200
|
def delete_user(user_id)
|
201
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
145
202
|
raise Auth0::MissingUserId, 'if you want to remove all users use delete_users method' if user_id.to_s.empty?
|
146
203
|
path = "/api/users/#{user_id}"
|
147
204
|
delete(path)
|
148
205
|
end
|
149
206
|
|
150
207
|
# {https://auth0.com/docs/api#!#delete--api-users--user_id--refresh_tokens--refresh_token-}
|
208
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
209
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
151
210
|
def revoke_user_refresh_token(user_id, refresh_token)
|
211
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
152
212
|
path = "/api/users/#{user_id}/refresh_tokens/#{refresh_token}"
|
153
213
|
delete(path)
|
154
214
|
end
|
155
215
|
|
156
216
|
# {https://auth0.com/docs/api#!#delete--api-users--user_id--publickey-device--device-}
|
217
|
+
# @deprecated - 4.14.0, API v1 is no longer in use, please use Auth0::Api::V2::Users
|
218
|
+
# @see - https://auth0.com/docs/migrations/guides/management-api-v1-v2
|
157
219
|
def revoke_user_device_public_key(user_id, device)
|
220
|
+
warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
|
158
221
|
path = "/api/users/#{user_id}/publickey?device=#{device}"
|
159
222
|
delete(path)
|
160
223
|
end
|
@@ -171,14 +171,6 @@ module Auth0
|
|
171
171
|
unless claims.key?('iat') && claims['iat'].is_a?(Integer)
|
172
172
|
raise Auth0::InvalidIdToken, 'Issued At (iat) claim must be a number present in the ID token'
|
173
173
|
end
|
174
|
-
|
175
|
-
now = @context[:clock] || Time.now.to_i
|
176
|
-
iat_time = claims['iat'] - leeway
|
177
|
-
|
178
|
-
unless now > iat_time
|
179
|
-
raise Auth0::InvalidIdToken, "Issued At (iat) claim mismatch in the ID token; current time \"#{now}\""\
|
180
|
-
" is before issued at time \"#{iat_time}\""
|
181
|
-
end
|
182
174
|
end
|
183
175
|
|
184
176
|
def validate_nonce(claims, expected)
|
data/lib/auth0/version.rb
CHANGED
@@ -229,14 +229,6 @@ describe Auth0::Mixins::Validation::IdTokenValidator do
|
|
229
229
|
expect { @instance.validate(token) }.to raise_exception('Issued At (iat) claim must be a number present in the ID token')
|
230
230
|
end
|
231
231
|
|
232
|
-
it 'is expected to raise an error with a invalid iat' do
|
233
|
-
token = 'eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Rva2Vucy10ZXN0LmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHwxMjM0NTY3ODkiLCJhdWQiOlsidG9rZW5zLXRlc3QtMTIzIiwiZXh0ZXJuYWwtdGVzdC05OTkiXSwiZXhwIjoxNTg3NzY1MzYxLCJpYXQiOjE1ODc3NjUzNjEsIm5vbmNlIjoiYTFiMmMzZDRlNSIsImF6cCI6InRva2Vucy10ZXN0LTEyMyIsImF1dGhfdGltZSI6MTU4NzY3ODk2MX0.1AeRLTaExbKnmsfNduUl3HArsau4RcNrnmYOJnkPWi0'
|
234
|
-
clock = CLOCK - LEEWAY - 1
|
235
|
-
instance = Auth0::Mixins::Validation::IdTokenValidator.new(CONTEXT.merge({ clock: clock }))
|
236
|
-
|
237
|
-
expect { instance.validate(token) }.to raise_exception("Issued At (iat) claim mismatch in the ID token; current time \"#{clock}\" is before issued at time \"1587765301\"")
|
238
|
-
end
|
239
|
-
|
240
232
|
it 'is expected not to raise an error with a missing but not required nonce' do
|
241
233
|
token = 'eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Rva2Vucy10ZXN0LmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHwxMjM0NTY3ODkiLCJhdWQiOlsidG9rZW5zLXRlc3QtMTIzIiwiZXh0ZXJuYWwtdGVzdC05OTkiXSwiZXhwIjoxNTg3NzY1MzYxLCJpYXQiOjE1ODc1OTI1NjEsImF6cCI6InRva2Vucy10ZXN0LTEyMyIsImF1dGhfdGltZSI6MTU4NzY3ODk2MX0.-o5grnyODbBdRgzcrn7Sf9Hb6eOC0x_U2i3YjVgHN0U'
|
242
234
|
|
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: 4.
|
4
|
+
version: 4.14.0
|
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: 2020-
|
14
|
+
date: 2020-07-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rest-client
|
@@ -143,22 +143,22 @@ dependencies:
|
|
143
143
|
name: rspec
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
|
-
- - "~>"
|
147
|
-
- !ruby/object:Gem::Version
|
148
|
-
version: '3.1'
|
149
146
|
- - ">="
|
150
147
|
- !ruby/object:Gem::Version
|
151
148
|
version: 3.1.0
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '3.1'
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
|
-
- - "~>"
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '3.1'
|
159
156
|
- - ">="
|
160
157
|
- !ruby/object:Gem::Version
|
161
158
|
version: 3.1.0
|
159
|
+
- - "~>"
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '3.1'
|
162
162
|
- !ruby/object:Gem::Dependency
|
163
163
|
name: rack-test
|
164
164
|
requirement: !ruby/object:Gem::Requirement
|
@@ -615,7 +615,7 @@ homepage: https://github.com/auth0/ruby-auth0
|
|
615
615
|
licenses:
|
616
616
|
- MIT
|
617
617
|
metadata: {}
|
618
|
-
post_install_message:
|
618
|
+
post_install_message:
|
619
619
|
rdoc_options: []
|
620
620
|
require_paths:
|
621
621
|
- lib
|
@@ -630,8 +630,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
630
630
|
- !ruby/object:Gem::Version
|
631
631
|
version: '0'
|
632
632
|
requirements: []
|
633
|
-
rubygems_version: 3.1
|
634
|
-
signing_key:
|
633
|
+
rubygems_version: 3.0.1
|
634
|
+
signing_key:
|
635
635
|
specification_version: 4
|
636
636
|
summary: Auth0 API Client
|
637
637
|
test_files:
|