workos 2.2.0 → 2.4.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/Gemfile.lock +2 -2
- data/lib/workos/audit_trail.rb +1 -0
- data/lib/workos/challenge.rb +2 -1
- data/lib/workos/connection.rb +1 -0
- data/lib/workos/deprecated_hash_wrapper.rb +76 -0
- data/lib/workos/directory.rb +1 -0
- data/lib/workos/directory_group.rb +26 -2
- data/lib/workos/directory_sync.rb +11 -8
- data/lib/workos/directory_user.rb +16 -2
- data/lib/workos/factor.rb +2 -6
- data/lib/workos/hash_provider.rb +19 -0
- data/lib/workos/organization.rb +1 -0
- data/lib/workos/organizations.rb +1 -0
- data/lib/workos/profile.rb +1 -0
- data/lib/workos/profile_and_token.rb +1 -0
- data/lib/workos/sso.rb +1 -0
- data/lib/workos/types/challenge_struct.rb +1 -1
- data/lib/workos/types/directory_group_struct.rb +6 -0
- data/lib/workos/types/directory_user_struct.rb +2 -0
- data/lib/workos/types/factor_struct.rb +0 -1
- data/lib/workos/types/passwordless_session_struct.rb +2 -0
- data/lib/workos/types/verify_factor_struct.rb +1 -3
- data/lib/workos/verify_factor.rb +1 -0
- data/lib/workos/version.rb +1 -1
- data/lib/workos/webhook.rb +1 -0
- data/lib/workos.rb +2 -0
- data/spec/lib/workos/directory_sync_spec.rb +29 -18
- data/spec/lib/workos/directory_user_spec.rb +36 -0
- data/spec/lib/workos/mfa_spec.rb +31 -1
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_group.yml +47 -29
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_user.yml +28 -31
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_after.yml +46 -32
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_before.yml +47 -31
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_directory.yml +46 -34
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_limit.yml +41 -31
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_no_options.yml +36 -26
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_user.yml +38 -28
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_totp_valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_generic_valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_sms_valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_totp_valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/mfa/get_factor_valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_valid_is_false.yml +82 -0
- metadata +9 -3
@@ -189,7 +189,7 @@ describe WorkOS::DirectorySync do
|
|
189
189
|
context 'with directory option' do
|
190
190
|
it 'forms the proper request to the API' do
|
191
191
|
request_args = [
|
192
|
-
'/directory_groups?directory=
|
192
|
+
'/directory_groups?directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
|
193
193
|
'Content-Type' => 'application/json'
|
194
194
|
]
|
195
195
|
|
@@ -200,10 +200,11 @@ describe WorkOS::DirectorySync do
|
|
200
200
|
|
201
201
|
VCR.use_cassette 'directory_sync/list_groups/with_directory' do
|
202
202
|
groups = described_class.list_groups(
|
203
|
-
directory: '
|
203
|
+
directory: 'directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
|
204
204
|
)
|
205
205
|
|
206
206
|
expect(groups.data.size).to eq(10)
|
207
|
+
expect(groups.data[0].name).to eq(groups.data[0]['name'])
|
207
208
|
end
|
208
209
|
end
|
209
210
|
end
|
@@ -211,7 +212,7 @@ describe WorkOS::DirectorySync do
|
|
211
212
|
context 'with user option' do
|
212
213
|
it 'forms the proper request to the API' do
|
213
214
|
request_args = [
|
214
|
-
'/directory_groups?user=
|
215
|
+
'/directory_groups?user=directory_user_01G2Z8D4FDB28ZNSRRBVCF2E0P',
|
215
216
|
'Content-Type' => 'application/json'
|
216
217
|
]
|
217
218
|
|
@@ -222,7 +223,7 @@ describe WorkOS::DirectorySync do
|
|
222
223
|
|
223
224
|
VCR.use_cassette 'directory_sync/list_groups/with_user' do
|
224
225
|
groups = described_class.list_groups(
|
225
|
-
user: '
|
226
|
+
user: 'directory_user_01G2Z8D4FDB28ZNSRRBVCF2E0P',
|
226
227
|
)
|
227
228
|
|
228
229
|
expect(groups.data.size).to eq(3)
|
@@ -233,8 +234,8 @@ describe WorkOS::DirectorySync do
|
|
233
234
|
context 'with the before option' do
|
234
235
|
it 'forms the proper request to the API' do
|
235
236
|
request_args = [
|
236
|
-
'/directory_groups?before=
|
237
|
-
'directory=
|
237
|
+
'/directory_groups?before=directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG&' \
|
238
|
+
'directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
|
238
239
|
'Content-Type' => 'application/json'
|
239
240
|
]
|
240
241
|
|
@@ -245,11 +246,11 @@ describe WorkOS::DirectorySync do
|
|
245
246
|
|
246
247
|
VCR.use_cassette 'directory_sync/list_groups/with_before' do
|
247
248
|
groups = described_class.list_groups(
|
248
|
-
before: '
|
249
|
-
directory: '
|
249
|
+
before: 'directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG',
|
250
|
+
directory: 'directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
|
250
251
|
)
|
251
252
|
|
252
|
-
expect(groups.data.size).to eq(
|
253
|
+
expect(groups.data.size).to eq(10)
|
253
254
|
end
|
254
255
|
end
|
255
256
|
end
|
@@ -257,8 +258,8 @@ describe WorkOS::DirectorySync do
|
|
257
258
|
context 'with the after option' do
|
258
259
|
it 'forms the proper request to the API' do
|
259
260
|
request_args = [
|
260
|
-
'/directory_groups?after=
|
261
|
-
'directory=
|
261
|
+
'/directory_groups?after=directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG&' \
|
262
|
+
'directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
|
262
263
|
'Content-Type' => 'application/json'
|
263
264
|
]
|
264
265
|
|
@@ -269,11 +270,11 @@ describe WorkOS::DirectorySync do
|
|
269
270
|
|
270
271
|
VCR.use_cassette 'directory_sync/list_groups/with_after' do
|
271
272
|
groups = described_class.list_groups(
|
272
|
-
after: '
|
273
|
-
directory: '
|
273
|
+
after: 'directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG',
|
274
|
+
directory: 'directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
|
274
275
|
)
|
275
276
|
|
276
|
-
expect(groups.data.size).to eq(
|
277
|
+
expect(groups.data.size).to eq(9)
|
277
278
|
end
|
278
279
|
end
|
279
280
|
end
|
@@ -282,7 +283,7 @@ describe WorkOS::DirectorySync do
|
|
282
283
|
it 'forms the proper request to the API' do
|
283
284
|
request_args = [
|
284
285
|
'/directory_groups?limit=2&' \
|
285
|
-
'directory=
|
286
|
+
'directory=directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
|
286
287
|
'Content-Type' => 'application/json'
|
287
288
|
]
|
288
289
|
|
@@ -294,7 +295,7 @@ describe WorkOS::DirectorySync do
|
|
294
295
|
VCR.use_cassette 'directory_sync/list_groups/with_limit' do
|
295
296
|
groups = described_class.list_groups(
|
296
297
|
limit: 2,
|
297
|
-
directory: '
|
298
|
+
directory: 'directory_01G2Z8ADK5NPMVTWF48MVVE4HT',
|
298
299
|
)
|
299
300
|
|
300
301
|
expect(groups.data.size).to eq(2)
|
@@ -332,6 +333,7 @@ describe WorkOS::DirectorySync do
|
|
332
333
|
)
|
333
334
|
|
334
335
|
expect(users.data.size).to eq(4)
|
336
|
+
expect(users.data[0].first_name).to eq(users.data[0]['first_name'])
|
335
337
|
end
|
336
338
|
end
|
337
339
|
end
|
@@ -436,10 +438,16 @@ describe WorkOS::DirectorySync do
|
|
436
438
|
it 'returns a group' do
|
437
439
|
VCR.use_cassette('directory_sync/get_group') do
|
438
440
|
group = WorkOS::DirectorySync.get_group(
|
439
|
-
'
|
441
|
+
'directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG',
|
440
442
|
)
|
441
443
|
|
442
|
-
expect(group['
|
444
|
+
expect(group['directory_id']).to eq('directory_01G2Z8ADK5NPMVTWF48MVVE4HT')
|
445
|
+
expect(group['organization_id']).to eq('org_01EGS4P7QR31EZ4YWD1Z1XA176')
|
446
|
+
expect(group['idp_id']).to eq('01jlao4614two3d')
|
447
|
+
expect(group['name']).to eq('Sales')
|
448
|
+
expect(group.name).to eq('Sales')
|
449
|
+
expect(group['created_at']).to eq('2022-05-13T17:45:31.732Z')
|
450
|
+
expect(group['updated_at']).to eq('2022-07-13T17:45:42.618Z')
|
443
451
|
end
|
444
452
|
end
|
445
453
|
end
|
@@ -464,6 +472,9 @@ describe WorkOS::DirectorySync do
|
|
464
472
|
)
|
465
473
|
|
466
474
|
expect(user['first_name']).to eq('Logan')
|
475
|
+
expect(user.directory_id).to eq('directory_01FAZYMST676QMTFN1DDJZZX87')
|
476
|
+
expect(user.organization_id).to eq('org_01FAZWCWR03DVWA83NCJYKKD54')
|
477
|
+
expect(user.first_name).to eq('Logan')
|
467
478
|
end
|
468
479
|
end
|
469
480
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# typed: false
|
3
|
+
|
4
|
+
describe WorkOS::DirectoryUser do
|
5
|
+
# rubocop:disable Layout/LineLength
|
6
|
+
describe '.get_primary_email' do
|
7
|
+
context 'with one primary email' do
|
8
|
+
it 'returns the primary email' do
|
9
|
+
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}, {"primary":false,"value":"logan@gmail.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
10
|
+
expect(user.primary_email).to eq('logan@workos.com')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
context 'with multiple primary emails' do
|
15
|
+
it 'returns the first email marked as primary' do
|
16
|
+
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}, {"primary":true,"value":"logan@gmail.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
17
|
+
expect(user.primary_email).to eq('logan@workos.com')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'with no primary emails' do
|
22
|
+
it 'returns nil' do
|
23
|
+
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":false,"value":"logan@gmail.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
24
|
+
expect(user.primary_email).to eq(nil)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context 'with an empty email array' do
|
29
|
+
it 'returns nil' do
|
30
|
+
user = WorkOS::DirectoryUser.new('{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{},"custom_attributes":{},"groups":[]}')
|
31
|
+
expect(user.primary_email).to eq(nil)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
# rubocop:enable Layout/LineLength
|
36
|
+
end
|
data/spec/lib/workos/mfa_spec.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
describe WorkOS::MFA do
|
5
5
|
it_behaves_like 'client'
|
6
|
+
|
6
7
|
describe 'enroll_factor valid requests' do
|
7
8
|
context 'enroll factor using valid generic argument' do
|
8
9
|
it 'returns a valid factor object' do
|
@@ -14,6 +15,7 @@ describe WorkOS::MFA do
|
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
18
|
+
|
17
19
|
context 'enroll factor using valid totp arguments' do
|
18
20
|
it 'returns a valid factor object' do
|
19
21
|
VCR.use_cassette 'mfa/enroll_factor_totp_valid' do
|
@@ -26,6 +28,7 @@ describe WorkOS::MFA do
|
|
26
28
|
end
|
27
29
|
end
|
28
30
|
end
|
31
|
+
|
29
32
|
context 'enroll factor using valid sms arguments' do
|
30
33
|
it 'returns a valid factor object' do
|
31
34
|
VCR.use_cassette 'mfa/enroll_factor_sms_valid' do
|
@@ -38,6 +41,7 @@ describe WorkOS::MFA do
|
|
38
41
|
end
|
39
42
|
end
|
40
43
|
end
|
44
|
+
|
41
45
|
describe 'enroll_factor invalid responses' do
|
42
46
|
context 'enroll factor throws error if type is not sms or totp' do
|
43
47
|
it 'returns an error' do
|
@@ -52,6 +56,7 @@ describe WorkOS::MFA do
|
|
52
56
|
)
|
53
57
|
end
|
54
58
|
end
|
59
|
+
|
55
60
|
context 'enroll factor throws error if type is not sms or totp' do
|
56
61
|
it 'returns an error' do
|
57
62
|
expect do
|
@@ -78,6 +83,7 @@ describe WorkOS::MFA do
|
|
78
83
|
end
|
79
84
|
end
|
80
85
|
end
|
86
|
+
|
81
87
|
describe 'challenge factor with valid request arguments' do
|
82
88
|
context 'challenge with totp' do
|
83
89
|
it 'returns challenge factor object for totp' do
|
@@ -89,6 +95,7 @@ describe WorkOS::MFA do
|
|
89
95
|
end
|
90
96
|
end
|
91
97
|
end
|
98
|
+
|
92
99
|
context 'challenge with sms' do
|
93
100
|
it 'returns a challenge factor object for sms' do
|
94
101
|
VCR.use_cassette 'mfa/challenge_factor_sms_valid' do
|
@@ -100,6 +107,7 @@ describe WorkOS::MFA do
|
|
100
107
|
end
|
101
108
|
end
|
102
109
|
end
|
110
|
+
|
103
111
|
context 'challenge with generic' do
|
104
112
|
it 'returns a valid challenge factor object for generic otp' do
|
105
113
|
VCR.use_cassette 'mfa/challenge_factor_generic_valid' do
|
@@ -111,6 +119,7 @@ describe WorkOS::MFA do
|
|
111
119
|
end
|
112
120
|
end
|
113
121
|
end
|
122
|
+
|
114
123
|
describe 'challenge factor with invalid arguments' do
|
115
124
|
context 'challenge with totp mssing authentication_factor_id' do
|
116
125
|
it 'returns argument error' do
|
@@ -123,6 +132,7 @@ describe WorkOS::MFA do
|
|
123
132
|
end
|
124
133
|
end
|
125
134
|
end
|
135
|
+
|
126
136
|
describe 'challenge factor with valid requests' do
|
127
137
|
context 'verify generic otp' do
|
128
138
|
it 'returns a true boolean if the challenge has not been verifed yet' do
|
@@ -135,6 +145,19 @@ describe WorkOS::MFA do
|
|
135
145
|
end
|
136
146
|
end
|
137
147
|
end
|
148
|
+
|
149
|
+
context 'verify generic otp invalid response' do
|
150
|
+
it 'returns a true boolean if the challenge has not been verifed yet' do
|
151
|
+
VCR.use_cassette 'mfa/verify_factor_generic_valid_is_false' do
|
152
|
+
verify_factor = described_class.verify_factor(
|
153
|
+
authentication_challenge_id: 'auth_challenge_01FZ4YVRBMXP5ZM0A7BP4AJ12J',
|
154
|
+
code: '897792',
|
155
|
+
)
|
156
|
+
expect(verify_factor.valid == 'false')
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
138
161
|
context 'verify generic otp' do
|
139
162
|
it 'returns error that the challenge has already been verfied' do
|
140
163
|
VCR.use_cassette 'mfa/verify_factor_generic_invalid' do
|
@@ -146,6 +169,7 @@ describe WorkOS::MFA do
|
|
146
169
|
end.to raise_error(WorkOS::InvalidRequestError)
|
147
170
|
end
|
148
171
|
end
|
172
|
+
|
149
173
|
context 'verify generic otp' do
|
150
174
|
it 'returns error that the challenge has expired' do
|
151
175
|
VCR.use_cassette 'mfa/verify_factor_generic_expired' do
|
@@ -160,6 +184,7 @@ describe WorkOS::MFA do
|
|
160
184
|
end
|
161
185
|
end
|
162
186
|
end
|
187
|
+
|
163
188
|
describe 'verify_factor with invalid argument' do
|
164
189
|
context 'missing code argument' do
|
165
190
|
it 'returns argument error' do
|
@@ -173,8 +198,9 @@ describe WorkOS::MFA do
|
|
173
198
|
)
|
174
199
|
end
|
175
200
|
end
|
201
|
+
|
176
202
|
context 'missing authentication_challenge_id argument' do
|
177
|
-
it '' do
|
203
|
+
it 'returns and error' do
|
178
204
|
expect do
|
179
205
|
described_class.verify_factor(
|
180
206
|
code: '897792',
|
@@ -185,6 +211,7 @@ describe WorkOS::MFA do
|
|
185
211
|
)
|
186
212
|
end
|
187
213
|
end
|
214
|
+
|
188
215
|
context 'missing code and authentication_challenge_id arguments' do
|
189
216
|
it 'returns argument error' do
|
190
217
|
expect do
|
@@ -196,6 +223,7 @@ describe WorkOS::MFA do
|
|
196
223
|
end
|
197
224
|
end
|
198
225
|
end
|
226
|
+
|
199
227
|
describe 'tests returning and deleting a factor' do
|
200
228
|
context 'returns a factor' do
|
201
229
|
it 'uses get_factor to return factor' do
|
@@ -207,6 +235,7 @@ describe WorkOS::MFA do
|
|
207
235
|
end
|
208
236
|
end
|
209
237
|
end
|
238
|
+
|
210
239
|
context 'invalid factor request' do
|
211
240
|
it 'uses get_factor and throws error if id is wrong' do
|
212
241
|
VCR.use_cassette 'mfa/get_factor_invalid' do
|
@@ -218,6 +247,7 @@ describe WorkOS::MFA do
|
|
218
247
|
end
|
219
248
|
end
|
220
249
|
end
|
250
|
+
|
221
251
|
context 'deletes facotr' do
|
222
252
|
it 'uses delete_factor to delete factor' do
|
223
253
|
VCR.use_cassette 'mfa/delete_factor' do
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.workos.com/directory_groups/
|
5
|
+
uri: https://api.workos.com/directory_groups/directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -14,7 +14,7 @@ http_interactions:
|
|
14
14
|
Accept:
|
15
15
|
- "*/*"
|
16
16
|
User-Agent:
|
17
|
-
- WorkOS; ruby/2.7.
|
17
|
+
- WorkOS; ruby/2.7.2; arm64-darwin21; v2.3.0
|
18
18
|
Authorization:
|
19
19
|
- Bearer <API_KEY>
|
20
20
|
response:
|
@@ -22,41 +22,59 @@ http_interactions:
|
|
22
22
|
code: 200
|
23
23
|
message: OK
|
24
24
|
headers:
|
25
|
-
|
26
|
-
-
|
25
|
+
Date:
|
26
|
+
- Thu, 14 Jul 2022 16:49:09 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
27
31
|
Connection:
|
28
32
|
- keep-alive
|
29
|
-
Vary:
|
30
|
-
- Origin, Accept-Encoding
|
31
33
|
Access-Control-Allow-Credentials:
|
32
34
|
- 'true'
|
33
|
-
|
34
|
-
- '
|
35
|
-
|
36
|
-
|
35
|
+
Content-Security-Policy:
|
36
|
+
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
37
|
+
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
38
|
+
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
39
|
+
Etag:
|
40
|
+
- W/"277-8j8DgAIILf/mCF7LCmvrqcqdwK4"
|
41
|
+
Expect-Ct:
|
42
|
+
- max-age=0
|
43
|
+
Referrer-Policy:
|
44
|
+
- no-referrer
|
37
45
|
Strict-Transport-Security:
|
38
46
|
- max-age=15552000; includeSubDomains
|
39
|
-
|
40
|
-
-
|
47
|
+
Vary:
|
48
|
+
- Origin, Accept-Encoding
|
49
|
+
Via:
|
50
|
+
- 1.1 spaces-router (b642bf20b975)
|
41
51
|
X-Content-Type-Options:
|
42
52
|
- nosniff
|
43
|
-
X-
|
44
|
-
-
|
53
|
+
X-Dns-Prefetch-Control:
|
54
|
+
- 'off'
|
55
|
+
X-Download-Options:
|
56
|
+
- noopen
|
57
|
+
X-Frame-Options:
|
58
|
+
- SAMEORIGIN
|
59
|
+
X-Permitted-Cross-Domain-Policies:
|
60
|
+
- none
|
45
61
|
X-Request-Id:
|
46
|
-
-
|
47
|
-
|
48
|
-
-
|
49
|
-
|
50
|
-
-
|
51
|
-
|
52
|
-
-
|
53
|
-
|
54
|
-
-
|
55
|
-
|
56
|
-
-
|
62
|
+
- 0f21c2f3-e24a-e3a2-85d3-41ee9e45b3e2
|
63
|
+
X-Xss-Protection:
|
64
|
+
- '0'
|
65
|
+
Cf-Cache-Status:
|
66
|
+
- DYNAMIC
|
67
|
+
Report-To:
|
68
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=Hnm%2BEiBTG2ROFxqX2mdwcp0HvQ173SgQlQDCmTmBQEbLv9w2dkcl2qMqYh44OSHRABBCkRfuJ2MtnHuqb6sQ5RjHRMKSCfRqklsOrgd%2FHo0PEE6mW0u%2BlZqBMIlN1BEp"}],"group":"cf-nel","max_age":604800}'
|
69
|
+
Nel:
|
70
|
+
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
71
|
+
Server:
|
72
|
+
- cloudflare
|
73
|
+
Cf-Ray:
|
74
|
+
- 72abc002fbd9f039-EWR
|
57
75
|
body:
|
58
|
-
encoding:
|
59
|
-
string: '{"id":"
|
60
|
-
http_version:
|
61
|
-
recorded_at: Thu,
|
76
|
+
encoding: ASCII-8BIT
|
77
|
+
string: '{"object":"directory_group","id":"directory_group_01G2Z8D4ZR8RJ03Y1W7P9K8NMG","idp_id":"01jlao4614two3d","directory_id":"directory_01G2Z8ADK5NPMVTWF48MVVE4HT","organization_id":"org_01EGS4P7QR31EZ4YWD1Z1XA176","name":"Sales","created_at":"2022-05-13T17:45:31.732Z","updated_at":"2022-07-13T17:45:42.618Z","raw_attributes":{"id":"01jlao4614two3d","etag":"\"SEQQBYC70u6XQ2UUjmjNYw6b0a5EzY0mTMShjiZga8A/uLYJ0Hrx1gXXVg9z-zGLBZET2Wo\"","kind":"admin#directory#group","name":"Sales","email":"sales@foo-corp.com","description":"","adminCreated":true,"directMembersCount":"1","nonEditableAliases":["sales@foo-corp.com.test-google-a.com"]}}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Thu, 14 Jul 2022 16:49:09 GMT
|
62
80
|
recorded_with: VCR 5.0.0
|
@@ -14,7 +14,7 @@ http_interactions:
|
|
14
14
|
Accept:
|
15
15
|
- "*/*"
|
16
16
|
User-Agent:
|
17
|
-
- WorkOS; ruby/
|
17
|
+
- WorkOS; ruby/2.7.2; arm64-darwin21; v2.3.0
|
18
18
|
Authorization:
|
19
19
|
- Bearer <API_KEY>
|
20
20
|
response:
|
@@ -23,64 +23,61 @@ http_interactions:
|
|
23
23
|
message: OK
|
24
24
|
headers:
|
25
25
|
Date:
|
26
|
-
-
|
26
|
+
- Thu, 14 Jul 2022 16:46:23 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json; charset=utf-8
|
29
|
-
|
30
|
-
-
|
29
|
+
Content-Length:
|
30
|
+
- '616'
|
31
31
|
Connection:
|
32
32
|
- keep-alive
|
33
|
-
Vary:
|
34
|
-
- Origin, Accept-Encoding
|
35
33
|
Access-Control-Allow-Credentials:
|
36
34
|
- 'true'
|
37
35
|
Content-Security-Policy:
|
38
36
|
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
39
37
|
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
40
38
|
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
41
|
-
|
42
|
-
-
|
39
|
+
Etag:
|
40
|
+
- W/"680-NPvBik348v8xg6EE7iZMYwD5UXw"
|
43
41
|
Expect-Ct:
|
44
42
|
- max-age=0
|
45
|
-
|
46
|
-
-
|
43
|
+
Referrer-Policy:
|
44
|
+
- no-referrer
|
47
45
|
Strict-Transport-Security:
|
48
46
|
- max-age=15552000; includeSubDomains
|
49
|
-
|
50
|
-
-
|
47
|
+
Vary:
|
48
|
+
- Origin, Accept-Encoding
|
49
|
+
Via:
|
50
|
+
- 1.1 spaces-router (b642bf20b975)
|
51
51
|
X-Content-Type-Options:
|
52
52
|
- nosniff
|
53
|
+
X-Dns-Prefetch-Control:
|
54
|
+
- 'off'
|
55
|
+
X-Download-Options:
|
56
|
+
- noopen
|
57
|
+
X-Frame-Options:
|
58
|
+
- SAMEORIGIN
|
53
59
|
X-Permitted-Cross-Domain-Policies:
|
54
60
|
- none
|
55
|
-
|
56
|
-
-
|
61
|
+
X-Request-Id:
|
62
|
+
- 51a82273-b413-cead-b968-c07ba4d6fd08
|
57
63
|
X-Xss-Protection:
|
58
64
|
- '0'
|
59
|
-
X-Request-Id:
|
60
|
-
- 59862449-73e5-4dfd-93ab-3764b1917801
|
61
|
-
Etag:
|
62
|
-
- W/"4c3-Ikxt2N0fUuSxCjv+RdYvW8W9Xwo"
|
63
|
-
Via:
|
64
|
-
- 1.1 vegur
|
65
65
|
Cf-Cache-Status:
|
66
66
|
- DYNAMIC
|
67
67
|
Report-To:
|
68
|
-
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=
|
68
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=OS7ELJ3A8tkzMafvaIThD%2B5JlYmul1puZlAXTxEKYBLlq%2B6DCtqDqAi4dtr4yRP3khNmg6MwPiuLqtdOXRmPOtag9Ti%2FGK8ra%2BJOlpwkFjD965CNBfzao4EJtExDkbS3"}],"group":"cf-nel","max_age":604800}'
|
69
69
|
Nel:
|
70
70
|
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
71
71
|
Server:
|
72
72
|
- cloudflare
|
73
73
|
Cf-Ray:
|
74
|
-
-
|
75
|
-
Alt-Svc:
|
76
|
-
- h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443";
|
77
|
-
ma=86400
|
74
|
+
- 72abbbf2b93e8ca5-EWR
|
78
75
|
body:
|
79
76
|
encoding: ASCII-8BIT
|
80
|
-
string: '{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{"id":"6092c280a3f1e19ef6d8cef8","name":"Logan
|
81
|
-
Paul Gingerich","teams":["5f696c8e9a63a60e965aaca8"],"spokeId":null,"lastName":"Gingerich","createdAt":"2021-05-05T16:06:24+0000","firstName":"Logan","updatedAt":"2021-
|
82
|
-
-
|
83
|
-
-
|
84
|
-
http_version:
|
85
|
-
recorded_at:
|
77
|
+
string: '{"object":"directory_user","id":"directory_user_01FAZYNPC8M0HRYTKFP2GNX852","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","organization_id":"org_01FAZWCWR03DVWA83NCJYKKD54","idp_id":"6092c280a3f1e19ef6d8cef8","username":"logan@workos.com","emails":[{"primary":true,"value":"logan@workos.com"}],"first_name":"Logan","last_name":"Gingerich","state":"active","raw_attributes":{"id":"6092c280a3f1e19ef6d8cef8","name":"Logan
|
78
|
+
Paul Gingerich","teams":["5f696c8e9a63a60e965aaca8"],"spokeId":null,"lastName":"Gingerich","createdAt":"2021-05-05T16:06:24+0000","firstName":"Logan","updatedAt":"2021-11-11T05:08:14+0000","workEmail":"logan@workos.com","department":"Infra","departmentId":"5f27ada9a5e9bc0001a0ae4a"},"custom_attributes":{},"created_at":"2021-07-19T17:57:57.268Z","updated_at":"2022-01-24T11:23:01.614Z","groups":[{"object":"directory_group","id":"directory_group_01FAZYNNQ4HQ6EBF29MPTH7VKB","idp_id":"5f696c8e9a63a60e965aaca8","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","organization_id":"org_01FAZWCWR03DVWA83NCJYKKD54","name":"Team
|
79
|
+
- Platform","created_at":"2021-07-19T17:57:56.580Z","updated_at":"2022-01-24T11:23:01.333Z","raw_attributes":{"id":"5f696c8e9a63a60e965aaca8","name":"Platform","parent":null}},{"object":"directory_group","id":"directory_group_01FAZYNN1NZWMBRAXXDSTB5NFH","idp_id":"5f27ada9a5e9bc0001a0ae4a","directory_id":"directory_01FAZYMST676QMTFN1DDJZZX87","organization_id":"org_01FAZWCWR03DVWA83NCJYKKD54","name":"Department
|
80
|
+
- Infra","created_at":"2021-07-19T17:57:55.893Z","updated_at":"2022-01-24T11:23:01.333Z","raw_attributes":{"id":"5f27ada9a5e9bc0001a0ae4a","name":"Infra","parent":"5f27ada9a5e9bc0001a0ae48"}}]}'
|
81
|
+
http_version:
|
82
|
+
recorded_at: Thu, 14 Jul 2022 16:46:23 GMT
|
86
83
|
recorded_with: VCR 5.0.0
|