workos 1.2.1 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/workos/client.rb +3 -6
- data/lib/workos/connection.rb +9 -1
- data/lib/workos/directory.rb +12 -1
- data/lib/workos/directory_user.rb +9 -1
- data/lib/workos/errors.rb +13 -2
- data/lib/workos/organization.rb +7 -1
- data/lib/workos/sso.rb +6 -0
- data/lib/workos/types/connection_struct.rb +2 -0
- data/lib/workos/types/directory_struct.rb +3 -0
- data/lib/workos/types/directory_user_struct.rb +2 -0
- data/lib/workos/types/organization_struct.rb +2 -0
- data/lib/workos/types/provider_enum.rb +1 -0
- data/lib/workos/version.rb +1 -1
- data/spec/lib/workos/audit_trail_spec.rb +2 -0
- data/spec/lib/workos/directory_sync_spec.rb +21 -19
- data/spec/lib/workos/organizations_spec.rb +13 -11
- data/spec/lib/workos/passwordless_spec.rb +2 -0
- data/spec/lib/workos/portal_spec.rb +2 -0
- data/spec/lib/workos/sso_spec.rb +21 -19
- data/spec/spec_helper.rb +3 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_user.yml +40 -16
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_after.yml +12 -9
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_before.yml +8 -5
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_domain.yml +8 -8
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_limit.yml +9 -9
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_no_options.yml +23 -10
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_search.yml +8 -8
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_after.yml +128 -28
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_before.yml +31 -18
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_directory.yml +136 -35
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_group.yml +128 -18
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_limit.yml +131 -17
- data/spec/support/fixtures/vcr_cassettes/organization/create.yml +28 -16
- data/spec/support/fixtures/vcr_cassettes/organization/get.yml +27 -16
- data/spec/support/fixtures/vcr_cassettes/organization/list.yml +29 -14
- data/spec/support/fixtures/vcr_cassettes/organization/update.yml +27 -16
- data/spec/support/fixtures/vcr_cassettes/sso/get_connection_with_valid_id.yml +28 -16
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_after.yml +25 -15
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_before.yml +28 -15
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_connection_type.yml +31 -14
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_domain.yml +27 -13
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_limit.yml +24 -15
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_no_options.yml +30 -14
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_organization_id.yml +28 -14
- data/spec/support/shared_examples/client_spec.rb +16 -0
- metadata +5 -3
@@ -14,7 +14,7 @@ http_interactions:
|
|
14
14
|
Accept:
|
15
15
|
- "*/*"
|
16
16
|
User-Agent:
|
17
|
-
- WorkOS; ruby/
|
17
|
+
- WorkOS; ruby/3.0.1; x86_64-darwin19; v1.4.0
|
18
18
|
Authorization:
|
19
19
|
- Bearer <API_KEY>
|
20
20
|
response:
|
@@ -22,8 +22,12 @@ http_interactions:
|
|
22
22
|
code: 200
|
23
23
|
message: OK
|
24
24
|
headers:
|
25
|
-
|
26
|
-
-
|
25
|
+
Date:
|
26
|
+
- Mon, 09 Aug 2021 22:01:15 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
27
31
|
Connection:
|
28
32
|
- keep-alive
|
29
33
|
Vary:
|
@@ -53,22 +57,27 @@ http_interactions:
|
|
53
57
|
X-Xss-Protection:
|
54
58
|
- '0'
|
55
59
|
X-Request-Id:
|
56
|
-
-
|
57
|
-
Content-Type:
|
58
|
-
- application/json; charset=utf-8
|
60
|
+
- d4eb0623-1466-4e99-a500-119612d6bc9b
|
59
61
|
Etag:
|
60
|
-
- W/"
|
61
|
-
Date:
|
62
|
-
- Thu, 22 Apr 2021 22:27:19 GMT
|
63
|
-
Transfer-Encoding:
|
64
|
-
- chunked
|
62
|
+
- W/"59a-ZIKgWSqL79Vk1PhmBPwwz8b4bhU"
|
65
63
|
Via:
|
66
64
|
- 1.1 vegur
|
65
|
+
Cf-Cache-Status:
|
66
|
+
- DYNAMIC
|
67
|
+
Report-To:
|
68
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=qHLXTh7d4n3QFt805M6FLecdsq2AJM19ZHRepY4aqLg0e0zMYCudz5G%2BnGfWrzEGzYsUocUIx%2FVfp2D6Rsmy1ZR6mSeySF59z%2FGLEuruXgkqf3VOxMz1BBXe9iE%2B4kUeeFrG0Hzw9NuXkPSmhQ%3D%3D"}],"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
|
+
- 67c44310a9ba2f79-DFW
|
75
|
+
Alt-Svc:
|
76
|
+
- h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443";
|
77
|
+
ma=86400
|
67
78
|
body:
|
68
79
|
encoding: ASCII-8BIT
|
69
|
-
string: '{"data":[{"object":"connection","id":"
|
70
|
-
inc.","connection_type":"OktaSAML","oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":"http://www.okta.com/exk2ya1gdoSn8dazk4x7","saml_idp_url":"https://foo-corp.okta.com/app/foo-corp_sheldonnextauthtest_1/exk2ya1gdoSn8dazk4x7/sso/saml","saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":null,"organization_id":"org_01F3NBC88WCEAZP6E3W893B93T","oauth_uid":null,"oauth_secret":null,"oauth_redirect_uri":null,"domains":[{"object":"connection_domain","id":"org_domain_01F3NBCWFZMPXKRJJFMN02VJ84","domain":"sheldonnextauthtest.com"}]},{"object":"connection","id":"conn_01F3NBB5TKYECYV5H00ANNW5AC","status":"unlinked","state":"draft","name":"sheldonadamtest,
|
71
|
-
inc. ","connection_type":"OktaSAML","oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":null,"saml_idp_url":null,"saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":null,"organization_id":"org_01EY9HHDZ1RT40CBSM7K0Q1M0V","oauth_uid":null,"oauth_secret":null,"oauth_redirect_uri":null,"domains":[{"object":"connection_domain","id":"org_domain_01F3NBB5T9JAPTJ1XGRF881XNN","domain":"newnextauthtest.com"},{"object":"connection_domain","id":"org_domain_01F3DR5P0SJN20AV40DZ3NV3WP","domain":"ExampleWorkdayCompany.com"},{"object":"connection_domain","id":"org_domain_01F2VPCGR2VZN0MXF4FXZFZMHC","domain":"ExampleOrgDomain.com"},{"object":"connection_domain","id":"org_domain_01F2S21BE6C56TFDFRT7PY38A9","domain":"ExampleGoogleSAMLOrg.com"},{"object":"connection_domain","id":"org_domain_01F2PM4M99C8GAN0GXTZ5YARG0","domain":"ExampleOrgSAML.com"},{"object":"connection_domain","id":"org_domain_01F2KZ631V96GBGZVKZMK5DWK1","domain":"ExampleOrg123.com"},{"object":"connection_domain","id":"org_domain_01F1ZDS7DCNF38XY89QZH1Y7C2","domain":"Example-company.com"},{"object":"connection_domain","id":"org_domain_01EY9HJ21Y94RVGFH11WRN1A0F","domain":"domain.example.com"},{"object":"connection_domain","id":"org_domain_01EYRS6YSBGKECQV15CA3H54HQ","domain":"azuretest.com"}]}],"listMetadata":{"before":"conn_01F3NBB5TKYECYV5H00ANNW5AC","after":null}}'
|
80
|
+
string: '{"data":[{"object":"connection","id":"conn_01FBQN064TFAT9A3KYPPP85VXK","organization_id":"org_01F79Z8TGGTA8Q67Q50FDXAYN3","connection_type":"MagicLink","name":"MagicLink","state":"active","created_at":"2021-07-28T22:50:41.632Z","updated_at":"2021-07-28T22:50:41.632Z","status":"linked","domains":[{"object":"connection_domain","id":"org_domain_01F79Z8TGS4VYFX0246RAWSZMP","domain":"gmail.com"}],"oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":null,"saml_idp_url":null,"saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":null,"oauth_uid":null,"oauth_secret":null,"oauth_redirect_uri":null},{"object":"connection","id":"conn_01FAK8CHVMK2QVT20ZG7ZQ1JVX","organization_id":"org_01F8873JSZWN1MJCDN537FEK1H","connection_type":"ShibbolethSAML","name":"Shibboleth","state":"inactive","created_at":"2021-07-14T19:37:35.856Z","updated_at":"2021-07-14T19:37:35.856Z","status":"unlinked","domains":[],"oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":"https://auth.workos.email/XLvFXZ1tssoaiUkU60IcagSQQ","saml_idp_url":null,"saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":null,"oauth_uid":null,"oauth_secret":null,"oauth_redirect_uri":null}],"listMetadata":{"before":"conn_01FAK8CHVMK2QVT20ZG7ZQ1JVX","after":null}}'
|
72
81
|
http_version:
|
73
|
-
recorded_at:
|
82
|
+
recorded_at: Mon, 09 Aug 2021 22:01:15 GMT
|
74
83
|
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/3.0.1; x86_64-darwin19; v1.4.0
|
18
18
|
Authorization:
|
19
19
|
- Bearer <API_KEY>
|
20
20
|
response:
|
@@ -22,8 +22,12 @@ http_interactions:
|
|
22
22
|
code: 200
|
23
23
|
message: OK
|
24
24
|
headers:
|
25
|
-
|
26
|
-
-
|
25
|
+
Date:
|
26
|
+
- Mon, 09 Aug 2021 22:01:13 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
27
31
|
Connection:
|
28
32
|
- keep-alive
|
29
33
|
Vary:
|
@@ -53,21 +57,33 @@ http_interactions:
|
|
53
57
|
X-Xss-Protection:
|
54
58
|
- '0'
|
55
59
|
X-Request-Id:
|
56
|
-
-
|
57
|
-
Content-Type:
|
58
|
-
- application/json; charset=utf-8
|
60
|
+
- fdf4c9b7-8f95-4369-8a99-9b11639967b3
|
59
61
|
Etag:
|
60
|
-
- W/"
|
61
|
-
Date:
|
62
|
-
- Thu, 22 Apr 2021 22:27:16 GMT
|
63
|
-
Transfer-Encoding:
|
64
|
-
- chunked
|
62
|
+
- W/"183d-yb1W7y6dzIHej2T2YBC3d5jdQ8k"
|
65
63
|
Via:
|
66
64
|
- 1.1 vegur
|
65
|
+
Cf-Cache-Status:
|
66
|
+
- DYNAMIC
|
67
|
+
Report-To:
|
68
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=9yHZIP2Ra%2FPNVnT63DAi%2FFOoC9AFPN3fWmhHpdAK9e%2FgpbAIgzbtWpbC%2BRcGyEtldiseJd1pubYlfopmHWmOQairCjGsmPRbz6rimyHZc3eyp%2FKZmjd%2FjBnaSSChh1lpLUhwI8rZJdxeA2V68A%3D%3D"}],"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
|
+
- 67c44301bde50bf7-DFW
|
75
|
+
Alt-Svc:
|
76
|
+
- h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443";
|
77
|
+
ma=86400
|
67
78
|
body:
|
68
79
|
encoding: ASCII-8BIT
|
69
|
-
string: '{"data":[{"object":"connection","id":"
|
70
|
-
|
80
|
+
string: '{"data":[{"object":"connection","id":"conn_01FBQN064TFAT9A3KYPPP85VXK","organization_id":"org_01F79Z8TGGTA8Q67Q50FDXAYN3","connection_type":"MagicLink","name":"MagicLink","state":"active","created_at":"2021-07-28T22:50:41.632Z","updated_at":"2021-07-28T22:50:41.632Z","status":"linked","domains":[{"object":"connection_domain","id":"org_domain_01F79Z8TGS4VYFX0246RAWSZMP","domain":"gmail.com"}],"oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":null,"saml_idp_url":null,"saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":null,"oauth_uid":null,"oauth_secret":null,"oauth_redirect_uri":null},{"object":"connection","id":"conn_01FAK8CHVMK2QVT20ZG7ZQ1JVX","organization_id":"org_01F8873JSZWN1MJCDN537FEK1H","connection_type":"ShibbolethSAML","name":"Shibboleth","state":"inactive","created_at":"2021-07-14T19:37:35.856Z","updated_at":"2021-07-14T19:37:35.856Z","status":"unlinked","domains":[],"oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":"https://auth.workos.email/XLvFXZ1tssoaiUkU60IcagSQQ","saml_idp_url":null,"saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":null,"oauth_uid":null,"oauth_secret":null,"oauth_redirect_uri":null},{"object":"connection","id":"conn_01FA3WGCWPCCY1V2FGES2FDNP7","organization_id":"org_01F9293WD2PDEEV4Y625XPZVG7","connection_type":"OktaSAML","name":"Foo
|
81
|
+
Corp","state":"active","created_at":"2021-07-08T20:21:22.437Z","updated_at":"2021-07-08T20:24:38.887Z","status":"linked","domains":[{"object":"connection_domain","id":"org_domain_01F9293WD8KZAS4ESBK57SZ4D8","domain":"foo-corp.com"}],"oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":"http://www.okta.com/exk2d7kaj52WBRvhU4x7","saml_idp_url":"https://foo-corp.okta.com/app/foo-corp_blairdemoandteststagingworkostestapp_1/exk2d7kaj52WBRvhU4x7/sso/saml","saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":["-----BEGIN
|
82
|
+
CERTIFICATE-----\nMIIDoDCCAoigAwIBAgIGAXAljl6nMA0GCSqGSIb3DQEBCwUAMIGQMQswCQYDVQQGEwJVUzETMBEG\r\nA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\r\nMBIGA1UECwwLU1NPUHJvdmlkZXIxETAPBgNVBAMMCGZvby1jb3JwMRwwGgYJKoZIhvcNAQkBFg1p\r\nbmZvQG9rdGEuY29tMB4XDTIwMDIwODE2MDYzMloXDTMwMDIwODE2MDczMlowgZAxCzAJBgNVBAYT\r\nAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMQ0wCwYDVQQK\r\nDARPa3RhMRQwEgYDVQQLDAtTU09Qcm92aWRlcjERMA8GA1UEAwwIZm9vLWNvcnAxHDAaBgkqhkiG\r\n9w0BCQEWDWluZm9Ab2t0YS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDm1D64\r\nRglMbkUbbSFWCDnlQQ4Ocj++/DJQUsdi1imh2H3mUWj+BhYo3FPqLxnEklo1UnJk4ZgUK6DotefP\r\nl5eH0/tX2m0xYs94Uu+aHEiz8c2QjVNJrLHpoXLYdBaeh/cdDJiLic0XVCHpW9HeghtMW44IFK/3\r\n9uNhF/n2BTz0jCP7bmmds3ATNguaAelri3YPXDZ3Kl4WTzxm5M73ygfkeeNIVYC5Mh2Z454L8iTu\r\ndauu3BfAuVDXXmOshGd2Nwo9bR5SqxYpCbXwztXU25mO0hCuSVdEke7qelz3nPd3B9urc6vbOv2B\r\n2yEfvlqUQhG6LUV+NwfKADDJ4crGcjAnAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAKKtksfJZ9cd\r\nKO1hMvlX+CWdHdxllYFc9aReMfOhHEnMK2mhN3KMs8T3rcNqX8Z98L31hJ/6EYzMYP+/ayEXJ5if\r\nKRIpR07FC2Cy4oYQUNED5aP008dSB9dCVW5SeZbHMgS1S3qVlh1f7i8NENBgAWnFVpGvtGFM6AfY\r\nsPxIY8qhkzTdhz7glv231ftytXqXKJIxRd7fhoJmnt+f2g62NhAEsx9wGFfDH8IoX+3hi47iuOzo\r\nT/Bz8dz5fpjjq8ic2F0uowfVQaI3c4zCpSVtmVyGA0hkIsjrpjP1z3fE/Kv8d4XVlTLS8saWlvFL\r\nMSLmMqACEOKSuGjX2YFh8cnm+3I=\r\n-----END
|
83
|
+
CERTIFICATE-----\n"],"oauth_uid":null,"oauth_secret":null,"oauth_redirect_uri":null},{"object":"connection","id":"conn_01F79Z8TJP48W73H0F879S7TAP","organization_id":"org_01F79Z8TGGTA8Q67Q50FDXAYN3","connection_type":"GoogleOAuth","name":"Google
|
84
|
+
OAuth","state":"active","created_at":"2021-06-03T22:18:01.115Z","updated_at":"2021-06-03T22:18:01.115Z","status":"linked","domains":[{"object":"connection_domain","id":"org_domain_01F79Z8TGS4VYFX0246RAWSZMP","domain":"gmail.com"}],"oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":null,"saml_idp_url":null,"saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":null,"oauth_uid":"950693390536-3t7scpogivcoap4bomkshfgbajpq8ifb.apps.googleusercontent.com","oauth_secret":"1fu91TBNiOLUIVxP1_zIkw53","oauth_redirect_uri":"https://auth.workos.com/sso/oauth/google/aOrKxybKyAsKIcgwYGG0WyIaq/callback"},{"object":"connection","id":"conn_01F6Q6TKSG0YPYM41D51Z2VXKQ","organization_id":"org_01F6Q6TFP7RD2PF6J03ANNWDKV","connection_type":"GoogleOAuth","name":"Google
|
85
|
+
OAuth","state":"active","created_at":"2021-05-27T15:24:29.812Z","updated_at":"2021-05-27T15:24:29.812Z","status":"linked","domains":[{"object":"connection_domain","id":"org_domain_01FCPEG7BAYMQ4CHMG41Y2VNHF","domain":"example.me"}],"oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":null,"saml_idp_url":null,"saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":null,"oauth_uid":"950693390536-3t7scpogivcoap4bomkshfgbajpq8ifb.apps.googleusercontent.com","oauth_secret":"1fu91TBNiOLUIVxP1_zIkw53","oauth_redirect_uri":"https://auth.workos.com/sso/oauth/google/aOrKxybKyAsKIcgwYGG0WyIaq/callback"},{"object":"connection","id":"conn_01F6Q6NPK0G2198KKK4G9E03A6","organization_id":"org_01F6Q6NGZS8R5ZTH3C1XR96JK7","connection_type":"GoogleOAuth","name":"Google
|
86
|
+
OAuth","state":"active","created_at":"2021-05-27T15:21:48.837Z","updated_at":"2021-05-27T15:21:48.837Z","status":"linked","domains":[{"object":"connection_domain","id":"org_domain_01F6Q6NGZZ54WSX1XCMCKSC4DA","domain":"workos.com"}],"oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":null,"saml_idp_url":null,"saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":null,"oauth_uid":"950693390536-3t7scpogivcoap4bomkshfgbajpq8ifb.apps.googleusercontent.com","oauth_secret":"1fu91TBNiOLUIVxP1_zIkw53","oauth_redirect_uri":"https://auth.workos.com/sso/oauth/google/aOrKxybKyAsKIcgwYGG0WyIaq/callback"}],"listMetadata":{"before":"before_id","after":null}}'
|
71
87
|
http_version:
|
72
|
-
recorded_at:
|
88
|
+
recorded_at: Mon, 09 Aug 2021 22:01:14 GMT
|
73
89
|
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/connections?organization_id=
|
5
|
+
uri: https://api.workos.com/connections?organization_id=org_01F9293WD2PDEEV4Y625XPZVG7
|
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/
|
17
|
+
- WorkOS; ruby/3.0.1; x86_64-darwin19; v1.4.0
|
18
18
|
Authorization:
|
19
19
|
- Bearer <API_KEY>
|
20
20
|
response:
|
@@ -22,8 +22,12 @@ http_interactions:
|
|
22
22
|
code: 200
|
23
23
|
message: OK
|
24
24
|
headers:
|
25
|
-
|
26
|
-
-
|
25
|
+
Date:
|
26
|
+
- Mon, 09 Aug 2021 22:01:15 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
27
31
|
Connection:
|
28
32
|
- keep-alive
|
29
33
|
Vary:
|
@@ -53,20 +57,30 @@ http_interactions:
|
|
53
57
|
X-Xss-Protection:
|
54
58
|
- '0'
|
55
59
|
X-Request-Id:
|
56
|
-
-
|
57
|
-
Content-Type:
|
58
|
-
- application/json; charset=utf-8
|
60
|
+
- 838c7c5c-4e59-4985-bbfc-a9dc991251a2
|
59
61
|
Etag:
|
60
|
-
- W/"
|
61
|
-
Date:
|
62
|
-
- Thu, 22 Apr 2021 22:27:18 GMT
|
63
|
-
Transfer-Encoding:
|
64
|
-
- chunked
|
62
|
+
- W/"8d4-KLH/pb5+0Lb31ZpVOsvjdPi7hcY"
|
65
63
|
Via:
|
66
64
|
- 1.1 vegur
|
65
|
+
Cf-Cache-Status:
|
66
|
+
- DYNAMIC
|
67
|
+
Report-To:
|
68
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=5AOf5zrSQvY37vWuZbR73i3BCZAOyMn15ntBUVxQIgGNHftGH9tQH1HyvVd0IgcmwVrb4wEhDNkSLkPGiue%2FoVc%2FAuXD9en2pk4wnUCDpxR%2B9MWAVnpxz8I74Jl6kK0cEh55FsFnlc7k%2BMsFZw%3D%3D"}],"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
|
+
- 67c4430d7d2d286f-DFW
|
75
|
+
Alt-Svc:
|
76
|
+
- h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443";
|
77
|
+
ma=86400
|
67
78
|
body:
|
68
79
|
encoding: ASCII-8BIT
|
69
|
-
string: '{"data":[{"object":"connection","id":"
|
80
|
+
string: '{"data":[{"object":"connection","id":"conn_01FA3WGCWPCCY1V2FGES2FDNP7","organization_id":"org_01F9293WD2PDEEV4Y625XPZVG7","connection_type":"OktaSAML","name":"Foo
|
81
|
+
Corp","state":"active","created_at":"2021-07-08T20:21:22.437Z","updated_at":"2021-07-08T20:24:38.887Z","status":"linked","domains":[{"object":"connection_domain","id":"org_domain_01F9293WD8KZAS4ESBK57SZ4D8","domain":"foo-corp.com"}],"oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":"http://www.okta.com/exk2d7kaj52WBRvhU4x7","saml_idp_url":"https://foo-corp.okta.com/app/foo-corp_blairdemoandteststagingworkostestapp_1/exk2d7kaj52WBRvhU4x7/sso/saml","saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":["-----BEGIN
|
82
|
+
CERTIFICATE-----\nMIIDoDCCAoigAwIBAgIGAXAljl6nMA0GCSqGSIb3DQEBCwUAMIGQMQswCQYDVQQGEwJVUzETMBEG\r\nA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\r\nMBIGA1UECwwLU1NPUHJvdmlkZXIxETAPBgNVBAMMCGZvby1jb3JwMRwwGgYJKoZIhvcNAQkBFg1p\r\nbmZvQG9rdGEuY29tMB4XDTIwMDIwODE2MDYzMloXDTMwMDIwODE2MDczMlowgZAxCzAJBgNVBAYT\r\nAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMQ0wCwYDVQQK\r\nDARPa3RhMRQwEgYDVQQLDAtTU09Qcm92aWRlcjERMA8GA1UEAwwIZm9vLWNvcnAxHDAaBgkqhkiG\r\n9w0BCQEWDWluZm9Ab2t0YS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDm1D64\r\nRglMbkUbbSFWCDnlQQ4Ocj++/DJQUsdi1imh2H3mUWj+BhYo3FPqLxnEklo1UnJk4ZgUK6DotefP\r\nl5eH0/tX2m0xYs94Uu+aHEiz8c2QjVNJrLHpoXLYdBaeh/cdDJiLic0XVCHpW9HeghtMW44IFK/3\r\n9uNhF/n2BTz0jCP7bmmds3ATNguaAelri3YPXDZ3Kl4WTzxm5M73ygfkeeNIVYC5Mh2Z454L8iTu\r\ndauu3BfAuVDXXmOshGd2Nwo9bR5SqxYpCbXwztXU25mO0hCuSVdEke7qelz3nPd3B9urc6vbOv2B\r\n2yEfvlqUQhG6LUV+NwfKADDJ4crGcjAnAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAKKtksfJZ9cd\r\nKO1hMvlX+CWdHdxllYFc9aReMfOhHEnMK2mhN3KMs8T3rcNqX8Z98L31hJ/6EYzMYP+/ayEXJ5if\r\nKRIpR07FC2Cy4oYQUNED5aP008dSB9dCVW5SeZbHMgS1S3qVlh1f7i8NENBgAWnFVpGvtGFM6AfY\r\nsPxIY8qhkzTdhz7glv231ftytXqXKJIxRd7fhoJmnt+f2g62NhAEsx9wGFfDH8IoX+3hi47iuOzo\r\nT/Bz8dz5fpjjq8ic2F0uowfVQaI3c4zCpSVtmVyGA0hkIsjrpjP1z3fE/Kv8d4XVlTLS8saWlvFL\r\nMSLmMqACEOKSuGjX2YFh8cnm+3I=\r\n-----END
|
83
|
+
CERTIFICATE-----\n"],"oauth_uid":null,"oauth_secret":null,"oauth_redirect_uri":null}],"listMetadata":{"before":null,"after":null}}'
|
70
84
|
http_version:
|
71
|
-
recorded_at:
|
85
|
+
recorded_at: Mon, 09 Aug 2021 22:01:15 GMT
|
72
86
|
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# typed: false
|
3
|
+
|
4
|
+
RSpec.shared_examples 'client' do
|
5
|
+
subject(:client) { described_class.client }
|
6
|
+
|
7
|
+
it { is_expected.to be_kind_of(Net::HTTP) }
|
8
|
+
|
9
|
+
it 'assigns use_ssl' do
|
10
|
+
expect(client.use_ssl?).to be true
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'returns new instance' do
|
14
|
+
expect(described_class.client.object_id).to_not eq described_class.client.object_id
|
15
|
+
end
|
16
|
+
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: 1.
|
4
|
+
version: 1.5.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-
|
11
|
+
date: 2021-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-runtime
|
@@ -336,6 +336,7 @@ files:
|
|
336
336
|
- spec/support/fixtures/vcr_cassettes/sso/list_connections/with_organization_id.yml
|
337
337
|
- spec/support/fixtures/vcr_cassettes/sso/profile.yml
|
338
338
|
- spec/support/profile.txt
|
339
|
+
- spec/support/shared_examples/client_spec.rb
|
339
340
|
- workos.gemspec
|
340
341
|
homepage: https://github.com/workos-inc/workos-ruby
|
341
342
|
licenses:
|
@@ -357,7 +358,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
357
358
|
- !ruby/object:Gem::Version
|
358
359
|
version: '0'
|
359
360
|
requirements: []
|
360
|
-
rubygems_version: 3.2.
|
361
|
+
rubygems_version: 3.2.26
|
361
362
|
signing_key:
|
362
363
|
specification_version: 4
|
363
364
|
summary: API client for WorkOS
|
@@ -429,3 +430,4 @@ test_files:
|
|
429
430
|
- spec/support/fixtures/vcr_cassettes/sso/list_connections/with_organization_id.yml
|
430
431
|
- spec/support/fixtures/vcr_cassettes/sso/profile.yml
|
431
432
|
- spec/support/profile.txt
|
433
|
+
- spec/support/shared_examples/client_spec.rb
|