workos 0.8.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +5 -0
  3. data/.rubocop.yml +4 -0
  4. data/Gemfile.lock +2 -4
  5. data/README.md +119 -55
  6. data/docs/WorkOS/SSO.html +235 -235
  7. data/docs/file.README.html +20 -20
  8. data/lib/workos.rb +1 -0
  9. data/lib/workos/audit_trail.rb +1 -0
  10. data/lib/workos/client.rb +22 -1
  11. data/lib/workos/connection.rb +0 -2
  12. data/lib/workos/organization.rb +0 -2
  13. data/lib/workos/passwordless.rb +3 -2
  14. data/lib/workos/portal.rb +0 -6
  15. data/lib/workos/profile.rb +6 -4
  16. data/lib/workos/sso.rb +119 -13
  17. data/lib/workos/types.rb +8 -3
  18. data/lib/workos/types/profile_struct.rb +1 -0
  19. data/lib/workos/version.rb +1 -1
  20. data/spec/lib/workos/passwordless_spec.rb +1 -0
  21. data/spec/lib/workos/sso_spec.rb +199 -7
  22. data/spec/support/fixtures/vcr_cassettes/audit_trail/get_events.yml +2 -2
  23. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories.yml +1 -1
  24. data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories_with_domain_param.yml +1 -1
  25. data/spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_invalid_id.yml +72 -0
  26. data/spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_valid_id.yml +70 -0
  27. data/spec/support/fixtures/vcr_cassettes/sso/get_connection_with_invalid_id.yml +72 -0
  28. data/spec/support/fixtures/vcr_cassettes/sso/get_connection_with_valid_id.yml +74 -0
  29. data/spec/support/fixtures/vcr_cassettes/sso/list_connections.yml +72 -0
  30. data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_after_param.yml +72 -0
  31. data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_before_param.yml +73 -0
  32. data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_connection_type_param.yml +72 -0
  33. data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_domain_param.yml +72 -0
  34. data/spec/support/fixtures/vcr_cassettes/sso/list_connections_with_limit_param.yml +72 -0
  35. data/spec/support/profile.txt +1 -1
  36. data/workos.gemspec +0 -1
  37. metadata +24 -18
  38. 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
@@ -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"}
data/workos.gemspec CHANGED
@@ -22,7 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.add_dependency 'require_all', '~> 3.0.0'
26
25
  spec.add_dependency 'sorbet-runtime', '~> 0.5'
27
26
 
28
27
  spec.add_development_dependency 'bundler', '>= 2.0.1'
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - WorkOS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-28 00:00:00.000000000 Z
11
+ date: 2021-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: require_all
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 3.0.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 3.0.0
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: sorbet-runtime
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -175,6 +161,7 @@ executables:
175
161
  extensions: []
176
162
  extra_rdoc_files: []
177
163
  files:
164
+ - ".github/CODEOWNERS"
178
165
  - ".github/renovate.json"
179
166
  - ".gitignore"
180
167
  - ".rspec"
@@ -182,7 +169,6 @@ files:
182
169
  - ".ruby-version"
183
170
  - ".semaphore/rubygems.yml"
184
171
  - ".semaphore/semaphore.yml"
185
- - CODEOWNERS
186
172
  - Gemfile
187
173
  - Gemfile.lock
188
174
  - LICENSE
@@ -285,6 +271,16 @@ files:
285
271
  - spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml
286
272
  - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_invalid_source.yml
287
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
288
284
  - spec/support/profile.txt
289
285
  - workos.gemspec
290
286
  homepage: https://github.com/workos-inc/workos-ruby
@@ -307,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
307
303
  - !ruby/object:Gem::Version
308
304
  version: '0'
309
305
  requirements: []
310
- rubygems_version: 3.1.4
306
+ rubygems_version: 3.2.8
311
307
  signing_key:
312
308
  specification_version: 4
313
309
  summary: API client for WorkOS
@@ -347,4 +343,14 @@ test_files:
347
343
  - spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml
348
344
  - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_invalid_source.yml
349
345
  - spec/support/fixtures/vcr_cassettes/sso/create_connection_with_valid_source.yml
346
+ - spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_invalid_id.yml
347
+ - spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_valid_id.yml
348
+ - spec/support/fixtures/vcr_cassettes/sso/get_connection_with_invalid_id.yml
349
+ - spec/support/fixtures/vcr_cassettes/sso/get_connection_with_valid_id.yml
350
+ - spec/support/fixtures/vcr_cassettes/sso/list_connections.yml
351
+ - spec/support/fixtures/vcr_cassettes/sso/list_connections_with_after_param.yml
352
+ - spec/support/fixtures/vcr_cassettes/sso/list_connections_with_before_param.yml
353
+ - spec/support/fixtures/vcr_cassettes/sso/list_connections_with_connection_type_param.yml
354
+ - spec/support/fixtures/vcr_cassettes/sso/list_connections_with_domain_param.yml
355
+ - spec/support/fixtures/vcr_cassettes/sso/list_connections_with_limit_param.yml
350
356
  - spec/support/profile.txt
data/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- @marktran