auth0 4.8.0 → 4.9.0
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 +4 -4
- data/.circleci/config.yml +1 -0
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +18 -17
- data/README.md +10 -1
- data/auth0.gemspec +1 -1
- data/lib/auth0/api/v2.rb +2 -0
- data/lib/auth0/api/v2/guardian.rb +142 -0
- data/lib/auth0/api/v2/roles.rb +0 -2
- data/lib/auth0/api/v2/users.rb +0 -2
- data/lib/auth0/mixins.rb +8 -3
- data/lib/auth0/mixins/httpproxy.rb +1 -1
- data/lib/auth0/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_add_role_permissions/should_add_a_Permission_to_the_Role_successfully.yml +12 -10
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_add_role_users/should_add_a_User_to_the_Role_successfully.yml +13 -11
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_delete_role/should_delete_the_Role_successfully.yml +12 -10
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_role/should_get_the_Role_successfully.yml +13 -11
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_role_permissions/should_get_exactly_1_Permission.yml +12 -10
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_role_permissions/should_get_the_added_Permission_from_the_Role_successfully.yml +12 -10
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_role_users/should_get_exactly_1_User.yml +13 -11
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_role_users/should_get_the_added_User_from_the_Role_successfully.yml +13 -11
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_get_roles/should_get_the_Role_successfully.yml +12 -10
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_remove_role_permissions/should_remove_a_Permission_from_the_Role_successfully.yml +12 -10
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/_update_role/should_update_the_Role_successfully.yml +13 -11
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/create_test_api.yml +14 -12
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/create_test_role.yml +12 -10
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/create_test_user.yml +13 -11
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/delete_test_api.yml +12 -10
- data/spec/fixtures/vcr_cassettes/Auth0_Api_V2_Roles/delete_test_user.yml +12 -10
- data/spec/integration/lib/auth0/api/v2/api_roles_spec.rb +3 -3
- data/spec/lib/auth0/api/v2/guardian_spec.rb +154 -0
- data/spec/lib/auth0/mixins/httpproxy_spec.rb +24 -2
- data/spec/spec_helper.rb +2 -1
- metadata +7 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 858abdf1d6f43a1c046e45f1ad9c70df2115e96c75d78e135261dd3477e630d2
|
|
4
|
+
data.tar.gz: bf9f13ae3f7cb4e6881a5852fe9a0f95f2dcb7b3b5181c72388c785a2fc6032b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9e9da5fd0c9aadbead0bb27e2e587893bc7b32cf670fc5237e2ae9adf29fd8d0e315e0b1135f5a68c4d0acd0be7570a803155d1c6e2a32a73a7c7eaf4439694
|
|
7
|
+
data.tar.gz: 6676874d86123b45e996228cfe3d019baae92ffb6ad1f319cde212bd23bb44480a4e7ac434ca034ad303d4290b712ed80eeb957e2bc75216b00cc2dd7a7d2cdd
|
data/.circleci/config.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [v4.9.0](https://github.com/auth0/ruby-auth0/tree/v4.9.0) (2019-09-25)
|
|
4
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v4.8.0...v4.9.0)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
**Closed issues:**
|
|
8
|
+
|
|
9
|
+
- Dot in role name makes description disappear [\#194](https://github.com/auth0/ruby-auth0/issues/194)
|
|
10
|
+
- Missing require Permission [\#192](https://github.com/auth0/ruby-auth0/issues/192)
|
|
11
|
+
- Token required even when not necessary [\#190](https://github.com/auth0/ruby-auth0/issues/190)
|
|
12
|
+
|
|
13
|
+
**Fixed:**
|
|
14
|
+
|
|
15
|
+
- Fix request timeout [\#188](https://github.com/auth0/ruby-auth0/pull/188) ([makoto-matsumoto](https://github.com/makoto-matsumoto))
|
|
16
|
+
- Fix missing Permissions mixin [\#196](https://github.com/auth0/ruby-auth0/pull/196) ([joshcanhelp](https://github.com/joshcanhelp))
|
|
17
|
+
|
|
18
|
+
**Added:**
|
|
19
|
+
|
|
20
|
+
- Add Management API Guardian enrollments endpoint [\#182](https://github.com/auth0/ruby-auth0/pull/182) ([tomgi](https://github.com/tomgi))
|
|
21
|
+
|
|
3
22
|
## [v4.8.0](https://github.com/auth0/ruby-auth0/tree/v4.8.0) (2019-08-01)
|
|
4
23
|
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v4.7.0...v4.8.0)
|
|
5
24
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
auth0 (4.
|
|
5
|
-
rest-client (~> 2.0)
|
|
4
|
+
auth0 (4.9.0)
|
|
5
|
+
rest-client (~> 2.0.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
addressable (2.
|
|
11
|
-
public_suffix (>= 2.0.2, <
|
|
10
|
+
addressable (2.7.0)
|
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
|
12
12
|
ast (2.4.0)
|
|
13
13
|
codecov (0.1.14)
|
|
14
14
|
json
|
|
@@ -16,12 +16,12 @@ GEM
|
|
|
16
16
|
url
|
|
17
17
|
coderay (1.1.2)
|
|
18
18
|
concurrent-ruby (1.1.5)
|
|
19
|
-
coveralls (0.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
coveralls (0.7.1)
|
|
20
|
+
multi_json (~> 1.3)
|
|
21
|
+
rest-client
|
|
22
|
+
simplecov (>= 0.7)
|
|
23
|
+
term-ansicolor
|
|
24
|
+
thor
|
|
25
25
|
crack (0.4.3)
|
|
26
26
|
safe_yaml (~> 1.0.0)
|
|
27
27
|
diff-lcs (1.3)
|
|
@@ -39,7 +39,7 @@ GEM
|
|
|
39
39
|
rspec-core (~> 3.0)
|
|
40
40
|
ruby-progressbar (~> 1.4)
|
|
41
41
|
gem-release (0.7.4)
|
|
42
|
-
guard (2.15.
|
|
42
|
+
guard (2.15.1)
|
|
43
43
|
formatador (>= 0.2.4)
|
|
44
44
|
listen (>= 2.7, < 4.0)
|
|
45
45
|
lumberjack (>= 1.0.12, < 2.0)
|
|
@@ -66,16 +66,17 @@ GEM
|
|
|
66
66
|
ruby_dep (~> 1.2)
|
|
67
67
|
lumberjack (1.0.13)
|
|
68
68
|
method_source (0.8.2)
|
|
69
|
-
mime-types (3.
|
|
69
|
+
mime-types (3.3)
|
|
70
70
|
mime-types-data (~> 3.2015)
|
|
71
|
-
mime-types-data (3.2019.
|
|
71
|
+
mime-types-data (3.2019.0904)
|
|
72
|
+
multi_json (1.13.1)
|
|
72
73
|
nenv (0.3.0)
|
|
73
74
|
netrc (0.11.0)
|
|
74
75
|
notiffany (0.1.3)
|
|
75
76
|
nenv (~> 0.1)
|
|
76
77
|
shellany (~> 0.0)
|
|
77
78
|
parallel (1.17.0)
|
|
78
|
-
parser (2.6.
|
|
79
|
+
parser (2.6.4.1)
|
|
79
80
|
ast (~> 2.4.0)
|
|
80
81
|
pry (0.10.4)
|
|
81
82
|
coderay (~> 1.1.0)
|
|
@@ -83,7 +84,7 @@ GEM
|
|
|
83
84
|
slop (~> 3.4)
|
|
84
85
|
pry-nav (0.2.4)
|
|
85
86
|
pry (>= 0.9.10, < 0.11.0)
|
|
86
|
-
public_suffix (
|
|
87
|
+
public_suffix (4.0.1)
|
|
87
88
|
rack (1.6.11)
|
|
88
89
|
rack-test (0.8.3)
|
|
89
90
|
rack (>= 1.0, < 3)
|
|
@@ -120,7 +121,7 @@ GEM
|
|
|
120
121
|
ruby_dep (1.5.0)
|
|
121
122
|
safe_yaml (1.0.5)
|
|
122
123
|
shellany (0.0.1)
|
|
123
|
-
simplecov (0.
|
|
124
|
+
simplecov (0.17.1)
|
|
124
125
|
docile (~> 1.1)
|
|
125
126
|
json (>= 1.8, < 3)
|
|
126
127
|
simplecov-html (~> 0.10.0)
|
|
@@ -137,7 +138,7 @@ GEM
|
|
|
137
138
|
unicode-display_width (1.6.0)
|
|
138
139
|
url (0.3.2)
|
|
139
140
|
vcr (5.0.0)
|
|
140
|
-
webmock (3.
|
|
141
|
+
webmock (3.7.5)
|
|
141
142
|
addressable (>= 2.3.6)
|
|
142
143
|
crack (>= 0.3.2)
|
|
143
144
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/README.md
CHANGED
|
@@ -72,7 +72,16 @@ class AllUsersController < ApplicationController
|
|
|
72
72
|
def auth0_client
|
|
73
73
|
@auth0_client ||= Auth0Client.new(
|
|
74
74
|
client_id: ENV['AUTH0_RUBY_CLIENT_ID'],
|
|
75
|
-
|
|
75
|
+
client_secret: ENV['AUTH0_RUBY_CLIENT_SECRET'],
|
|
76
|
+
# If you pass in a client_secret value, the SDK will automatically try to get a
|
|
77
|
+
# Management API token for this application. Make sure your Application can make a
|
|
78
|
+
# Client Credentials grant (Application settings in Auth0 > Advanced > Grant Types
|
|
79
|
+
# tab) and that the Application is authorized for the Management API:
|
|
80
|
+
# https://auth0.com/docs/api-auth/config/using-the-auth0-dashboard
|
|
81
|
+
#
|
|
82
|
+
# Otherwise, you can pass in a Management API token directly for testing or temporary
|
|
83
|
+
# access using the key below.
|
|
84
|
+
# token: ENV['AUTH0_RUBY_API_TOKEN'],
|
|
76
85
|
domain: ENV['AUTH0_RUBY_DOMAIN'],
|
|
77
86
|
api_version: 2,
|
|
78
87
|
timeout: 15 # optional, defaults to 10
|
data/auth0.gemspec
CHANGED
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
|
16
16
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
|
17
17
|
s.require_paths = ['lib']
|
|
18
18
|
|
|
19
|
-
s.add_runtime_dependency 'rest-client', '~> 2.0'
|
|
19
|
+
s.add_runtime_dependency 'rest-client', '~> 2.0.0'
|
|
20
20
|
|
|
21
21
|
s.add_development_dependency 'rake', '~> 10.4'
|
|
22
22
|
s.add_development_dependency 'fuubar', '~> 2.0'
|
data/lib/auth0/api/v2.rb
CHANGED
|
@@ -16,6 +16,7 @@ require 'auth0/api/v2/tenants'
|
|
|
16
16
|
require 'auth0/api/v2/tickets'
|
|
17
17
|
require 'auth0/api/v2/logs'
|
|
18
18
|
require 'auth0/api/v2/resource_servers'
|
|
19
|
+
require 'auth0/api/v2/guardian'
|
|
19
20
|
|
|
20
21
|
module Auth0
|
|
21
22
|
module Api
|
|
@@ -39,6 +40,7 @@ module Auth0
|
|
|
39
40
|
include Auth0::Api::V2::Tickets
|
|
40
41
|
include Auth0::Api::V2::Logs
|
|
41
42
|
include Auth0::Api::V2::ResourceServers
|
|
43
|
+
include Auth0::Api::V2::Guardian
|
|
42
44
|
end
|
|
43
45
|
end
|
|
44
46
|
end
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
module Auth0
|
|
2
|
+
module Api
|
|
3
|
+
module V2
|
|
4
|
+
# Methods to use the guardian endpoints
|
|
5
|
+
module Guardian
|
|
6
|
+
include Auth0::Mixins::Validation
|
|
7
|
+
|
|
8
|
+
# Retrieves a list of Guardian factors.
|
|
9
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/get_factors
|
|
10
|
+
# @return [json] Returns the list of all Guardian factors.
|
|
11
|
+
def guardian_factors
|
|
12
|
+
get(guardian_factors_path)
|
|
13
|
+
end
|
|
14
|
+
alias get_guardian_factors guardian_factors
|
|
15
|
+
|
|
16
|
+
# Retrieves a single Guardian enrollment.
|
|
17
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/get_enrollments_by_id
|
|
18
|
+
# @param enrollment_id [string] The enrollment_id of the Guardian enrollment to delete.
|
|
19
|
+
# @return [json] Returns details of the Guardian enrollment.
|
|
20
|
+
def guardian_enrollment(enrollment_id)
|
|
21
|
+
raise Auth0::MissingParameter, 'Must supply a valid enrollment_id' if enrollment_id.to_s.empty?
|
|
22
|
+
|
|
23
|
+
path = "#{guardian_enrollments_path}/#{enrollment_id}"
|
|
24
|
+
get(path)
|
|
25
|
+
end
|
|
26
|
+
alias get_guardian_enrollment guardian_enrollment
|
|
27
|
+
|
|
28
|
+
# Deletes a single Guardian enrollment given its id.
|
|
29
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/delete_enrollments_by_id
|
|
30
|
+
# @param enrollment_id [string] The enrollment_id of the Guardian enrollment to delete.
|
|
31
|
+
def delete_guardian_enrollment(enrollment_id)
|
|
32
|
+
raise Auth0::MissingParameter, 'Must supply a valid enrollment_id' if enrollment_id.to_s.empty?
|
|
33
|
+
|
|
34
|
+
path = "#{guardian_enrollments_path}/#{enrollment_id}"
|
|
35
|
+
delete(path)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Retrieves SMS enrollment and verification templates.
|
|
39
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/get_templates
|
|
40
|
+
# @return [json] Returns enrollment and verification templates.
|
|
41
|
+
def guardian_sms_templates
|
|
42
|
+
path = "#{guardian_factors_path}/sms/templates"
|
|
43
|
+
get(path)
|
|
44
|
+
end
|
|
45
|
+
alias get_guardian_sms_templates guardian_sms_templates
|
|
46
|
+
|
|
47
|
+
# Updates SMS enrollment and verification SMS templates.
|
|
48
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/put_templates
|
|
49
|
+
# @param body [hash] The parameters to update.
|
|
50
|
+
#
|
|
51
|
+
# @return [json] Returns updated SMS enrollment and verification templates.
|
|
52
|
+
def guardian_update_enrollment_verification_templates(body)
|
|
53
|
+
raise Auth0::InvalidParameter, 'Must supply a valid body' if body.to_s.empty?
|
|
54
|
+
|
|
55
|
+
path = "#{guardian_factors_path}/sms/templates"
|
|
56
|
+
put(path, body)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Retrieves provider configuration for AWS SNS.
|
|
60
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/get_sns
|
|
61
|
+
# @return [json] Returns provider configuration for AWS SNS.
|
|
62
|
+
def guardian_sns_provider_config
|
|
63
|
+
path = "#{guardian_factors_path}/push-notification/providers/sns"
|
|
64
|
+
get(path)
|
|
65
|
+
end
|
|
66
|
+
alias get_guardian_sns_provider_config guardian_sns_provider_config
|
|
67
|
+
|
|
68
|
+
# Updates provider configuration for AWS SNS.
|
|
69
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/put_sns
|
|
70
|
+
# @param body [hash] The parameters to update.
|
|
71
|
+
#
|
|
72
|
+
# @return [json] Returns updated provider configuration for AWS SNS.
|
|
73
|
+
def guardian_update_sns_provider_config(body)
|
|
74
|
+
raise Auth0::InvalidParameter, 'Must supply a valid body' if body.to_s.empty?
|
|
75
|
+
|
|
76
|
+
path = "#{guardian_factors_path}/push-notification/providers/sns"
|
|
77
|
+
put(path, body)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Retrieves provider configuration for Twilio.
|
|
81
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/get_twilio
|
|
82
|
+
# @return [json] Returns provider configuration for Twilio.
|
|
83
|
+
def guardian_twillo_provider_config
|
|
84
|
+
path = "#{guardian_factors_path}/sms/providers/twilio"
|
|
85
|
+
get(path)
|
|
86
|
+
end
|
|
87
|
+
alias get_guardian_twillo_provider_config guardian_twillo_provider_config
|
|
88
|
+
|
|
89
|
+
# Updates provider configuration for Twilio.
|
|
90
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/put_twilio
|
|
91
|
+
# @param body [hash] The parameters to update.
|
|
92
|
+
#
|
|
93
|
+
# @return [json] Returns updated provider configuration for Twilio.
|
|
94
|
+
def guardian_update_twillo_provider_config(body)
|
|
95
|
+
raise Auth0::InvalidParameter, 'Must supply a valid body' if body.to_s.empty?
|
|
96
|
+
|
|
97
|
+
path = "#{guardian_factors_path}/sms/providers/twilio"
|
|
98
|
+
put(path, body)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Creates a Guardian enrollment ticket.
|
|
102
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/post_ticket
|
|
103
|
+
# @param body [hash] User details to create enrollment ticket for.
|
|
104
|
+
# @return [json] Returns details of created enrollment ticket.
|
|
105
|
+
def guardian_create_enrollment_ticket(body)
|
|
106
|
+
raise Auth0::InvalidParameter, 'Must supply a valid body' if body.to_s.empty?
|
|
107
|
+
|
|
108
|
+
path = "#{guardian_enrollments_path}/ticket"
|
|
109
|
+
post(path, body)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Updates a Guardian factor.
|
|
113
|
+
# @see https://auth0.com/docs/api/management/v2#!/Guardian/put_factors_by_name
|
|
114
|
+
# @param name [string] Name of Guardian factor to update.
|
|
115
|
+
# @param body [hash] The parameters to update.
|
|
116
|
+
# @return [json] Returns details of updated Guardian factor.
|
|
117
|
+
def guardian_update_factor(name, body)
|
|
118
|
+
raise Auth0::MissingParameter, 'Must supply a valid name' if name.to_s.empty?
|
|
119
|
+
raise Auth0::InvalidParameter, 'Must supply a valid body' if body.to_s.empty?
|
|
120
|
+
|
|
121
|
+
path = "#{guardian_factors_path}/#{name}"
|
|
122
|
+
put(path, body)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
private
|
|
126
|
+
|
|
127
|
+
# Guardian API path
|
|
128
|
+
def guardian_path
|
|
129
|
+
@guardian_path ||= '/api/v2/guardian'
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
def guardian_enrollments_path
|
|
133
|
+
@guardian_enrollments_path ||= "#{guardian_path}/enrollments"
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def guardian_factors_path
|
|
137
|
+
@guardian_factors_path ||= "#{guardian_path}/factors"
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
data/lib/auth0/api/v2/roles.rb
CHANGED
data/lib/auth0/api/v2/users.rb
CHANGED
data/lib/auth0/mixins.rb
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
require 'base64'
|
|
2
2
|
require 'rest-client'
|
|
3
3
|
require 'uri'
|
|
4
|
-
|
|
5
|
-
require 'auth0/mixins/initializer'
|
|
6
|
-
require 'auth0/mixins/headers'
|
|
4
|
+
|
|
7
5
|
require 'auth0/mixins/access_token_struct'
|
|
8
6
|
require 'auth0/mixins/api_token_struct'
|
|
7
|
+
require 'auth0/mixins/headers'
|
|
8
|
+
require 'auth0/mixins/httpproxy'
|
|
9
|
+
require 'auth0/mixins/initializer'
|
|
10
|
+
require 'auth0/mixins/permission_struct'
|
|
11
|
+
require 'auth0/mixins/validation'
|
|
12
|
+
|
|
9
13
|
require 'auth0/api/authentication_endpoints'
|
|
10
14
|
require 'auth0/api/v1'
|
|
11
15
|
require 'auth0/api/v2'
|
|
16
|
+
|
|
12
17
|
module Auth0
|
|
13
18
|
# Collecting dependencies here
|
|
14
19
|
module Mixins
|
data/lib/auth0/version.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
http_interactions:
|
|
3
3
|
- request:
|
|
4
4
|
method: post
|
|
5
|
-
uri: https://auth0-sdk-tests.auth0.com/api/v2/roles/
|
|
5
|
+
uri: https://auth0-sdk-tests.auth0.com/api/v2/roles/rol_Me7CwJxYruZRfq7q/permissions
|
|
6
6
|
body:
|
|
7
7
|
encoding: UTF-8
|
|
8
8
|
string: '{"permissions":[{"permission_name":"rubytest-test-permission","resource_server_identifier":"rubytest-test-api-for-roles"}]}'
|
|
@@ -16,7 +16,7 @@ http_interactions:
|
|
|
16
16
|
Content-Type:
|
|
17
17
|
- application/json
|
|
18
18
|
Auth0-Client:
|
|
19
|
-
-
|
|
19
|
+
- eyJuYW1lIjoicnVieS1hdXRoMCIsInZlcnNpb24iOiI0LjguMCIsImVudiI6eyJydWJ5IjoiMi41LjEifX0=
|
|
20
20
|
Authorization:
|
|
21
21
|
- Bearer API_TOKEN
|
|
22
22
|
Content-Length:
|
|
@@ -29,29 +29,31 @@ http_interactions:
|
|
|
29
29
|
message: Created
|
|
30
30
|
headers:
|
|
31
31
|
Date:
|
|
32
|
-
-
|
|
32
|
+
- Wed, 25 Sep 2019 16:28:53 GMT
|
|
33
33
|
Content-Type:
|
|
34
34
|
- application/json; charset=utf-8
|
|
35
35
|
Transfer-Encoding:
|
|
36
36
|
- chunked
|
|
37
37
|
Connection:
|
|
38
38
|
- keep-alive
|
|
39
|
+
Server:
|
|
40
|
+
- nginx
|
|
39
41
|
Ot-Tracer-Spanid:
|
|
40
|
-
-
|
|
42
|
+
- 1e7797637343dafb
|
|
41
43
|
Ot-Tracer-Traceid:
|
|
42
|
-
-
|
|
44
|
+
- 7dfc59340554541b
|
|
43
45
|
Ot-Tracer-Sampled:
|
|
44
46
|
- 'true'
|
|
45
47
|
X-Ratelimit-Limit:
|
|
46
48
|
- '10'
|
|
47
49
|
X-Ratelimit-Remaining:
|
|
48
|
-
- '
|
|
50
|
+
- '4'
|
|
49
51
|
X-Ratelimit-Reset:
|
|
50
|
-
- '
|
|
52
|
+
- '1569428937'
|
|
51
53
|
Vary:
|
|
52
54
|
- origin,accept-encoding
|
|
53
55
|
Cache-Control:
|
|
54
|
-
-
|
|
56
|
+
- no-cache
|
|
55
57
|
Content-Encoding:
|
|
56
58
|
- gzip
|
|
57
59
|
Strict-Transport-Security:
|
|
@@ -63,5 +65,5 @@ http_interactions:
|
|
|
63
65
|
string: !binary |-
|
|
64
66
|
H4sIAAAAAAAAA6uuBQBDv6ajAgAAAA==
|
|
65
67
|
http_version:
|
|
66
|
-
recorded_at:
|
|
67
|
-
recorded_with: VCR
|
|
68
|
+
recorded_at: Wed, 25 Sep 2019 16:28:53 GMT
|
|
69
|
+
recorded_with: VCR 5.0.0
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
http_interactions:
|
|
3
3
|
- request:
|
|
4
4
|
method: post
|
|
5
|
-
uri: https://auth0-sdk-tests.auth0.com/api/v2/roles/
|
|
5
|
+
uri: https://auth0-sdk-tests.auth0.com/api/v2/roles/rol_Me7CwJxYruZRfq7q/users
|
|
6
6
|
body:
|
|
7
7
|
encoding: UTF-8
|
|
8
|
-
string: '{"users":["auth0|
|
|
8
|
+
string: '{"users":["auth0|5d8b95c1d48d580ddc880536"]}'
|
|
9
9
|
headers:
|
|
10
10
|
Accept:
|
|
11
11
|
- "*/*"
|
|
@@ -16,7 +16,7 @@ http_interactions:
|
|
|
16
16
|
Content-Type:
|
|
17
17
|
- application/json
|
|
18
18
|
Auth0-Client:
|
|
19
|
-
-
|
|
19
|
+
- eyJuYW1lIjoicnVieS1hdXRoMCIsInZlcnNpb24iOiI0LjguMCIsImVudiI6eyJydWJ5IjoiMi41LjEifX0=
|
|
20
20
|
Authorization:
|
|
21
21
|
- Bearer API_TOKEN
|
|
22
22
|
Content-Length:
|
|
@@ -29,29 +29,31 @@ http_interactions:
|
|
|
29
29
|
message: OK
|
|
30
30
|
headers:
|
|
31
31
|
Date:
|
|
32
|
-
-
|
|
32
|
+
- Wed, 25 Sep 2019 16:28:52 GMT
|
|
33
33
|
Content-Type:
|
|
34
34
|
- application/json; charset=utf-8
|
|
35
35
|
Transfer-Encoding:
|
|
36
36
|
- chunked
|
|
37
37
|
Connection:
|
|
38
38
|
- keep-alive
|
|
39
|
+
Server:
|
|
40
|
+
- nginx
|
|
39
41
|
Ot-Tracer-Spanid:
|
|
40
|
-
-
|
|
42
|
+
- 63afc16a03cb3c38
|
|
41
43
|
Ot-Tracer-Traceid:
|
|
42
|
-
-
|
|
44
|
+
- 1d60153a4e9d6b5f
|
|
43
45
|
Ot-Tracer-Sampled:
|
|
44
46
|
- 'true'
|
|
45
47
|
X-Ratelimit-Limit:
|
|
46
48
|
- '10'
|
|
47
49
|
X-Ratelimit-Remaining:
|
|
48
|
-
- '
|
|
50
|
+
- '6'
|
|
49
51
|
X-Ratelimit-Reset:
|
|
50
|
-
- '
|
|
52
|
+
- '1569428935'
|
|
51
53
|
Vary:
|
|
52
54
|
- origin,accept-encoding
|
|
53
55
|
Cache-Control:
|
|
54
|
-
-
|
|
56
|
+
- no-cache
|
|
55
57
|
Content-Encoding:
|
|
56
58
|
- gzip
|
|
57
59
|
Strict-Transport-Security:
|
|
@@ -63,5 +65,5 @@ http_interactions:
|
|
|
63
65
|
string: !binary |-
|
|
64
66
|
H4sIAAAAAAAAA6uuBQBDv6ajAgAAAA==
|
|
65
67
|
http_version:
|
|
66
|
-
recorded_at:
|
|
67
|
-
recorded_with: VCR
|
|
68
|
+
recorded_at: Wed, 25 Sep 2019 16:28:52 GMT
|
|
69
|
+
recorded_with: VCR 5.0.0
|