workos 2.2.0 → 2.3.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/Gemfile.lock +2 -2
- data/lib/workos/audit_trail.rb +1 -0
- data/lib/workos/challenge.rb +2 -1
- data/lib/workos/connection.rb +1 -0
- data/lib/workos/deprecated_hash_wrapper.rb +76 -0
- data/lib/workos/directory.rb +1 -0
- data/lib/workos/directory_group.rb +22 -2
- data/lib/workos/directory_sync.rb +11 -8
- data/lib/workos/directory_user.rb +9 -1
- data/lib/workos/factor.rb +2 -6
- data/lib/workos/hash_provider.rb +19 -0
- data/lib/workos/organization.rb +1 -0
- data/lib/workos/organizations.rb +1 -0
- data/lib/workos/profile.rb +1 -0
- data/lib/workos/profile_and_token.rb +1 -0
- data/lib/workos/sso.rb +1 -0
- data/lib/workos/types/challenge_struct.rb +1 -1
- data/lib/workos/types/directory_group_struct.rb +5 -0
- data/lib/workos/types/factor_struct.rb +0 -1
- data/lib/workos/types/passwordless_session_struct.rb +2 -0
- data/lib/workos/types/verify_factor_struct.rb +1 -3
- data/lib/workos/verify_factor.rb +1 -0
- data/lib/workos/version.rb +1 -1
- data/lib/workos/webhook.rb +1 -0
- data/lib/workos.rb +2 -0
- data/spec/lib/workos/directory_sync_spec.rb +26 -18
- data/spec/lib/workos/directory_user_spec.rb +36 -0
- data/spec/lib/workos/mfa_spec.rb +31 -1
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_group.yml +48 -28
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_after.yml +46 -32
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_before.yml +47 -31
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_directory.yml +46 -34
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_limit.yml +41 -31
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_no_options.yml +36 -26
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_user.yml +38 -28
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_totp_valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_generic_valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_sms_valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_totp_valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/mfa/get_factor_valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_valid_is_false.yml +82 -0
- metadata +9 -3
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.workos.com/auth/factors/verify
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
8
|
+
string: '{"authentication_challenge_id":"auth_challenge_01FZ4YVRBMXP5ZM0A7BP4AJ12J","code":"897792"}'
|
|
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.2; arm64-darwin21; v2.1.1
|
|
18
|
+
Authorization:
|
|
19
|
+
- Bearer <API_KEY>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 201
|
|
23
|
+
message: Created
|
|
24
|
+
headers:
|
|
25
|
+
Date:
|
|
26
|
+
- Sun, 27 Mar 2022 05:53:03 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Content-Length:
|
|
30
|
+
- '317'
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
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
|
+
Vary:
|
|
56
|
+
- Origin, Accept-Encoding
|
|
57
|
+
Access-Control-Allow-Credentials:
|
|
58
|
+
- 'true'
|
|
59
|
+
X-Request-Id:
|
|
60
|
+
- 78db6375-0b0a-4492-a913-5e0802a721b7
|
|
61
|
+
Etag:
|
|
62
|
+
- W/"13d-MlhrtKBkD4LjqRYZFv0nos58XA8"
|
|
63
|
+
Via:
|
|
64
|
+
- 1.1 vegur
|
|
65
|
+
Cf-Cache-Status:
|
|
66
|
+
- DYNAMIC
|
|
67
|
+
Report-To:
|
|
68
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=bN92hPz7GN42QtyRg4YR%2BKMTuzd3R241D6A2ktALsB%2F%2FaFwI%2BeJHUMZ9G0oXrDbp%2Binu76aBI%2FC0ICO2Tr0zc8fi9tF1q4XnqyLfgosTjaDE%2BNDcPlRmaduFoDmkc28D4w%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
|
+
- 6f25dd0d0882dee9-SEA
|
|
75
|
+
Alt-Svc:
|
|
76
|
+
- h3=":443"; ma=86400, h3-29=":443"; ma=86400
|
|
77
|
+
body:
|
|
78
|
+
encoding: UTF-8
|
|
79
|
+
string: '{"challenge":{"object":"authentication_challenge","id":"auth_challenge_01FZ4YVRBMXP5ZM0A7BP4AJ12J","created_at":"2022-03-27T05:51:24.531Z","updated_at":"2022-03-27T05:51:24.531Z","expires_at":"2022-03-27T06:01:24.532Z","code":"897792","authentication_factor_id":"auth_factor_01FZ4YVH2XFQBJXJ4NQVJSSY8Q"},"valid":false}'
|
|
80
|
+
http_version:
|
|
81
|
+
recorded_at: Sun, 27 Mar 2022 05:53:03 GMT
|
|
82
|
+
recorded_with: VCR 5.0.0
|
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: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- WorkOS
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-06-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sorbet-runtime
|
|
@@ -212,12 +212,14 @@ files:
|
|
|
212
212
|
- lib/workos/challenge.rb
|
|
213
213
|
- lib/workos/client.rb
|
|
214
214
|
- lib/workos/connection.rb
|
|
215
|
+
- lib/workos/deprecated_hash_wrapper.rb
|
|
215
216
|
- lib/workos/directory.rb
|
|
216
217
|
- lib/workos/directory_group.rb
|
|
217
218
|
- lib/workos/directory_sync.rb
|
|
218
219
|
- lib/workos/directory_user.rb
|
|
219
220
|
- lib/workos/errors.rb
|
|
220
221
|
- lib/workos/factor.rb
|
|
222
|
+
- lib/workos/hash_provider.rb
|
|
221
223
|
- lib/workos/mfa.rb
|
|
222
224
|
- lib/workos/organization.rb
|
|
223
225
|
- lib/workos/organizations.rb
|
|
@@ -282,6 +284,7 @@ files:
|
|
|
282
284
|
- spec/lib/workos/audit_trail_spec.rb
|
|
283
285
|
- spec/lib/workos/base_spec.rb
|
|
284
286
|
- spec/lib/workos/directory_sync_spec.rb
|
|
287
|
+
- spec/lib/workos/directory_user_spec.rb
|
|
285
288
|
- spec/lib/workos/mfa_spec.rb
|
|
286
289
|
- spec/lib/workos/organizations_spec.rb
|
|
287
290
|
- spec/lib/workos/passwordless_spec.rb
|
|
@@ -333,6 +336,7 @@ files:
|
|
|
333
336
|
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_expired.yml
|
|
334
337
|
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_invalid.yml
|
|
335
338
|
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_valid.yml
|
|
339
|
+
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_valid_is_false.yml
|
|
336
340
|
- spec/support/fixtures/vcr_cassettes/organization/create.yml
|
|
337
341
|
- spec/support/fixtures/vcr_cassettes/organization/create_invalid.yml
|
|
338
342
|
- spec/support/fixtures/vcr_cassettes/organization/delete.yml
|
|
@@ -384,7 +388,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
384
388
|
- !ruby/object:Gem::Version
|
|
385
389
|
version: '0'
|
|
386
390
|
requirements: []
|
|
387
|
-
rubygems_version: 3.3.
|
|
391
|
+
rubygems_version: 3.3.15
|
|
388
392
|
signing_key:
|
|
389
393
|
specification_version: 4
|
|
390
394
|
summary: API client for WorkOS
|
|
@@ -392,6 +396,7 @@ test_files:
|
|
|
392
396
|
- spec/lib/workos/audit_trail_spec.rb
|
|
393
397
|
- spec/lib/workos/base_spec.rb
|
|
394
398
|
- spec/lib/workos/directory_sync_spec.rb
|
|
399
|
+
- spec/lib/workos/directory_user_spec.rb
|
|
395
400
|
- spec/lib/workos/mfa_spec.rb
|
|
396
401
|
- spec/lib/workos/organizations_spec.rb
|
|
397
402
|
- spec/lib/workos/passwordless_spec.rb
|
|
@@ -443,6 +448,7 @@ test_files:
|
|
|
443
448
|
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_expired.yml
|
|
444
449
|
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_invalid.yml
|
|
445
450
|
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_valid.yml
|
|
451
|
+
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_valid_is_false.yml
|
|
446
452
|
- spec/support/fixtures/vcr_cassettes/organization/create.yml
|
|
447
453
|
- spec/support/fixtures/vcr_cassettes/organization/create_invalid.yml
|
|
448
454
|
- spec/support/fixtures/vcr_cassettes/organization/delete.yml
|