workos 2.1.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +13 -39
- data/Gemfile.lock +2 -2
- data/README.md +4 -0
- data/lib/workos/audit_trail.rb +1 -0
- data/lib/workos/challenge.rb +55 -0
- data/lib/workos/client.rb +2 -0
- 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 +12 -8
- data/lib/workos/directory_user.rb +9 -1
- data/lib/workos/errors.rb +3 -1
- data/lib/workos/factor.rb +54 -0
- data/lib/workos/hash_provider.rb +19 -0
- data/lib/workos/mfa.rb +165 -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 +18 -0
- data/lib/workos/types/directory_group_struct.rb +5 -0
- data/lib/workos/types/factor_struct.rb +18 -0
- data/lib/workos/types/passwordless_session_struct.rb +2 -0
- data/lib/workos/types/verify_factor_struct.rb +13 -0
- data/lib/workos/types.rb +3 -0
- data/lib/workos/verify_factor.rb +40 -0
- data/lib/workos/version.rb +1 -1
- data/lib/workos/webhook.rb +1 -0
- data/lib/workos/webhooks.rb +1 -1
- data/lib/workos.rb +7 -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 +262 -0
- data/spec/lib/workos/sso_spec.rb +0 -2
- 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_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_sms_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_totp_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/delete_factor.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_sms_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_totp_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/get_factor_invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/get_factor_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_expired.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_invalid.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_valid_is_false.yml +82 -0
- metadata +42 -3
@@ -0,0 +1,82 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.workos.com/auth/factors/auth_factor_01FZ4WMXXA09XF6NK1XMKNWB3M
|
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.2; arm64-darwin21; v2.1.1
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Sun, 27 Mar 2022 19:11:09 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
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
|
+
- 5766763a-5aaf-4892-8ae9-2f929398230e
|
61
|
+
Etag:
|
62
|
+
- W/"ef-wqcMjWChK4ut5ZQqtU8qO89bfTU"
|
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=7FLax7DlJtEaLUKB4v2ggq5QhJ9I9geEoDfZJd7em4t8cEqamHvfjLoLu7SkHbLzHSs%2FiaBNO7Ux9D4ESkvvw50exovd2wNpO%2B96U79ZYnWqtijqucWaL4jBB2aJ2jhdUQ%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
|
+
- 6f2a6e231fc039fc-SEA
|
75
|
+
Alt-Svc:
|
76
|
+
- h3=":443"; ma=86400, h3-29=":443"; ma=86400
|
77
|
+
body:
|
78
|
+
encoding: ASCII-8BIT
|
79
|
+
string: '{"object":"authentication_factor","id":"auth_factor_01FZ4WMXXA09XF6NK1XMKNWB3M","created_at":"2022-03-27T05:12:43.689Z","updated_at":"2022-03-27T05:12:43.689Z","type":"generic_otp"}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Sun, 27 Mar 2022 19:11:09 GMT
|
82
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,84 @@
|
|
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: 422
|
23
|
+
message: Unprocessable Entity
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Sun, 27 Mar 2022 05:54:30 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Content-Length:
|
30
|
+
- '167'
|
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
|
+
- 3bf7c473-ef39-4a3f-85fa-609ab4fcfdb4
|
61
|
+
Etag:
|
62
|
+
- W/"a7-3Az5u04ipYu1XY+wqhSwUOFImFI"
|
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=gQNkvWQQyL0h1kES333sXgQvo4JV9Bzm%2Bre%2BzJSsD8l%2F4sVjZ1ehj0dDfP40lHYCwx%2FLZ93avI155XM9JkY%2BxYyCAlRXobk2DfsyKmkTkhnWR4AxV%2BTWECeARqtTewSryA%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
|
+
- 6f25df294a253a32-SEA
|
75
|
+
Alt-Svc:
|
76
|
+
- h3=":443"; ma=86400, h3-29=":443"; ma=86400
|
77
|
+
body:
|
78
|
+
encoding: UTF-8
|
79
|
+
string: '{"code":"authentication_challenge_expired","message":"The
|
80
|
+
authentication challenge ''auth_challenge_01FZ4YVRBMXP5ZM0A7BP4AJ12J'' has
|
81
|
+
expired."}'
|
82
|
+
http_version:
|
83
|
+
recorded_at: Sun, 27 Mar 2022 05:54:30 GMT
|
84
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,84 @@
|
|
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: 422
|
23
|
+
message: Unprocessable Entity
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Sun, 27 Mar 2022 05:54:30 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Content-Length:
|
30
|
+
- '167'
|
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
|
+
- 3bf7c473-ef39-4a3f-85fa-609ab4fcfdb4
|
61
|
+
Etag:
|
62
|
+
- W/"a7-3Az5u04ipYu1XY+wqhSwUOFImFI"
|
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=gQNkvWQQyL0h1kES333sXgQvo4JV9Bzm%2Bre%2BzJSsD8l%2F4sVjZ1ehj0dDfP40lHYCwx%2FLZ93avI155XM9JkY%2BxYyCAlRXobk2DfsyKmkTkhnWR4AxV%2BTWECeARqtTewSryA%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
|
+
- 6f25df294a253a32-SEA
|
75
|
+
Alt-Svc:
|
76
|
+
- h3=":443"; ma=86400, h3-29=":443"; ma=86400
|
77
|
+
body:
|
78
|
+
encoding: UTF-8
|
79
|
+
string: '{"code":"authentication_challenge_previously_verified","message":"The
|
80
|
+
authentication challenge ''auth_challenge_01FZ4YVRBMXP5ZM0A7BP4AJ12J'' has
|
81
|
+
already been verified."}'
|
82
|
+
http_version:
|
83
|
+
recorded_at: Sun, 27 Mar 2022 05:54:30 GMT
|
84
|
+
recorded_with: VCR 5.0.0
|
@@ -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":true}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Sun, 27 Mar 2022 05:53:03 GMT
|
82
|
+
recorded_with: VCR 5.0.0
|
@@ -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
|
@@ -209,13 +209,18 @@ files:
|
|
209
209
|
- lib/workos.rb
|
210
210
|
- lib/workos/audit_trail.rb
|
211
211
|
- lib/workos/base.rb
|
212
|
+
- lib/workos/challenge.rb
|
212
213
|
- lib/workos/client.rb
|
213
214
|
- lib/workos/connection.rb
|
215
|
+
- lib/workos/deprecated_hash_wrapper.rb
|
214
216
|
- lib/workos/directory.rb
|
215
217
|
- lib/workos/directory_group.rb
|
216
218
|
- lib/workos/directory_sync.rb
|
217
219
|
- lib/workos/directory_user.rb
|
218
220
|
- lib/workos/errors.rb
|
221
|
+
- lib/workos/factor.rb
|
222
|
+
- lib/workos/hash_provider.rb
|
223
|
+
- lib/workos/mfa.rb
|
219
224
|
- lib/workos/organization.rb
|
220
225
|
- lib/workos/organizations.rb
|
221
226
|
- lib/workos/passwordless.rb
|
@@ -224,17 +229,21 @@ files:
|
|
224
229
|
- lib/workos/profile_and_token.rb
|
225
230
|
- lib/workos/sso.rb
|
226
231
|
- lib/workos/types.rb
|
232
|
+
- lib/workos/types/challenge_struct.rb
|
227
233
|
- lib/workos/types/connection_struct.rb
|
228
234
|
- lib/workos/types/directory_group_struct.rb
|
229
235
|
- lib/workos/types/directory_struct.rb
|
230
236
|
- lib/workos/types/directory_user_struct.rb
|
237
|
+
- lib/workos/types/factor_struct.rb
|
231
238
|
- lib/workos/types/intent_enum.rb
|
232
239
|
- lib/workos/types/list_struct.rb
|
233
240
|
- lib/workos/types/organization_struct.rb
|
234
241
|
- lib/workos/types/passwordless_session_struct.rb
|
235
242
|
- lib/workos/types/profile_struct.rb
|
236
243
|
- lib/workos/types/provider_enum.rb
|
244
|
+
- lib/workos/types/verify_factor_struct.rb
|
237
245
|
- lib/workos/types/webhook_struct.rb
|
246
|
+
- lib/workos/verify_factor.rb
|
238
247
|
- lib/workos/version.rb
|
239
248
|
- lib/workos/webhook.rb
|
240
249
|
- lib/workos/webhooks.rb
|
@@ -275,6 +284,8 @@ files:
|
|
275
284
|
- spec/lib/workos/audit_trail_spec.rb
|
276
285
|
- spec/lib/workos/base_spec.rb
|
277
286
|
- spec/lib/workos/directory_sync_spec.rb
|
287
|
+
- spec/lib/workos/directory_user_spec.rb
|
288
|
+
- spec/lib/workos/mfa_spec.rb
|
278
289
|
- spec/lib/workos/organizations_spec.rb
|
279
290
|
- spec/lib/workos/passwordless_spec.rb
|
280
291
|
- spec/lib/workos/portal_spec.rb
|
@@ -313,6 +324,19 @@ files:
|
|
313
324
|
- spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_group.yml
|
314
325
|
- spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_limit.yml
|
315
326
|
- spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_no_options.yml
|
327
|
+
- spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_generic_valid.yml
|
328
|
+
- spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_sms_valid.yml
|
329
|
+
- spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_totp_valid.yml
|
330
|
+
- spec/support/fixtures/vcr_cassettes/mfa/delete_factor.yml
|
331
|
+
- spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_generic_valid.yml
|
332
|
+
- spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_sms_valid.yml
|
333
|
+
- spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_totp_valid.yml
|
334
|
+
- spec/support/fixtures/vcr_cassettes/mfa/get_factor_invalid.yml
|
335
|
+
- spec/support/fixtures/vcr_cassettes/mfa/get_factor_valid.yml
|
336
|
+
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_expired.yml
|
337
|
+
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_invalid.yml
|
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
|
316
340
|
- spec/support/fixtures/vcr_cassettes/organization/create.yml
|
317
341
|
- spec/support/fixtures/vcr_cassettes/organization/create_invalid.yml
|
318
342
|
- spec/support/fixtures/vcr_cassettes/organization/delete.yml
|
@@ -364,7 +388,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
364
388
|
- !ruby/object:Gem::Version
|
365
389
|
version: '0'
|
366
390
|
requirements: []
|
367
|
-
rubygems_version: 3.3.
|
391
|
+
rubygems_version: 3.3.15
|
368
392
|
signing_key:
|
369
393
|
specification_version: 4
|
370
394
|
summary: API client for WorkOS
|
@@ -372,6 +396,8 @@ test_files:
|
|
372
396
|
- spec/lib/workos/audit_trail_spec.rb
|
373
397
|
- spec/lib/workos/base_spec.rb
|
374
398
|
- spec/lib/workos/directory_sync_spec.rb
|
399
|
+
- spec/lib/workos/directory_user_spec.rb
|
400
|
+
- spec/lib/workos/mfa_spec.rb
|
375
401
|
- spec/lib/workos/organizations_spec.rb
|
376
402
|
- spec/lib/workos/passwordless_spec.rb
|
377
403
|
- spec/lib/workos/portal_spec.rb
|
@@ -410,6 +436,19 @@ test_files:
|
|
410
436
|
- spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_group.yml
|
411
437
|
- spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_limit.yml
|
412
438
|
- spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_no_options.yml
|
439
|
+
- spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_generic_valid.yml
|
440
|
+
- spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_sms_valid.yml
|
441
|
+
- spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_totp_valid.yml
|
442
|
+
- spec/support/fixtures/vcr_cassettes/mfa/delete_factor.yml
|
443
|
+
- spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_generic_valid.yml
|
444
|
+
- spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_sms_valid.yml
|
445
|
+
- spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_totp_valid.yml
|
446
|
+
- spec/support/fixtures/vcr_cassettes/mfa/get_factor_invalid.yml
|
447
|
+
- spec/support/fixtures/vcr_cassettes/mfa/get_factor_valid.yml
|
448
|
+
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_expired.yml
|
449
|
+
- spec/support/fixtures/vcr_cassettes/mfa/verify_factor_generic_invalid.yml
|
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
|
413
452
|
- spec/support/fixtures/vcr_cassettes/organization/create.yml
|
414
453
|
- spec/support/fixtures/vcr_cassettes/organization/create_invalid.yml
|
415
454
|
- spec/support/fixtures/vcr_cassettes/organization/delete.yml
|