workos 0.10.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/.semaphore/semaphore.yml +8 -2
- data/Gemfile.lock +49 -36
- data/lib/workos.rb +3 -0
- data/lib/workos/client.rb +3 -3
- data/lib/workos/connection.rb +8 -1
- data/lib/workos/directory.rb +53 -0
- data/lib/workos/directory_group.rb +44 -0
- data/lib/workos/directory_sync.rb +63 -7
- data/lib/workos/directory_user.rb +63 -0
- data/lib/workos/portal.rb +1 -1
- data/lib/workos/profile.rb +1 -2
- data/lib/workos/sso.rb +33 -6
- data/lib/workos/types.rb +3 -0
- data/lib/workos/types/connection_struct.rb +2 -0
- data/lib/workos/types/directory_group_struct.rb +13 -0
- data/lib/workos/types/directory_struct.rb +16 -0
- data/lib/workos/types/directory_user_struct.rb +19 -0
- data/lib/workos/types/intent_enum.rb +1 -0
- data/lib/workos/version.rb +1 -1
- data/sorbet/rbi/gems/addressable.rbi +199 -0
- data/sorbet/rbi/gems/ast.rbi +49 -0
- data/sorbet/rbi/gems/codecov.rbi +37 -0
- data/sorbet/rbi/gems/crack.rbi +62 -0
- data/sorbet/rbi/gems/docile.rbi +36 -0
- data/sorbet/rbi/gems/hashdiff.rbi +66 -0
- data/sorbet/rbi/gems/parallel.rbi +83 -0
- data/sorbet/rbi/gems/parser.rbi +1429 -0
- data/sorbet/rbi/gems/public_suffix.rbi +104 -0
- data/sorbet/rbi/gems/rainbow.rbi +118 -0
- data/sorbet/rbi/gems/rake.rbi +644 -0
- data/sorbet/rbi/gems/regexp_parser.rbi +926 -0
- data/sorbet/rbi/gems/rexml.rbi +628 -0
- data/sorbet/rbi/gems/rspec-core.rbi +1898 -0
- data/sorbet/rbi/gems/rspec-expectations.rbi +1127 -0
- data/sorbet/rbi/gems/rspec-mocks.rbi +1099 -0
- data/sorbet/rbi/gems/rspec-support.rbi +280 -0
- data/sorbet/rbi/gems/rspec.rbi +15 -0
- data/sorbet/rbi/gems/rubocop-ast.rbi +1355 -0
- data/sorbet/rbi/gems/rubocop.rbi +7253 -0
- data/sorbet/rbi/gems/ruby-progressbar.rbi +304 -0
- data/sorbet/rbi/gems/simplecov-html.rbi +35 -0
- data/sorbet/rbi/gems/simplecov.rbi +406 -0
- data/sorbet/rbi/gems/unicode-display_width.rbi +17 -0
- data/sorbet/rbi/gems/vcr.rbi +572 -0
- data/sorbet/rbi/gems/webmock.rbi +556 -0
- data/sorbet/rbi/gems/yard.rbi +1165 -0
- data/sorbet/rbi/sorbet-typed/lib/rake/all/rake.rbi +645 -0
- data/sorbet/rbi/sorbet-typed/lib/rspec-core/all/rspec-core.rbi +1891 -0
- data/sorbet/rbi/sorbet-typed/lib/rubocop/~>0.85/rubocop.rbi +2072 -0
- data/sorbet/rbi/sorbet-typed/lib/yard/all/yard.rbi +1214 -0
- data/sorbet/rbi/todo.rbi +1 -3
- data/spec/lib/workos/audit_trail_spec.rb +0 -8
- data/spec/lib/workos/directory_sync_spec.rb +347 -40
- data/spec/lib/workos/passwordless_spec.rb +0 -8
- data/spec/lib/workos/portal_spec.rb +18 -11
- data/spec/lib/workos/sso_spec.rb +150 -71
- data/spec/spec_helper.rb +2 -1
- data/spec/support/fixtures/vcr_cassettes/directory_sync/delete_directory.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/{sso/list_connections.yml → directory_sync/list_directories/with_after.yml} +7 -7
- data/spec/support/fixtures/vcr_cassettes/{sso/list_connections_with_limit_param.yml → directory_sync/list_directories/with_before.yml} +8 -8
- data/spec/support/fixtures/vcr_cassettes/{sso/list_connections_with_connection_type_param.yml → directory_sync/list_directories/with_domain.yml} +11 -10
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_limit.yml +74 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/{list_directories.yml → list_directories/with_no_options.yml} +1 -1
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_search.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_after.yml +76 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_before.yml +74 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_directory.yml +78 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_limit.yml +74 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/{list_groups.yml → list_groups/with_no_options.yml} +16 -6
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_user.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_after.yml +86 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_before.yml +75 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_directory.yml +93 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_group.yml +76 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_limit.yml +75 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/{list_users.yml → list_users/with_no_options.yml} +16 -6
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_dsync.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/portal/{generate_link.yml → generate_link_sso.yml} +1 -1
- data/spec/support/fixtures/vcr_cassettes/sso/create_connection_with_valid_source.yml +3 -3
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_after.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_before.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_connection_type.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/sso/{list_connections_with_domain_param.yml → list_connections/with_domain.yml} +6 -6
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_limit.yml +74 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_no_options.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/sso/{list_connections_with_before_param.yml → list_connections/with_organization_id.yml} +7 -8
- data/workos.gemspec +2 -0
- metadata +101 -40
- data/sorbet/rbi/hidden-definitions/errors.txt +0 -24896
- data/sorbet/rbi/hidden-definitions/hidden.rbi +0 -38411
- data/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +0 -8684
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/gem.rbi +0 -4222
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +0 -111
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +0 -543
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories_with_domain_param.yml +0 -63
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups_with_directory_param.yml +0 -62
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users_with_directory_param.yml +0 -62
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_after_param.yml +0 -72
@@ -2,14 +2,6 @@
|
|
2
2
|
# typed: false
|
3
3
|
|
4
4
|
describe WorkOS::Portal do
|
5
|
-
before :all do
|
6
|
-
WorkOS.key = 'test'
|
7
|
-
end
|
8
|
-
|
9
|
-
after :all do
|
10
|
-
WorkOS.key = nil
|
11
|
-
end
|
12
|
-
|
13
5
|
describe '.create_organization' do
|
14
6
|
context 'with valid payload' do
|
15
7
|
it 'creates an organization' do
|
@@ -47,9 +39,9 @@ describe WorkOS::Portal do
|
|
47
39
|
let(:organization) { 'org_01EHQMYV6MBK39QC5PZXHY59C3' }
|
48
40
|
|
49
41
|
describe 'with a valid organization' do
|
50
|
-
|
42
|
+
context 'with the sso intent' do
|
51
43
|
it 'returns an Admin Portal link' do
|
52
|
-
VCR.use_cassette 'portal/
|
44
|
+
VCR.use_cassette 'portal/generate_link_sso' do
|
53
45
|
portal_link = described_class.generate_link(
|
54
46
|
intent: 'sso',
|
55
47
|
organization: organization,
|
@@ -61,6 +53,21 @@ describe WorkOS::Portal do
|
|
61
53
|
end
|
62
54
|
end
|
63
55
|
end
|
56
|
+
|
57
|
+
describe 'with the dsync intent' do
|
58
|
+
it 'returns an Admin Portal link' do
|
59
|
+
VCR.use_cassette 'portal/generate_link_dsync' do
|
60
|
+
portal_link = described_class.generate_link(
|
61
|
+
intent: 'dsync',
|
62
|
+
organization: organization,
|
63
|
+
)
|
64
|
+
|
65
|
+
expect(portal_link).to eq(
|
66
|
+
'https://id.workos.com/portal/launch?secret=secret',
|
67
|
+
)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
64
71
|
end
|
65
72
|
|
66
73
|
describe 'with an invalid organization' do
|
@@ -88,7 +95,7 @@ describe WorkOS::Portal do
|
|
88
95
|
)
|
89
96
|
end.to raise_error(
|
90
97
|
ArgumentError,
|
91
|
-
|
98
|
+
/bogus-intent is not a valid value/,
|
92
99
|
)
|
93
100
|
end
|
94
101
|
end
|
data/spec/lib/workos/sso_spec.rb
CHANGED
@@ -73,7 +73,41 @@ describe WorkOS::SSO do
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
-
context 'with
|
76
|
+
context 'with a connection' do
|
77
|
+
let(:args) do
|
78
|
+
{
|
79
|
+
connection: 'connection_123',
|
80
|
+
client_id: 'workos-proj-123',
|
81
|
+
redirect_uri: 'foo.com/auth/callback',
|
82
|
+
state: {
|
83
|
+
next_page: '/dashboard/edit',
|
84
|
+
}.to_s,
|
85
|
+
}
|
86
|
+
end
|
87
|
+
it 'returns a valid URL' do
|
88
|
+
authorization_url = described_class.authorization_url(**args)
|
89
|
+
|
90
|
+
expect(URI.parse(authorization_url)).to be_a URI
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'returns the expected hostname' do
|
94
|
+
authorization_url = described_class.authorization_url(**args)
|
95
|
+
|
96
|
+
expect(URI.parse(authorization_url).host).to eq(WorkOS::API_HOSTNAME)
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'returns the expected query string' do
|
100
|
+
authorization_url = described_class.authorization_url(**args)
|
101
|
+
|
102
|
+
expect(URI.parse(authorization_url).query).to eq(
|
103
|
+
'client_id=workos-proj-123&redirect_uri=foo.com%2Fauth%2Fcallback' \
|
104
|
+
'&response_type=code&state=%7B%3Anext_page%3D%3E%22%2Fdashboard%2F' \
|
105
|
+
'edit%22%7D&connection=connection_123',
|
106
|
+
)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
context 'with neither connection, domain, or provider' do
|
77
111
|
let(:args) do
|
78
112
|
{
|
79
113
|
client_id: 'workos-proj-123',
|
@@ -88,7 +122,7 @@ describe WorkOS::SSO do
|
|
88
122
|
described_class.authorization_url(**args)
|
89
123
|
end.to raise_error(
|
90
124
|
ArgumentError,
|
91
|
-
'Either domain or provider is required.',
|
125
|
+
'Either connection, domain, or provider is required.',
|
92
126
|
)
|
93
127
|
end
|
94
128
|
end
|
@@ -159,10 +193,6 @@ describe WorkOS::SSO do
|
|
159
193
|
end
|
160
194
|
|
161
195
|
describe '.profile' do
|
162
|
-
before do
|
163
|
-
WorkOS.key = 'api-key'
|
164
|
-
end
|
165
|
-
|
166
196
|
let(:args) do
|
167
197
|
{
|
168
198
|
code: SecureRandom.hex(10),
|
@@ -274,14 +304,6 @@ describe WorkOS::SSO do
|
|
274
304
|
end
|
275
305
|
|
276
306
|
describe '.create_connection' do
|
277
|
-
before(:all) do
|
278
|
-
WorkOS.key = 'key'
|
279
|
-
end
|
280
|
-
|
281
|
-
after(:all) do
|
282
|
-
WorkOS.key = nil
|
283
|
-
end
|
284
|
-
|
285
307
|
context 'with a valid source' do
|
286
308
|
it 'creates a connection' do
|
287
309
|
VCR.use_cassette('sso/create_connection_with_valid_source') do
|
@@ -293,6 +315,8 @@ describe WorkOS::SSO do
|
|
293
315
|
expect(connection.connection_type).to eq('GoogleOAuth')
|
294
316
|
expect(connection.name).to eq('Foo Corp')
|
295
317
|
expect(connection.domains.first[:domain]).to eq('example.com')
|
318
|
+
expect(connection.organization_id).to eq('12345')
|
319
|
+
expect(connection.status).to eq('linked')
|
296
320
|
end
|
297
321
|
end
|
298
322
|
end
|
@@ -312,14 +336,6 @@ describe WorkOS::SSO do
|
|
312
336
|
end
|
313
337
|
|
314
338
|
describe '.promote_draft_connection' do
|
315
|
-
before(:all) do
|
316
|
-
WorkOS.key = 'key'
|
317
|
-
end
|
318
|
-
|
319
|
-
after(:all) do
|
320
|
-
WorkOS.key = nil
|
321
|
-
end
|
322
|
-
|
323
339
|
let(:token) { 'draft_conn_id' }
|
324
340
|
let(:client_id) { 'proj_0239u590h' }
|
325
341
|
|
@@ -357,89 +373,160 @@ describe WorkOS::SSO do
|
|
357
373
|
end
|
358
374
|
|
359
375
|
describe '.list_connections' do
|
360
|
-
|
361
|
-
|
362
|
-
|
376
|
+
context 'with no options' do
|
377
|
+
it 'returns connections and metadata' do
|
378
|
+
expected_metadata = {
|
379
|
+
'after' => nil,
|
380
|
+
'before' => 'before_id',
|
381
|
+
}
|
363
382
|
|
364
|
-
|
365
|
-
|
366
|
-
end
|
383
|
+
VCR.use_cassette 'sso/list_connections/with_no_options' do
|
384
|
+
connections = described_class.list_connections
|
367
385
|
|
368
|
-
|
369
|
-
|
370
|
-
VCR.use_cassette('sso/list_connections') do
|
371
|
-
connections = WorkOS::SSO.list_connections
|
372
|
-
expect(connections.size).to eq(1)
|
386
|
+
expect(connections.data.size).to eq(3)
|
387
|
+
expect(connections.list_metadata).to eq(expected_metadata)
|
373
388
|
end
|
374
389
|
end
|
375
390
|
end
|
376
391
|
|
377
392
|
context 'with connection_type option' do
|
378
|
-
it '
|
379
|
-
|
380
|
-
connections
|
393
|
+
it 'forms the proper request to the API' do
|
394
|
+
request_args = [
|
395
|
+
'/connections?connection_type=OktaSAML',
|
396
|
+
'Content-Type' => 'application/json'
|
397
|
+
]
|
398
|
+
|
399
|
+
expected_request = Net::HTTP::Get.new(*request_args)
|
400
|
+
|
401
|
+
expect(Net::HTTP::Get).to receive(:new).with(*request_args).
|
402
|
+
and_return(expected_request)
|
403
|
+
|
404
|
+
VCR.use_cassette 'sso/list_connections/with_connection_type' do
|
405
|
+
connections = described_class.list_connections(
|
381
406
|
connection_type: 'OktaSAML',
|
382
407
|
)
|
383
|
-
|
408
|
+
|
409
|
+
expect(connections.data.size).to eq(3)
|
410
|
+
expect(connections.data.first.connection_type).to eq('OktaSAML')
|
384
411
|
end
|
385
412
|
end
|
386
413
|
end
|
387
414
|
|
388
415
|
context 'with domain option' do
|
389
|
-
it '
|
390
|
-
|
391
|
-
connections
|
416
|
+
it 'forms the proper request to the API' do
|
417
|
+
request_args = [
|
418
|
+
'/connections?domain=foo-corp.com',
|
419
|
+
'Content-Type' => 'application/json'
|
420
|
+
]
|
421
|
+
|
422
|
+
expected_request = Net::HTTP::Get.new(*request_args)
|
423
|
+
|
424
|
+
expect(Net::HTTP::Get).to receive(:new).with(*request_args).
|
425
|
+
and_return(expected_request)
|
426
|
+
|
427
|
+
VCR.use_cassette 'sso/list_connections/with_domain' do
|
428
|
+
connections = described_class.list_connections(
|
392
429
|
domain: 'foo-corp.com',
|
393
430
|
)
|
394
|
-
|
395
|
-
expect(
|
431
|
+
|
432
|
+
expect(connections.data.size).to eq(1)
|
433
|
+
end
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
context 'with organization_id option' do
|
438
|
+
it 'forms the proper request to the API' do
|
439
|
+
request_args = [
|
440
|
+
'/connections?organization_id=org_01EGS4P7QR31EZ4YWD1Z1XA176',
|
441
|
+
'Content-Type' => 'application/json'
|
442
|
+
]
|
443
|
+
|
444
|
+
expected_request = Net::HTTP::Get.new(*request_args)
|
445
|
+
|
446
|
+
expect(Net::HTTP::Get).to receive(:new).with(*request_args).
|
447
|
+
and_return(expected_request)
|
448
|
+
|
449
|
+
VCR.use_cassette 'sso/list_connections/with_organization_id' do
|
450
|
+
connections = described_class.list_connections(
|
451
|
+
organization_id: 'org_01EGS4P7QR31EZ4YWD1Z1XA176',
|
452
|
+
)
|
453
|
+
|
454
|
+
expect(connections.data.size).to eq(1)
|
455
|
+
expect(connections.data.first.organization_id).to eq(
|
456
|
+
'org_01EGS4P7QR31EZ4YWD1Z1XA176',
|
457
|
+
)
|
396
458
|
end
|
397
459
|
end
|
398
460
|
end
|
399
461
|
|
400
462
|
context 'with limit option' do
|
401
|
-
it '
|
402
|
-
|
403
|
-
connections
|
404
|
-
|
463
|
+
it 'forms the proper request to the API' do
|
464
|
+
request_args = [
|
465
|
+
'/connections?limit=2',
|
466
|
+
'Content-Type' => 'application/json'
|
467
|
+
]
|
468
|
+
|
469
|
+
expected_request = Net::HTTP::Get.new(*request_args)
|
470
|
+
|
471
|
+
expect(Net::HTTP::Get).to receive(:new).with(*request_args).
|
472
|
+
and_return(expected_request)
|
473
|
+
|
474
|
+
VCR.use_cassette 'sso/list_connections/with_limit' do
|
475
|
+
connections = described_class.list_connections(
|
476
|
+
limit: 2,
|
405
477
|
)
|
406
|
-
|
478
|
+
|
479
|
+
expect(connections.data.size).to eq(2)
|
407
480
|
end
|
408
481
|
end
|
409
482
|
end
|
410
483
|
|
411
484
|
context 'with before option' do
|
412
|
-
it '
|
413
|
-
|
414
|
-
connections
|
485
|
+
it 'forms the proper request to the API' do
|
486
|
+
request_args = [
|
487
|
+
'/connections?before=conn_01EQKPMQAPV02H270HKVNS4CTA',
|
488
|
+
'Content-Type' => 'application/json'
|
489
|
+
]
|
490
|
+
|
491
|
+
expected_request = Net::HTTP::Get.new(*request_args)
|
492
|
+
|
493
|
+
expect(Net::HTTP::Get).to receive(:new).with(*request_args).
|
494
|
+
and_return(expected_request)
|
495
|
+
|
496
|
+
VCR.use_cassette 'sso/list_connections/with_before' do
|
497
|
+
connections = described_class.list_connections(
|
415
498
|
before: 'conn_01EQKPMQAPV02H270HKVNS4CTA',
|
416
499
|
)
|
417
|
-
|
500
|
+
|
501
|
+
expect(connections.data.size).to eq(3)
|
418
502
|
end
|
419
503
|
end
|
420
504
|
end
|
421
505
|
|
422
506
|
context 'with after option' do
|
423
|
-
it '
|
424
|
-
|
425
|
-
connections
|
507
|
+
it 'forms the proper request to the API' do
|
508
|
+
request_args = [
|
509
|
+
'/connections?after=conn_01EQKPMQAPV02H270HKVNS4CTA',
|
510
|
+
'Content-Type' => 'application/json'
|
511
|
+
]
|
512
|
+
|
513
|
+
expected_request = Net::HTTP::Get.new(*request_args)
|
514
|
+
|
515
|
+
expect(Net::HTTP::Get).to receive(:new).with(*request_args).
|
516
|
+
and_return(expected_request)
|
517
|
+
|
518
|
+
VCR.use_cassette 'sso/list_connections/with_after' do
|
519
|
+
connections = described_class.list_connections(
|
426
520
|
after: 'conn_01EQKPMQAPV02H270HKVNS4CTA',
|
427
521
|
)
|
428
|
-
|
522
|
+
|
523
|
+
expect(connections.data.size).to eq(3)
|
429
524
|
end
|
430
525
|
end
|
431
526
|
end
|
432
527
|
end
|
433
528
|
|
434
529
|
describe '.get_connection' do
|
435
|
-
before(:all) do
|
436
|
-
WorkOS.key = 'key'
|
437
|
-
end
|
438
|
-
|
439
|
-
after(:all) do
|
440
|
-
WorkOS.key = nil
|
441
|
-
end
|
442
|
-
|
443
530
|
context 'with a valid id' do
|
444
531
|
it 'gets the connection details' do
|
445
532
|
VCR.use_cassette('sso/get_connection_with_valid_id') do
|
@@ -470,14 +557,6 @@ describe WorkOS::SSO do
|
|
470
557
|
end
|
471
558
|
|
472
559
|
describe '.delete_connection' do
|
473
|
-
before(:all) do
|
474
|
-
WorkOS.key = 'key'
|
475
|
-
end
|
476
|
-
|
477
|
-
after(:all) do
|
478
|
-
WorkOS.key = nil
|
479
|
-
end
|
480
|
-
|
481
560
|
context 'with a valid id' do
|
482
561
|
it 'returns true' do
|
483
562
|
VCR.use_cassette('sso/delete_connection_with_valid_id') do
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# typed:
|
2
|
+
# typed: false
|
3
3
|
|
4
4
|
require 'simplecov'
|
5
5
|
SimpleCov.start
|
@@ -48,5 +48,6 @@ RSpec.configure do |config|
|
|
48
48
|
end
|
49
49
|
end)
|
50
50
|
|
51
|
+
config.before(:all) { WorkOS.key ||= '' }
|
51
52
|
config.before(:each) { VCR.turn_on! }
|
52
53
|
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://api.workos.com/directories/directory_01F2T098SKN5PCTVSJ7CWP70N5
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
User-Agent:
|
17
|
+
- WorkOS; ruby/2.7.1; x86_64-darwin20; v0.10.3
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 202
|
23
|
+
message: Accepted
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- Cowboy
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Vary:
|
30
|
+
- Origin, Accept-Encoding
|
31
|
+
Access-Control-Allow-Credentials:
|
32
|
+
- 'true'
|
33
|
+
Content-Security-Policy:
|
34
|
+
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
35
|
+
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
36
|
+
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
37
|
+
X-Dns-Prefetch-Control:
|
38
|
+
- 'off'
|
39
|
+
Expect-Ct:
|
40
|
+
- max-age=0
|
41
|
+
X-Frame-Options:
|
42
|
+
- SAMEORIGIN
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=15552000; includeSubDomains
|
45
|
+
X-Download-Options:
|
46
|
+
- noopen
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Permitted-Cross-Domain-Policies:
|
50
|
+
- none
|
51
|
+
Referrer-Policy:
|
52
|
+
- no-referrer
|
53
|
+
X-Xss-Protection:
|
54
|
+
- '0'
|
55
|
+
X-Request-Id:
|
56
|
+
- 834c3434-80dd-4e5e-bda7-95cd1412ad29
|
57
|
+
Content-Type:
|
58
|
+
- text/plain; charset=utf-8
|
59
|
+
Content-Length:
|
60
|
+
- '8'
|
61
|
+
Etag:
|
62
|
+
- W/"8-YaBXLEiT7zQxEyDYTILfiL6oPhE"
|
63
|
+
Date:
|
64
|
+
- Wed, 21 Apr 2021 22:26:51 GMT
|
65
|
+
Via:
|
66
|
+
- 1.1 vegur
|
67
|
+
body:
|
68
|
+
encoding: UTF-8
|
69
|
+
string: Accepted
|
70
|
+
http_version:
|
71
|
+
recorded_at: Wed, 21 Apr 2021 22:26:51 GMT
|
72
|
+
recorded_with: VCR 5.0.0
|