workos 0.10.0 → 0.11.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/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/.semaphore/semaphore.yml +8 -2
- data/Gemfile.lock +49 -36
- 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 +60 -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/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 +18 -0
- data/lib/workos/types/intent_enum.rb +1 -0
- data/lib/workos/types.rb +3 -0
- data/lib/workos/version.rb +1 -1
- data/lib/workos.rb +3 -0
- 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
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
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
http_interactions:
|
|
3
3
|
- request:
|
|
4
4
|
method: get
|
|
5
|
-
uri: https://api.workos.com/
|
|
5
|
+
uri: https://api.workos.com/directories?after=after-id
|
|
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.1; x86_64-darwin19; v0.10.
|
|
17
|
+
- WorkOS; ruby/2.7.1; x86_64-darwin19; v0.10.3
|
|
18
18
|
Authorization:
|
|
19
19
|
- Bearer <API_KEY>
|
|
20
20
|
response:
|
|
@@ -53,20 +53,20 @@ http_interactions:
|
|
|
53
53
|
X-Xss-Protection:
|
|
54
54
|
- '0'
|
|
55
55
|
X-Request-Id:
|
|
56
|
-
-
|
|
56
|
+
- 1e6d2f37-ca39-4e6c-8d04-4a56fed444ce
|
|
57
57
|
Content-Type:
|
|
58
58
|
- application/json; charset=utf-8
|
|
59
59
|
Etag:
|
|
60
|
-
- W/"
|
|
60
|
+
- W/"7dc-9PMr4siidbvsdQqw0uiJT6E94Dc"
|
|
61
61
|
Date:
|
|
62
|
-
-
|
|
62
|
+
- Thu, 22 Apr 2021 21:33:48 GMT
|
|
63
63
|
Transfer-Encoding:
|
|
64
64
|
- chunked
|
|
65
65
|
Via:
|
|
66
66
|
- 1.1 vegur
|
|
67
67
|
body:
|
|
68
68
|
encoding: ASCII-8BIT
|
|
69
|
-
string: '{"data":[{"object":"
|
|
69
|
+
string: '{"object":"list","listMetadata":{"before":"before-id","after":null},"data":[{"object":"directory","id":"directory_edp_1","external_key":"lA3gS1kCZMCkk82E","state":"linked","type":"gsuite directory","name":"Foo Corp","bearer_token":null,"client_id":"project_XXX","domain":"foo-corp.com"}, {"object":"directory","id":"directory_edp_2","external_key":"lA3g","state":"linked","type":"okta scim v2.0","name":"Example", "bearer_token":null,"client_id":"project_XXX","domain":"example.com"}, {"object":"directory","id":"directory_edp_3","external_key":"lA3gS1kC","state":"linked","type":"bamboohr","name":"Acme","bearer_token":null,"client_id":"project_XXX","domain":"acme.com"}]}'
|
|
70
70
|
http_version:
|
|
71
|
-
recorded_at:
|
|
71
|
+
recorded_at: Thu, 22 Apr 2021 21:33:49 GMT
|
|
72
72
|
recorded_with: VCR 5.0.0
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
http_interactions:
|
|
3
3
|
- request:
|
|
4
4
|
method: get
|
|
5
|
-
uri: https://api.workos.com/
|
|
5
|
+
uri: https://api.workos.com/directories?before=before-id
|
|
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.1; x86_64-darwin19; v0.10.
|
|
17
|
+
- WorkOS; ruby/2.7.1; x86_64-darwin19; v0.10.3
|
|
18
18
|
Authorization:
|
|
19
19
|
- Bearer <API_KEY>
|
|
20
20
|
response:
|
|
@@ -53,20 +53,20 @@ http_interactions:
|
|
|
53
53
|
X-Xss-Protection:
|
|
54
54
|
- '0'
|
|
55
55
|
X-Request-Id:
|
|
56
|
-
-
|
|
56
|
+
- ee432766-24b5-4d6d-baa9-05b7d56ac582
|
|
57
57
|
Content-Type:
|
|
58
58
|
- application/json; charset=utf-8
|
|
59
59
|
Content-Length:
|
|
60
|
-
- '
|
|
60
|
+
- '71'
|
|
61
61
|
Etag:
|
|
62
|
-
- W/"
|
|
62
|
+
- W/"47-5KOnfOsRy36pnaPjBxvaf6LRiGc"
|
|
63
63
|
Date:
|
|
64
|
-
-
|
|
64
|
+
- Thu, 22 Apr 2021 21:33:48 GMT
|
|
65
65
|
Via:
|
|
66
66
|
- 1.1 vegur
|
|
67
67
|
body:
|
|
68
68
|
encoding: UTF-8
|
|
69
|
-
string: '{"data":[{"object":"
|
|
69
|
+
string: '{"object":"list","listMetadata":{"before":"before-id","after":null},"data":[{"object":"directory","id":"directory_edp_1","external_key":"lA3gS1kCZMCkk82E","state":"linked","type":"gsuite directory","name":"Foo Corp","bearer_token":null,"client_id":"project_XXX","domain":"foo-corp.com"}, {"object":"directory","id":"directory_edp_2","external_key":"lA3g","state":"linked","type":"okta scim v2.0","name":"Example", "bearer_token":null,"client_id":"project_XXX","domain":"example.com"}, {"object":"directory","id":"directory_edp_3","external_key":"lA3gS1kC","state":"linked","type":"bamboohr","name":"Acme","bearer_token":null,"client_id":"project_XXX","domain":"acme.com"}]}'
|
|
70
70
|
http_version:
|
|
71
|
-
recorded_at:
|
|
71
|
+
recorded_at: Thu, 22 Apr 2021 21:33:48 GMT
|
|
72
72
|
recorded_with: VCR 5.0.0
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
http_interactions:
|
|
3
3
|
- request:
|
|
4
4
|
method: get
|
|
5
|
-
uri: https://api.workos.com/
|
|
5
|
+
uri: https://api.workos.com/directories?domain=foo-corp.com
|
|
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.1; x86_64-darwin19; v0.10.
|
|
17
|
+
- WorkOS; ruby/2.7.1; x86_64-darwin19; v0.10.3
|
|
18
18
|
Authorization:
|
|
19
19
|
- Bearer <API_KEY>
|
|
20
20
|
response:
|
|
@@ -53,20 +53,21 @@ http_interactions:
|
|
|
53
53
|
X-Xss-Protection:
|
|
54
54
|
- '0'
|
|
55
55
|
X-Request-Id:
|
|
56
|
-
-
|
|
56
|
+
- c2664753-7a2a-499f-a6e7-dae700ad49d7
|
|
57
57
|
Content-Type:
|
|
58
58
|
- application/json; charset=utf-8
|
|
59
|
+
Content-Length:
|
|
60
|
+
- '256'
|
|
59
61
|
Etag:
|
|
60
|
-
- W/"
|
|
62
|
+
- W/"100-Vh8CFQGzG+aGyEkNXe2nXGxNFJ4"
|
|
61
63
|
Date:
|
|
62
|
-
-
|
|
63
|
-
Transfer-Encoding:
|
|
64
|
-
- chunked
|
|
64
|
+
- Thu, 22 Apr 2021 21:33:47 GMT
|
|
65
65
|
Via:
|
|
66
66
|
- 1.1 vegur
|
|
67
67
|
body:
|
|
68
|
-
encoding:
|
|
69
|
-
string: '{"
|
|
68
|
+
encoding: UTF-8
|
|
69
|
+
string: '{"object":"list","listMetadata":{"before":null,"after":null},"data":[{"object":"directory","id":"directory_01EK2YEMVTWGX27STRDR0N3MP9","name":"Foo
|
|
70
|
+
Corp","external_key":"SZ5TZMl7gcOAKS04","type":"gsuite directory","state":"linked","domain":"foo-corp.com"}]}'
|
|
70
71
|
http_version:
|
|
71
|
-
recorded_at:
|
|
72
|
+
recorded_at: Thu, 22 Apr 2021 21:33:47 GMT
|
|
72
73
|
recorded_with: VCR 5.0.0
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: https://api.workos.com/directories?limit=2
|
|
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-darwin19; v0.10.3
|
|
18
|
+
Authorization:
|
|
19
|
+
- Bearer <API_KEY>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
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
|
+
- 428c7b66-d05a-4055-8bad-3411cce2af98
|
|
57
|
+
Content-Type:
|
|
58
|
+
- application/json; charset=utf-8
|
|
59
|
+
Content-Length:
|
|
60
|
+
- '509'
|
|
61
|
+
Etag:
|
|
62
|
+
- W/"1fd-xSekCggfEeBaxDK/LwXVh/ANf8E"
|
|
63
|
+
Date:
|
|
64
|
+
- Thu, 22 Apr 2021 21:33:49 GMT
|
|
65
|
+
Via:
|
|
66
|
+
- 1.1 vegur
|
|
67
|
+
body:
|
|
68
|
+
encoding: UTF-8
|
|
69
|
+
string: '{"object":"list","listMetadata":{"before":"directory_01F3DR5PASNQN7Z41K933Q12BM","after":null},"data":[{"object":"directory","id":"directory_01F3TMHZ5786V0BW141Q3G6XWX","name":"NEW
|
|
70
|
+
Azure AD SCIM","external_key":"RfEhaHYmukAQgqME","type":"azure scim v2.0","state":"linked","domain":"sheldonvaughn.com"},{"object":"directory","id":"directory_01F3DR5PASNQN7Z41K933Q12BM","name":"Example
|
|
71
|
+
Workday Company, Inc.","external_key":"NGGpjT9hQsiSgOKc","type":"workday","state":"unlinked","domain":"domain.example.com"}]}'
|
|
72
|
+
http_version:
|
|
73
|
+
recorded_at: Thu, 22 Apr 2021 21:33:49 GMT
|
|
74
|
+
recorded_with: VCR 5.0.0
|
|
@@ -56,7 +56,7 @@ http_interactions:
|
|
|
56
56
|
- 1.1 vegur
|
|
57
57
|
body:
|
|
58
58
|
encoding: ASCII-8BIT
|
|
59
|
-
string: '{"object":"list","listMetadata":{"before":"
|
|
59
|
+
string: '{"object":"list","listMetadata":{"before":"before-id","after":null},"data":[{"object":"directory","id":"directory_edp_1","external_key":"lA3gS1kCZMCkk82E","state":"linked","type":"gsuite directory","name":"Foo Corp","bearer_token":null,"client_id":"project_XXX","domain":"foo-corp.com"}, {"object":"directory","id":"directory_edp_2","external_key":"lA3g","state":"linked","type":"okta scim v2.0","name":"Example", "bearer_token":null,"client_id":"project_XXX","domain":"example.com"}, {"object":"directory","id":"directory_edp_3","external_key":"lA3gS1kC","state":"linked","type":"bamboohr","name":"Acme","bearer_token":null,"client_id":"project_XXX","domain":"acme.com"}]}'
|
|
60
60
|
http_version:
|
|
61
61
|
recorded_at: Thu, 30 Apr 2020 03:11:45 GMT
|
|
62
62
|
recorded_with: VCR 5.0.0
|