workos 0.8.1 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +5 -0
- data/.rubocop.yml +4 -0
- data/Gemfile.lock +2 -2
- data/README.md +119 -55
- data/docs/WorkOS/SSO.html +235 -235
- data/docs/file.README.html +20 -20
- data/lib/workos.rb +1 -0
- data/lib/workos/audit_trail.rb +1 -0
- data/lib/workos/client.rb +22 -1
- data/lib/workos/connection.rb +0 -2
- data/lib/workos/organization.rb +0 -2
- data/lib/workos/passwordless.rb +3 -2
- data/lib/workos/portal.rb +0 -6
- data/lib/workos/profile.rb +6 -4
- data/lib/workos/sso.rb +121 -13
- data/lib/workos/types/profile_struct.rb +1 -0
- data/lib/workos/version.rb +1 -1
- data/spec/lib/workos/passwordless_spec.rb +1 -0
- data/spec/lib/workos/sso_spec.rb +213 -7
- data/spec/support/fixtures/vcr_cassettes/audit_trail/get_events.yml +2 -2
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories_with_domain_param.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_invalid_id.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_valid_id.yml +70 -0
- data/spec/support/fixtures/vcr_cassettes/sso/get_connection_with_invalid_id.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/get_connection_with_valid_id.yml +74 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_after_param.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_before_param.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_connection_type_param.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_domain_param.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_limit_param.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_organization_id_param.yml +72 -0
- data/spec/support/profile.txt +1 -1
- metadata +26 -4
- data/CODEOWNERS +0 -1
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.workos.com/connections?limit=1
|
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.0
|
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
|
+
- 0faa24f3-189c-422b-a8d4-041ae25d58cf
|
57
|
+
Content-Type:
|
58
|
+
- application/json; charset=utf-8
|
59
|
+
Content-Length:
|
60
|
+
- '775'
|
61
|
+
Etag:
|
62
|
+
- W/"307-f+XEBZyB7oLVWHDcligPou2CEgg"
|
63
|
+
Date:
|
64
|
+
- Wed, 27 Jan 2021 22:56:32 GMT
|
65
|
+
Via:
|
66
|
+
- 1.1 vegur
|
67
|
+
body:
|
68
|
+
encoding: UTF-8
|
69
|
+
string: '{"data":[{"object":"connection","id":"conn_01EWDSQJNXM1M33MTVSQ2ZR5M5","status":"unlinked","state":"draft","name":"IBM","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_01EWDSPEYNG87X1KMBNA7315F7","oauth_uid":null,"oauth_secret":null,"oauth_redirect_uri":null,"domains":[{"object":"connection_domain","id":"domain_01EWDSQJP5HPMD4BQQ031WG55V","domain":"ibm.jp"},{"object":"connection_domain","id":"domain_01EWDSQJP53FXQXEKRSFK1W0N9","domain":"ibm.com"}]}],"listMetadata":{"before":"conn_01EWDSQJNXM1M33MTVSQ2ZR5M5","after":null}}'
|
70
|
+
http_version:
|
71
|
+
recorded_at: Wed, 27 Jan 2021 22:56:32 GMT
|
72
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.workos.com/connections?organization_id=org_01EGS4P7QR31EZ4YWD1Z1XA176
|
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.0
|
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
|
+
- 1a9c4c5a-4702-4f2e-88ee-d681e13276ef
|
57
|
+
Content-Type:
|
58
|
+
- application/json; charset=utf-8
|
59
|
+
Etag:
|
60
|
+
- W/"7f7-Srp6Nv6te4CUMvxv1RKUf5Mte/4"
|
61
|
+
Date:
|
62
|
+
- Wed, 24 Feb 2021 19:48:04 GMT
|
63
|
+
Transfer-Encoding:
|
64
|
+
- chunked
|
65
|
+
Via:
|
66
|
+
- 1.1 vegur
|
67
|
+
body:
|
68
|
+
encoding: ASCII-8BIT
|
69
|
+
string: '{"data":[{"object":"connection","id":"conn_01EGS6E1K7YK1G380ADPHTDC4K","status":"linked","state":"active","name":"foochrop","connection_type":"GoogleSAML","oidc_client_id":null,"oidc_client_secret":null,"oidc_discovery_endpoint":null,"oidc_redirect_uri":null,"saml_entity_id":"https://accounts.google.com/o/saml2?idpid=4444","saml_idp_url":"https://accounts.google.com/o/saml2/idp?idpid=4444","saml_relying_party_private_key":null,"saml_relying_party_public_key":null,"saml_x509_certs":null,"organization_id":"org_01EGS4P7QR31EZ4YWD1Z1XA176","oauth_uid":null,"oauth_secret":null,"oauth_redirect_uri":null,"domains":[{"object":"connection_domain","id":"domain_01EGS6E1KPBD018BHS9Z10VHR9","domain":"foo-corp.com"}]}],"listMetadata":{"before":null,"after":null}}'
|
70
|
+
http_version:
|
71
|
+
recorded_at: Wed, 24 Feb 2021 19:48:04 GMT
|
72
|
+
recorded_with: VCR 5.0.0
|
data/spec/support/profile.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"profile":{"object":"profile","id":"prof_01DRA1XNSJDZ19A31F183ECQW5","email":"demo@workos-okta.com","first_name":"WorkOS","connection_type":"OktaSAML","last_name":"Demo","idp_id":"00u1klkowm8EGah2H357","raw_attributes":{"id":"prof_01DRA1XNSJDZ19A31F183ECQW5","email":"demo@workos-okta.com","first_name":"WorkOS","last_name":"Demo","idp_id":"00u1klkowm8EGah2H357"}},"access_token":"01DVX6QBS3EG6FHY2ESAA5Q65X"}
|
1
|
+
{"profile":{"object":"profile","id":"prof_01DRA1XNSJDZ19A31F183ECQW5","email":"demo@workos-okta.com","first_name":"WorkOS","connection_id":"conn_01EMH8WAK20T42N2NBMNBCYHAG","connection_type":"OktaSAML","last_name":"Demo","idp_id":"00u1klkowm8EGah2H357","raw_attributes":{"id":"prof_01DRA1XNSJDZ19A31F183ECQW5","email":"demo@workos-okta.com","first_name":"WorkOS","last_name":"Demo","idp_id":"00u1klkowm8EGah2H357"}},"access_token":"01DVX6QBS3EG6FHY2ESAA5Q65X"}
|
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.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WorkOS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-runtime
|
@@ -161,6 +161,7 @@ executables:
|
|
161
161
|
extensions: []
|
162
162
|
extra_rdoc_files: []
|
163
163
|
files:
|
164
|
+
- ".github/CODEOWNERS"
|
164
165
|
- ".github/renovate.json"
|
165
166
|
- ".gitignore"
|
166
167
|
- ".rspec"
|
@@ -168,7 +169,6 @@ files:
|
|
168
169
|
- ".ruby-version"
|
169
170
|
- ".semaphore/rubygems.yml"
|
170
171
|
- ".semaphore/semaphore.yml"
|
171
|
-
- CODEOWNERS
|
172
172
|
- Gemfile
|
173
173
|
- Gemfile.lock
|
174
174
|
- LICENSE
|
@@ -271,6 +271,17 @@ files:
|
|
271
271
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml
|
272
272
|
- spec/support/fixtures/vcr_cassettes/sso/create_connection_with_invalid_source.yml
|
273
273
|
- spec/support/fixtures/vcr_cassettes/sso/create_connection_with_valid_source.yml
|
274
|
+
- spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_invalid_id.yml
|
275
|
+
- spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_valid_id.yml
|
276
|
+
- spec/support/fixtures/vcr_cassettes/sso/get_connection_with_invalid_id.yml
|
277
|
+
- spec/support/fixtures/vcr_cassettes/sso/get_connection_with_valid_id.yml
|
278
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections.yml
|
279
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_after_param.yml
|
280
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_before_param.yml
|
281
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_connection_type_param.yml
|
282
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_domain_param.yml
|
283
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_limit_param.yml
|
284
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_organization_id_param.yml
|
274
285
|
- spec/support/profile.txt
|
275
286
|
- workos.gemspec
|
276
287
|
homepage: https://github.com/workos-inc/workos-ruby
|
@@ -293,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
293
304
|
- !ruby/object:Gem::Version
|
294
305
|
version: '0'
|
295
306
|
requirements: []
|
296
|
-
rubygems_version: 3.
|
307
|
+
rubygems_version: 3.2.12
|
297
308
|
signing_key:
|
298
309
|
specification_version: 4
|
299
310
|
summary: API client for WorkOS
|
@@ -333,4 +344,15 @@ test_files:
|
|
333
344
|
- spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml
|
334
345
|
- spec/support/fixtures/vcr_cassettes/sso/create_connection_with_invalid_source.yml
|
335
346
|
- spec/support/fixtures/vcr_cassettes/sso/create_connection_with_valid_source.yml
|
347
|
+
- spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_invalid_id.yml
|
348
|
+
- spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_valid_id.yml
|
349
|
+
- spec/support/fixtures/vcr_cassettes/sso/get_connection_with_invalid_id.yml
|
350
|
+
- spec/support/fixtures/vcr_cassettes/sso/get_connection_with_valid_id.yml
|
351
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections.yml
|
352
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_after_param.yml
|
353
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_before_param.yml
|
354
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_connection_type_param.yml
|
355
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_domain_param.yml
|
356
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_limit_param.yml
|
357
|
+
- spec/support/fixtures/vcr_cassettes/sso/list_connections_with_organization_id_param.yml
|
336
358
|
- spec/support/profile.txt
|
data/CODEOWNERS
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@marktran
|