workos 0.11.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.workos.com/organizations/org_01EZDF20TZEJXKPSX2BJRN6TV6
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/3.0.1; x86_64-darwin19; v0.11.1
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
+ - 06e7c714-c492-4f4e-8fbf-41b0367531ff
57
+ Content-Type:
58
+ - application/json; charset=utf-8
59
+ Content-Length:
60
+ - '312'
61
+ Etag:
62
+ - W/"138-g/hQHq1azVQbQRpF7ECy/AbaJ8E"
63
+ Date:
64
+ - Mon, 10 May 2021 17:21:42 GMT
65
+ Via:
66
+ - 1.1 vegur
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"object":"organization","id":"org_01EZDF20TZEJXKPSX2BJRN6TV6","name":"Foo
70
+ Corp","domains":[{"object":"organization_domain","id":"org_domain_01EZDF20V4VAME34TF0B3DPK49","domain":"foo-corp.com"},{"object":"organization_domain","id":"org_domain_01F2PYX1XMS5ZQW1E8FZ57GPQN","domain":"blairworkos.onmicrosoft.com"}]}'
71
+ http_version:
72
+ recorded_at: Mon, 10 May 2021 17:21:42 GMT
73
+ recorded_with: VCR 5.0.0
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  http_interactions:
3
3
  - request:
4
- method: post
5
- uri: https://api.workos.com/connections
4
+ method: get
5
+ uri: https://api.workos.com/organizations/invalid
6
6
  body:
7
- encoding: UTF-8
8
- string: '{"source":"invalid"}'
7
+ encoding: US-ASCII
8
+ string: ''
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -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.2.2
17
+ - WorkOS; ruby/3.0.1; x86_64-darwin19; v0.11.1
18
18
  Authorization:
19
19
  - Bearer <API_KEY>
20
20
  response:
@@ -22,12 +22,22 @@ http_interactions:
22
22
  code: 404
23
23
  message: Not Found
24
24
  headers:
25
+ Server:
26
+ - Cowboy
27
+ Connection:
28
+ - keep-alive
25
29
  Vary:
26
30
  - Origin, Accept-Encoding
27
31
  Access-Control-Allow-Credentials:
28
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'
29
37
  X-Dns-Prefetch-Control:
30
38
  - 'off'
39
+ Expect-Ct:
40
+ - max-age=0
31
41
  X-Frame-Options:
32
42
  - SAMEORIGIN
33
43
  Strict-Transport-Security:
@@ -36,10 +46,14 @@ http_interactions:
36
46
  - noopen
37
47
  X-Content-Type-Options:
38
48
  - nosniff
49
+ X-Permitted-Cross-Domain-Policies:
50
+ - none
51
+ Referrer-Policy:
52
+ - no-referrer
39
53
  X-Xss-Protection:
40
- - 1; mode=block
54
+ - '0'
41
55
  X-Request-Id:
42
- - ''
56
+ -
43
57
  Content-Type:
44
58
  - application/json; charset=utf-8
45
59
  Content-Length:
@@ -47,12 +61,12 @@ http_interactions:
47
61
  Etag:
48
62
  - W/"17-SuRA/yvUWUo8rK6x7dKURLeBo+0"
49
63
  Date:
50
- - Fri, 24 Apr 2020 02:16:27 GMT
51
- Connection:
52
- - keep-alive
64
+ - Mon, 10 May 2021 17:21:43 GMT
65
+ Via:
66
+ - 1.1 vegur
53
67
  body:
54
68
  encoding: UTF-8
55
69
  string: '{"message":"Not Found"}'
56
- http_version:
57
- recorded_at: Fri, 24 Apr 2020 02:16:27 GMT
70
+ http_version:
71
+ recorded_at: Mon, 10 May 2021 17:21:43 GMT
58
72
  recorded_with: VCR 5.0.0
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.workos.com/organizations/org_01F29YJ068E52HGEB8ZQGC9MJG
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"domains":["example.me"],"name":"Test Organization"}'
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/3.0.1; x86_64-darwin19; v0.11.1
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
+ - 9acc2cae-063a-485f-8a36-df21816b66bf
57
+ Content-Type:
58
+ - application/json; charset=utf-8
59
+ Content-Length:
60
+ - '202'
61
+ Etag:
62
+ - W/"ca-cUBZaGl5MJlERA8SKJ9+GrSHPM0"
63
+ Date:
64
+ - Wed, 05 May 2021 22:14:09 GMT
65
+ Via:
66
+ - 1.1 vegur
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"object":"organization","id":"org_01F29YJ068E52HGEB8ZQGC9MJG","name":"Test
70
+ Organization","domains":[{"object":"organization_domain","id":"org_domain_01F4Z9GXPP2BEH019613C72E4Y","domain":"example.me"}]}'
71
+ http_version:
72
+ recorded_at: Wed, 05 May 2021 22:14:09 GMT
73
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.workos.com/organizations/org_01F29YJ068E52HGEB8ZQGC9MJG
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"domains":["example.com"],"name":"Test Organization 2"}'
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/3.0.1; x86_64-darwin19; v0.11.1
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
+ - 6ba2cbf9-76e3-4a6a-8ebe-d25edb366ed0
57
+ Content-Type:
58
+ - application/json; charset=utf-8
59
+ Content-Length:
60
+ - '205'
61
+ Etag:
62
+ - W/"cd-mlRMlyyz/LtzInRhAghs1B+BT4s"
63
+ Date:
64
+ - Wed, 05 May 2021 22:14:10 GMT
65
+ Via:
66
+ - 1.1 vegur
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"object":"organization","id":"org_01F29YJ068E52HGEB8ZQGC9MJG","name":"Test
70
+ Organization 2","domains":[{"object":"organization_domain","id":"org_domain_01F4Z9GY3089GV4SENXWZ9RBX1","domain":"example.com"}]}'
71
+ http_version:
72
+ recorded_at: Wed, 05 May 2021 22:14:10 GMT
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/sso/profile
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/3.0.1; arm64-darwin20; v1.0.0
18
+ Authorization:
19
+ - Bearer access_token
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
+ - 45f253d6-51bb-4171-879a-d532f0275044
57
+ Content-Type:
58
+ - application/json; charset=utf-8
59
+ Content-Length:
60
+ - "545"
61
+ Etag:
62
+ - W/"221-LoXMZbv3vrn7lnJvNn6G/pqr7+c"
63
+ Date:
64
+ - Tue, 18 May 2021 22:55:21 GMT
65
+ Via:
66
+ - 1.1 vegur
67
+ body:
68
+ encoding: UTF-8
69
+ string:
70
+ '{"object":"profile","id":"prof_01EEJTY9SZ1R350RB7B73SNBKF","connection_id":"conn_01E83FVYZHY7DM4S9503JHV0R5","connection_type":"GoogleOAuth","idp_id":"116485463307139932699","email":"bob.loblaw@workos.com","first_name":"Bob","last_name":"Loblaw","raw_attributes":{"hd":"workos.com","id":"116485463307139932699","name":"Bob
71
+ Loblaw","email":"bob.loblaw@workos.com","locale":"en","picture":"https://lh3.googleusercontent.com/a-/AOh14GyO2hLlgZvteDQ3Ldi3_-RteZLya0hWH7247Cam=s96-c","given_name":"Bob","family_name":"Loblaw","verified_email":true}}'
72
+ http_version:
73
+ recorded_at: Tue, 18 May 2021 22:55:21 GMT
74
+ recorded_with: VCR 5.0.0
data/workos.gemspec CHANGED
@@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency 'webmock'
35
35
  spec.add_development_dependency 'yard'
36
36
 
37
- spec.required_ruby_version = '~> 3.0'
37
+ spec.required_ruby_version = '>= 2.5'
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - WorkOS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-29 00:00:00.000000000 Z
11
+ date: 2021-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-runtime
@@ -217,9 +217,11 @@ files:
217
217
  - lib/workos/directory_user.rb
218
218
  - lib/workos/errors.rb
219
219
  - lib/workos/organization.rb
220
+ - lib/workos/organizations.rb
220
221
  - lib/workos/passwordless.rb
221
222
  - lib/workos/portal.rb
222
223
  - lib/workos/profile.rb
224
+ - lib/workos/profile_and_token.rb
223
225
  - lib/workos/sso.rb
224
226
  - lib/workos/types.rb
225
227
  - lib/workos/types/connection_struct.rb
@@ -270,6 +272,7 @@ files:
270
272
  - spec/lib/workos/audit_trail_spec.rb
271
273
  - spec/lib/workos/base_spec.rb
272
274
  - spec/lib/workos/directory_sync_spec.rb
275
+ - spec/lib/workos/organizations_spec.rb
273
276
  - spec/lib/workos/passwordless_spec.rb
274
277
  - spec/lib/workos/portal_spec.rb
275
278
  - spec/lib/workos/sso_spec.rb
@@ -306,7 +309,13 @@ files:
306
309
  - spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_no_options.yml
307
310
  - spec/support/fixtures/vcr_cassettes/organization/create.yml
308
311
  - spec/support/fixtures/vcr_cassettes/organization/create_invalid.yml
312
+ - spec/support/fixtures/vcr_cassettes/organization/delete.yml
313
+ - spec/support/fixtures/vcr_cassettes/organization/delete_invalid.yml
314
+ - spec/support/fixtures/vcr_cassettes/organization/get.yml
315
+ - spec/support/fixtures/vcr_cassettes/organization/get_invalid.yml
309
316
  - spec/support/fixtures/vcr_cassettes/organization/list.yml
317
+ - spec/support/fixtures/vcr_cassettes/organization/update.yml
318
+ - spec/support/fixtures/vcr_cassettes/organization/update_invalid.yml
310
319
  - spec/support/fixtures/vcr_cassettes/passwordless/create_session.yml
311
320
  - spec/support/fixtures/vcr_cassettes/passwordless/create_session_invalid.yml
312
321
  - spec/support/fixtures/vcr_cassettes/passwordless/send_session.yml
@@ -314,8 +323,6 @@ files:
314
323
  - spec/support/fixtures/vcr_cassettes/portal/generate_link_dsync.yml
315
324
  - spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml
316
325
  - spec/support/fixtures/vcr_cassettes/portal/generate_link_sso.yml
317
- - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_invalid_source.yml
318
- - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_valid_source.yml
319
326
  - spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_invalid_id.yml
320
327
  - spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_valid_id.yml
321
328
  - spec/support/fixtures/vcr_cassettes/sso/get_connection_with_invalid_id.yml
@@ -327,6 +334,7 @@ files:
327
334
  - spec/support/fixtures/vcr_cassettes/sso/list_connections/with_limit.yml
328
335
  - spec/support/fixtures/vcr_cassettes/sso/list_connections/with_no_options.yml
329
336
  - spec/support/fixtures/vcr_cassettes/sso/list_connections/with_organization_id.yml
337
+ - spec/support/fixtures/vcr_cassettes/sso/profile.yml
330
338
  - spec/support/profile.txt
331
339
  - workos.gemspec
332
340
  homepage: https://github.com/workos-inc/workos-ruby
@@ -340,16 +348,16 @@ require_paths:
340
348
  - lib
341
349
  required_ruby_version: !ruby/object:Gem::Requirement
342
350
  requirements:
343
- - - "~>"
351
+ - - ">="
344
352
  - !ruby/object:Gem::Version
345
- version: '3.0'
353
+ version: '2.5'
346
354
  required_rubygems_version: !ruby/object:Gem::Requirement
347
355
  requirements:
348
356
  - - ">="
349
357
  - !ruby/object:Gem::Version
350
358
  version: '0'
351
359
  requirements: []
352
- rubygems_version: 3.2.16
360
+ rubygems_version: 3.2.19
353
361
  signing_key:
354
362
  specification_version: 4
355
363
  summary: API client for WorkOS
@@ -357,6 +365,7 @@ test_files:
357
365
  - spec/lib/workos/audit_trail_spec.rb
358
366
  - spec/lib/workos/base_spec.rb
359
367
  - spec/lib/workos/directory_sync_spec.rb
368
+ - spec/lib/workos/organizations_spec.rb
360
369
  - spec/lib/workos/passwordless_spec.rb
361
370
  - spec/lib/workos/portal_spec.rb
362
371
  - spec/lib/workos/sso_spec.rb
@@ -393,7 +402,13 @@ test_files:
393
402
  - spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_no_options.yml
394
403
  - spec/support/fixtures/vcr_cassettes/organization/create.yml
395
404
  - spec/support/fixtures/vcr_cassettes/organization/create_invalid.yml
405
+ - spec/support/fixtures/vcr_cassettes/organization/delete.yml
406
+ - spec/support/fixtures/vcr_cassettes/organization/delete_invalid.yml
407
+ - spec/support/fixtures/vcr_cassettes/organization/get.yml
408
+ - spec/support/fixtures/vcr_cassettes/organization/get_invalid.yml
396
409
  - spec/support/fixtures/vcr_cassettes/organization/list.yml
410
+ - spec/support/fixtures/vcr_cassettes/organization/update.yml
411
+ - spec/support/fixtures/vcr_cassettes/organization/update_invalid.yml
397
412
  - spec/support/fixtures/vcr_cassettes/passwordless/create_session.yml
398
413
  - spec/support/fixtures/vcr_cassettes/passwordless/create_session_invalid.yml
399
414
  - spec/support/fixtures/vcr_cassettes/passwordless/send_session.yml
@@ -401,8 +416,6 @@ test_files:
401
416
  - spec/support/fixtures/vcr_cassettes/portal/generate_link_dsync.yml
402
417
  - spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml
403
418
  - spec/support/fixtures/vcr_cassettes/portal/generate_link_sso.yml
404
- - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_invalid_source.yml
405
- - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_valid_source.yml
406
419
  - spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_invalid_id.yml
407
420
  - spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_valid_id.yml
408
421
  - spec/support/fixtures/vcr_cassettes/sso/get_connection_with_invalid_id.yml
@@ -414,4 +427,5 @@ test_files:
414
427
  - spec/support/fixtures/vcr_cassettes/sso/list_connections/with_limit.yml
415
428
  - spec/support/fixtures/vcr_cassettes/sso/list_connections/with_no_options.yml
416
429
  - spec/support/fixtures/vcr_cassettes/sso/list_connections/with_organization_id.yml
430
+ - spec/support/fixtures/vcr_cassettes/sso/profile.yml
417
431
  - spec/support/profile.txt