workos 2.17.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +5 -14
- data/lib/workos/authentication_factor_and_challenge.rb +31 -0
- data/lib/workos/authentication_response.rb +27 -0
- data/lib/workos/invitation.rb +68 -0
- data/lib/workos/organization_membership.rb +50 -0
- data/lib/workos/types/invitation_struct.rb +20 -0
- data/lib/workos/types/magic_auth_challenge_struct.rb +12 -0
- data/lib/workos/types/organization_membership_struct.rb +15 -0
- data/lib/workos/types/user_struct.rb +17 -0
- data/lib/workos/types.rb +9 -5
- data/lib/workos/user.rb +57 -0
- data/lib/workos/user_and_token.rb +29 -0
- data/lib/workos/user_management.rb +1008 -0
- data/lib/workos/user_response.rb +25 -0
- data/lib/workos/version.rb +1 -1
- data/lib/workos.rb +17 -12
- data/spec/lib/workos/user_management_spec.rb +1092 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_code/invalid.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_code/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_email_verification/invalid.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_email_verification/valid.yml +81 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_magic_auth/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_magic_auth/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_organization_selection/invalid.yml +81 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_organization_selection/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_password/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_password/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_totp/invalid.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_totp/valid.yml +81 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/confirm_password_reset/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/confirm_password_reset/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/invalid.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/create_user_invalid.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/create_user_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/delete_organization_membership/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/delete_organization_membership/valid.yml +78 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/delete_user/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/delete_user/valid.yml +78 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/enroll_auth_factor/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/enroll_auth_factor/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/get_invitation/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/get_invitation/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/get_organization_membership.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/get_user.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_auth_factors/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_auth_factors/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_after.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_before.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_limit.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_no_options.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_organization_id.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/no_options.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/with_options.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_users/no_options.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_users/with_options.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/reset_password/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/reset_password/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/send_invitation/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/send_invitation/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/send_magic_auth_code/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/send_password_reset_email/invalid.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/send_password_reset_email/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/send_verification_email/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/send_verification_email/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/update_user/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/update_user/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/update_user_password/invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/update_user_password/valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/verify_email/invalid_code.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/verify_email/invalid_magic_auth_challenge.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/verify_email/valid.yml +82 -0
- data/workos.gemspec +0 -1
- metadata +131 -49
- data/bin/docs +0 -5
- data/docs/WorkOS/APIError.html +0 -160
- data/docs/WorkOS/AuditLog.html +0 -235
- data/docs/WorkOS/AuditTrail.html +0 -235
- data/docs/WorkOS/AuthenticationError.html +0 -160
- data/docs/WorkOS/Base.html +0 -287
- data/docs/WorkOS/Client.html +0 -504
- data/docs/WorkOS/InvalidRequestError.html +0 -160
- data/docs/WorkOS/Profile.html +0 -788
- data/docs/WorkOS/RequestError.html +0 -135
- data/docs/WorkOS/SSO.html +0 -691
- data/docs/WorkOS/Types/ProfileStruct.html +0 -135
- data/docs/WorkOS/Types/Provider.html +0 -135
- data/docs/WorkOS/Types.html +0 -128
- data/docs/WorkOS/WorkOSError.html +0 -447
- data/docs/WorkOS.html +0 -324
- data/docs/class_list.html +0 -51
- data/docs/css/common.css +0 -1
- data/docs/css/full_list.css +0 -58
- data/docs/css/style.css +0 -496
- data/docs/file.README.html +0 -252
- data/docs/file_list.html +0 -56
- data/docs/frames.html +0 -17
- data/docs/index.html +0 -250
- data/docs/js/app.js +0 -314
- data/docs/js/full_list.js +0 -216
- data/docs/js/jquery.js +0 -4
- data/docs/method_list.html +0 -267
- data/docs/top-level-namespace.html +0 -110
- data/lib/workos/audit_trail.rb +0 -111
- data/spec/lib/workos/audit_trail_spec.rb +0 -146
@@ -0,0 +1,84 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.workos.com/user_management/authenticate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
'{"code":"invalid","client_id":"client_123","client_secret":"<API_KEY>","ip_address":"200.240.210.16","user_agent":"Mozilla/5.0
|
10
|
+
(Macintosh; Intel Mac OS X 10_15_7) Chrome/108.0.0.0 Safari/537.36","grant_type":"authorization_code"}'
|
11
|
+
headers:
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
User-Agent:
|
19
|
+
- WorkOS; ruby/3.0.2; arm64-darwin21; v2.16.0
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Wed, 30 Aug 2023 19:51:51 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Content-Length:
|
30
|
+
- "92"
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cf-Ray:
|
34
|
+
- 7fef92211809c715-SEA
|
35
|
+
Cf-Cache-Status:
|
36
|
+
- DYNAMIC
|
37
|
+
Etag:
|
38
|
+
- W/"5c-iYZxvYBkO+QosPHgQENUzbE8Uac"
|
39
|
+
Strict-Transport-Security:
|
40
|
+
- max-age=15552000; includeSubDomains
|
41
|
+
Vary:
|
42
|
+
- Origin, Accept-Encoding
|
43
|
+
Via:
|
44
|
+
- 1.1 spaces-router (devel)
|
45
|
+
Access-Control-Allow-Credentials:
|
46
|
+
- "true"
|
47
|
+
Content-Security-Policy:
|
48
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
49
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
50
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
51
|
+
Expect-Ct:
|
52
|
+
- max-age=0
|
53
|
+
Referrer-Policy:
|
54
|
+
- no-referrer
|
55
|
+
X-Content-Type-Options:
|
56
|
+
- nosniff
|
57
|
+
X-Dns-Prefetch-Control:
|
58
|
+
- "off"
|
59
|
+
X-Download-Options:
|
60
|
+
- noopen
|
61
|
+
X-Frame-Options:
|
62
|
+
- SAMEORIGIN
|
63
|
+
X-Permitted-Cross-Domain-Policies:
|
64
|
+
- none
|
65
|
+
X-Request-Id:
|
66
|
+
- 470506e4-7be1-464c-8d2c-8ce98207bff6
|
67
|
+
X-Xss-Protection:
|
68
|
+
- "0"
|
69
|
+
Set-Cookie:
|
70
|
+
- __cf_bm=T4FglgOdveH_UrrH3p1bZTMlmgx6dOp6MwUIacX.Ilw-1693425111-0-AeeLZFZ2Ai2iZTCSKu01aHk1f9fy95FYgYE79bYIpSi63zy8YTFMKhaIQlHj2CfrK485zE0frTrbD+76Rve+trw=;
|
71
|
+
path=/; expires=Wed, 30-Aug-23 20:21:51 GMT; domain=.workos.com; HttpOnly;
|
72
|
+
Secure; SameSite=None
|
73
|
+
- __cfruid=3e9a5d359ba92753e7626245fef8b2f1ee096477-1693425111; path=/; domain=.workos.com;
|
74
|
+
HttpOnly; Secure; SameSite=None
|
75
|
+
Server:
|
76
|
+
- cloudflare
|
77
|
+
body:
|
78
|
+
encoding: UTF-8
|
79
|
+
string:
|
80
|
+
'{"error":"invalid_grant","error_description":"The code ''452079'' has
|
81
|
+
expired or is invalid."}'
|
82
|
+
http_version:
|
83
|
+
recorded_at: Wed, 30 Aug 2023 19:51:51 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/user_management/authenticate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
'{"code":"01H93ZZHA0JBHFJH9RR11S83YN","client_id":"client_123","client_secret":"<API_KEY>","ip_address":"200.240.210.16","user_agent":"Mozilla/5.0
|
10
|
+
(Macintosh; Intel Mac OS X 10_15_7) Chrome/108.0.0.0 Safari/537.36","grant_type":"authorization_code"}'
|
11
|
+
headers:
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
User-Agent:
|
19
|
+
- WorkOS; ruby/3.0.2; arm64-darwin21; v2.16.0
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Wed, 30 Aug 2023 19:51:51 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cf-Ray:
|
34
|
+
- 7fef921deeca091f-SEA
|
35
|
+
Cf-Cache-Status:
|
36
|
+
- DYNAMIC
|
37
|
+
Etag:
|
38
|
+
- W/"13b-pHataL1lHEvsW5EO4vq5QgAdcWw"
|
39
|
+
Strict-Transport-Security:
|
40
|
+
- max-age=15552000; includeSubDomains
|
41
|
+
Vary:
|
42
|
+
- Origin, Accept-Encoding
|
43
|
+
Via:
|
44
|
+
- 1.1 spaces-router (devel)
|
45
|
+
Access-Control-Allow-Credentials:
|
46
|
+
- "true"
|
47
|
+
Content-Security-Policy:
|
48
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
49
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
50
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
51
|
+
Expect-Ct:
|
52
|
+
- max-age=0
|
53
|
+
Referrer-Policy:
|
54
|
+
- no-referrer
|
55
|
+
X-Content-Type-Options:
|
56
|
+
- nosniff
|
57
|
+
X-Dns-Prefetch-Control:
|
58
|
+
- "off"
|
59
|
+
X-Download-Options:
|
60
|
+
- noopen
|
61
|
+
X-Frame-Options:
|
62
|
+
- SAMEORIGIN
|
63
|
+
X-Permitted-Cross-Domain-Policies:
|
64
|
+
- none
|
65
|
+
X-Request-Id:
|
66
|
+
- 630bec5a-5a13-4311-a0b7-958889a3bbb2
|
67
|
+
X-Xss-Protection:
|
68
|
+
- "0"
|
69
|
+
Set-Cookie:
|
70
|
+
- __cf_bm=o5KBdIAUFZp0azSQnnd1GlQcIlcPCz95uFg6hFNnKM8-1693425111-0-ARSauqdojZdKD6Z7vp12JBrxCp6wE1s0JzEhaN0XE2DqME76OnJiDJugj2TsbNGXtqWaH3By7XHUXVZDf+AdFxU=;
|
71
|
+
path=/; expires=Wed, 30-Aug-23 20:21:51 GMT; domain=.workos.com; HttpOnly;
|
72
|
+
Secure; SameSite=None
|
73
|
+
- __cfruid=3e9a5d359ba92753e7626245fef8b2f1ee096477-1693425111; path=/; domain=.workos.com;
|
74
|
+
HttpOnly; Secure; SameSite=None
|
75
|
+
Server:
|
76
|
+
- cloudflare
|
77
|
+
body:
|
78
|
+
encoding: ASCII-8BIT
|
79
|
+
string: '{"user":{"object":"user","id":"user_01H93ZY4F80YZRRS6N59Z2HFVS","email":"test@workos.app","email_verified":false,"first_name":"Lucille","last_name":"Bluth","created_at":"2023-08-30T19:50:13.214Z","updated_at":"2023-08-30T19:50:13.214Z","user_type":"managed","sso_profile_id":"prof_01H93ZTVWYPAT4RKDSPFPPXH0J"}}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Wed, 30 Aug 2023 19:51:51 GMT
|
82
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,83 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.workos.com/user_management/authenticate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
'{"code":"invalid","client_id":"client_123","client_secret":"<API_KEY>","grant_type":"urn:workos:oauth:grant-type:email-verification:code", "pending_authentication_token="pending_authentication_token_1234"}'
|
10
|
+
headers:
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
Accept-Encoding:
|
14
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
15
|
+
Accept:
|
16
|
+
- "*/*"
|
17
|
+
User-Agent:
|
18
|
+
- WorkOS; ruby/3.0.2; arm64-darwin21; v2.16.0
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 400
|
22
|
+
message: Bad Request
|
23
|
+
headers:
|
24
|
+
Date:
|
25
|
+
- Wed, 30 Aug 2023 19:51:51 GMT
|
26
|
+
Content-Type:
|
27
|
+
- application/json; charset=utf-8
|
28
|
+
Transfer-Encoding:
|
29
|
+
- chunked
|
30
|
+
Connection:
|
31
|
+
- keep-alive
|
32
|
+
Cf-Ray:
|
33
|
+
- 7fef921deeca091f-SEA
|
34
|
+
Cf-Cache-Status:
|
35
|
+
- DYNAMIC
|
36
|
+
Etag:
|
37
|
+
- W/"13b-pHataL1lHEvsW5EO4vq5QgAdcWw"
|
38
|
+
Strict-Transport-Security:
|
39
|
+
- max-age=15552000; includeSubDomains
|
40
|
+
Vary:
|
41
|
+
- Origin, Accept-Encoding
|
42
|
+
Via:
|
43
|
+
- 1.1 spaces-router (devel)
|
44
|
+
Access-Control-Allow-Credentials:
|
45
|
+
- "true"
|
46
|
+
Content-Security-Policy:
|
47
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
48
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
49
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
50
|
+
Expect-Ct:
|
51
|
+
- max-age=0
|
52
|
+
Referrer-Policy:
|
53
|
+
- no-referrer
|
54
|
+
X-Content-Type-Options:
|
55
|
+
- nosniff
|
56
|
+
X-Dns-Prefetch-Control:
|
57
|
+
- "off"
|
58
|
+
X-Download-Options:
|
59
|
+
- noopen
|
60
|
+
X-Frame-Options:
|
61
|
+
- SAMEORIGIN
|
62
|
+
X-Permitted-Cross-Domain-Policies:
|
63
|
+
- none
|
64
|
+
X-Request-Id:
|
65
|
+
- 630bec5a-5a13-4311-a0b7-958889a3bbb2
|
66
|
+
X-Xss-Protection:
|
67
|
+
- "0"
|
68
|
+
Set-Cookie:
|
69
|
+
- __cf_bm=o5KBdIAUFZp0azSQnnd1GlQcIlcPCz95uFg6hFNnKM8-1693425111-0-ARSauqdojZdKD6Z7vp12JBrxCp6wE1s0JzEhaN0XE2DqME76OnJiDJugj2TsbNGXtqWaH3By7XHUXVZDf+AdFxU=;
|
70
|
+
path=/; expires=Wed, 30-Aug-23 20:21:51 GMT; domain=.workos.com; HttpOnly;
|
71
|
+
Secure; SameSite=None
|
72
|
+
- __cfruid=3e9a5d359ba92753e7626245fef8b2f1ee096477-1693425111; path=/; domain=.workos.com;
|
73
|
+
HttpOnly; Secure; SameSite=None
|
74
|
+
Server:
|
75
|
+
- cloudflare
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string:
|
79
|
+
'{"error":"invalid_grant","error_description":"The code ''452079'' has
|
80
|
+
expired or is invalid."}'
|
81
|
+
http_version:
|
82
|
+
recorded_at: Wed, 30 Aug 2023 19:51:51 GMT
|
83
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,81 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.workos.com/user_management/authenticate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
'{"code":"123456","client_id":"client_123","client_secret":"<API_KEY>","grant_type":"urn:workos:oauth:grant-type:email-verification:code", "pending_authentication_token="pending_authentication_token_1234"}'
|
10
|
+
headers:
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
Accept-Encoding:
|
14
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
15
|
+
Accept:
|
16
|
+
- "*/*"
|
17
|
+
User-Agent:
|
18
|
+
- WorkOS; ruby/3.0.2; arm64-darwin21; v2.16.0
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Date:
|
25
|
+
- Wed, 30 Aug 2023 19:51:51 GMT
|
26
|
+
Content-Type:
|
27
|
+
- application/json; charset=utf-8
|
28
|
+
Transfer-Encoding:
|
29
|
+
- chunked
|
30
|
+
Connection:
|
31
|
+
- keep-alive
|
32
|
+
Cf-Ray:
|
33
|
+
- 7fef921deeca091f-SEA
|
34
|
+
Cf-Cache-Status:
|
35
|
+
- DYNAMIC
|
36
|
+
Etag:
|
37
|
+
- W/"13b-pHataL1lHEvsW5EO4vq5QgAdcWw"
|
38
|
+
Strict-Transport-Security:
|
39
|
+
- max-age=15552000; includeSubDomains
|
40
|
+
Vary:
|
41
|
+
- Origin, Accept-Encoding
|
42
|
+
Via:
|
43
|
+
- 1.1 spaces-router (devel)
|
44
|
+
Access-Control-Allow-Credentials:
|
45
|
+
- "true"
|
46
|
+
Content-Security-Policy:
|
47
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
48
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
49
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
50
|
+
Expect-Ct:
|
51
|
+
- max-age=0
|
52
|
+
Referrer-Policy:
|
53
|
+
- no-referrer
|
54
|
+
X-Content-Type-Options:
|
55
|
+
- nosniff
|
56
|
+
X-Dns-Prefetch-Control:
|
57
|
+
- "off"
|
58
|
+
X-Download-Options:
|
59
|
+
- noopen
|
60
|
+
X-Frame-Options:
|
61
|
+
- SAMEORIGIN
|
62
|
+
X-Permitted-Cross-Domain-Policies:
|
63
|
+
- none
|
64
|
+
X-Request-Id:
|
65
|
+
- 630bec5a-5a13-4311-a0b7-958889a3bbb2
|
66
|
+
X-Xss-Protection:
|
67
|
+
- "0"
|
68
|
+
Set-Cookie:
|
69
|
+
- __cf_bm=o5KBdIAUFZp0azSQnnd1GlQcIlcPCz95uFg6hFNnKM8-1693425111-0-ARSauqdojZdKD6Z7vp12JBrxCp6wE1s0JzEhaN0XE2DqME76OnJiDJugj2TsbNGXtqWaH3By7XHUXVZDf+AdFxU=;
|
70
|
+
path=/; expires=Wed, 30-Aug-23 20:21:51 GMT; domain=.workos.com; HttpOnly;
|
71
|
+
Secure; SameSite=None
|
72
|
+
- __cfruid=3e9a5d359ba92753e7626245fef8b2f1ee096477-1693425111; path=/; domain=.workos.com;
|
73
|
+
HttpOnly; Secure; SameSite=None
|
74
|
+
Server:
|
75
|
+
- cloudflare
|
76
|
+
body:
|
77
|
+
encoding: ASCII-8BIT
|
78
|
+
string: '{"user":{"object":"user","id":"user_01H93ZY4F80YZRRS6N59Z2HFVS","email":"test@workos.app","email_verified":false,"first_name":"Lucille","last_name":"Bluth","created_at":"2023-08-30T19:50:13.214Z","updated_at":"2023-08-30T19:50:13.214Z","user_type":"managed","sso_profile_id":"prof_01H93ZTVWYPAT4RKDSPFPPXH0J"}}'
|
79
|
+
http_version:
|
80
|
+
recorded_at: Wed, 30 Aug 2023 19:51:51 GMT
|
81
|
+
recorded_with: VCR 5.0.0
|
data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_magic_auth/invalid.yml
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.workos.com/user_management/authenticate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
'{"code":"invalid","email":"test@workos.com","client_id":"client_123","client_secret":"<API_KEY>","ip_address":"200.240.210.16","user_agent":"Mozilla/5.0
|
10
|
+
(Macintosh; Intel Mac OS X 10_15_7) Chrome/108.0.0.0 Safari/537.36","grant_type":"urn:workos:oauth:grant-type:magic-auth:code"}'
|
11
|
+
headers:
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
User-Agent:
|
19
|
+
- WorkOS; ruby/3.0.2; arm64-darwin21; v2.16.0
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 404
|
23
|
+
message: Not Found
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Wed, 30 Aug 2023 18:58:01 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cf-Ray:
|
34
|
+
- 7fef4344cb386811-SEA
|
35
|
+
Cf-Cache-Status:
|
36
|
+
- DYNAMIC
|
37
|
+
Etag:
|
38
|
+
- W/"86-X4Q7F02iXed9FifFtOSpB/M42Bc"
|
39
|
+
Strict-Transport-Security:
|
40
|
+
- max-age=15552000; includeSubDomains
|
41
|
+
Vary:
|
42
|
+
- Origin, Accept-Encoding
|
43
|
+
Via:
|
44
|
+
- 1.1 spaces-router (devel)
|
45
|
+
Access-Control-Allow-Credentials:
|
46
|
+
- "true"
|
47
|
+
Content-Security-Policy:
|
48
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
49
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
50
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
51
|
+
Expect-Ct:
|
52
|
+
- max-age=0
|
53
|
+
Referrer-Policy:
|
54
|
+
- no-referrer
|
55
|
+
X-Content-Type-Options:
|
56
|
+
- nosniff
|
57
|
+
X-Dns-Prefetch-Control:
|
58
|
+
- "off"
|
59
|
+
X-Download-Options:
|
60
|
+
- noopen
|
61
|
+
X-Frame-Options:
|
62
|
+
- SAMEORIGIN
|
63
|
+
X-Permitted-Cross-Domain-Policies:
|
64
|
+
- none
|
65
|
+
X-Request-Id:
|
66
|
+
- 4d33111f-a488-4250-a946-7dceb07af151
|
67
|
+
X-Xss-Protection:
|
68
|
+
- "0"
|
69
|
+
Set-Cookie:
|
70
|
+
- __cf_bm=vPqfj2Z.hrS6vFkS6IuPzCyzTvKEzqKRxfwaaFAaaO8-1693421881-0-AUTukg7nPdQwavyZXIMKFWXnk+xXmC4q0ioe3Jalz3feLjTbouHB5lBI/Qp99KfZyslQxRxMlvJPeDo2iBOYbGs=;
|
71
|
+
path=/; expires=Wed, 30-Aug-23 19:28:01 GMT; domain=.workos.com; HttpOnly;
|
72
|
+
Secure; SameSite=None
|
73
|
+
- __cfruid=16391e6119f12d4d9bca79552f799341cb54e8ef-1693421881; path=/; domain=.workos.com;
|
74
|
+
HttpOnly; Secure; SameSite=None
|
75
|
+
Server:
|
76
|
+
- cloudflare
|
77
|
+
body:
|
78
|
+
encoding: ASCII-8BIT
|
79
|
+
string: '{"message":"User not found: ''user_01H93WD0R0KWF8Q7BK02C0RPY''.","code":"entity_not_found","entity_id":"user_01H93WD0R0KWF8Q7BK02C0RPY"}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Wed, 30 Aug 2023 18:58:01 GMT
|
82
|
+
recorded_with: VCR 5.0.0
|
data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_magic_auth/valid.yml
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.workos.com/user_management/authenticate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
'{"code":"452079","email":"test@workos.com","client_id":"client_123","client_secret":"<API_KEY>","ip_address":"200.240.210.16","user_agent":"Mozilla/5.0
|
10
|
+
(Macintosh; Intel Mac OS X 10_15_7) Chrome/108.0.0.0 Safari/537.36","grant_type":"urn:workos:oauth:grant-type:magic-auth:code"}'
|
11
|
+
headers:
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
User-Agent:
|
19
|
+
- WorkOS; ruby/3.0.2; arm64-darwin21; v2.16.0
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Wed, 30 Aug 2023 18:58:00 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cf-Ray:
|
34
|
+
- 7fef43410e21ec40-SEA
|
35
|
+
Cf-Cache-Status:
|
36
|
+
- DYNAMIC
|
37
|
+
Etag:
|
38
|
+
- W/"178-SVaSEtrIczZQlwnTK57+aDrxt/g"
|
39
|
+
Strict-Transport-Security:
|
40
|
+
- max-age=15552000; includeSubDomains
|
41
|
+
Vary:
|
42
|
+
- Origin, Accept-Encoding
|
43
|
+
Via:
|
44
|
+
- 1.1 spaces-router (devel)
|
45
|
+
Access-Control-Allow-Credentials:
|
46
|
+
- "true"
|
47
|
+
Content-Security-Policy:
|
48
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
49
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
50
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
51
|
+
Expect-Ct:
|
52
|
+
- max-age=0
|
53
|
+
Referrer-Policy:
|
54
|
+
- no-referrer
|
55
|
+
X-Content-Type-Options:
|
56
|
+
- nosniff
|
57
|
+
X-Dns-Prefetch-Control:
|
58
|
+
- "off"
|
59
|
+
X-Download-Options:
|
60
|
+
- noopen
|
61
|
+
X-Frame-Options:
|
62
|
+
- SAMEORIGIN
|
63
|
+
X-Permitted-Cross-Domain-Policies:
|
64
|
+
- none
|
65
|
+
X-Request-Id:
|
66
|
+
- ba8fd1ed-34e6-408e-afe0-75e16e6cf3cb
|
67
|
+
X-Xss-Protection:
|
68
|
+
- "0"
|
69
|
+
Set-Cookie:
|
70
|
+
- __cf_bm=ltLsz5yJcK6FuzoGfz2T0FBF9H_Lii_9fMu.1kAgrw8-1693421880-0-AR414sJ/FdSxY+N35vtic7XqJ78+FE0W2D5l5tR5eJbVJcm2X5/eqNg9xzMprMd1J1Eegol3Qa1KMntgknAj9l8=;
|
71
|
+
path=/; expires=Wed, 30-Aug-23 19:28:00 GMT; domain=.workos.com; HttpOnly;
|
72
|
+
Secure; SameSite=None
|
73
|
+
- __cfruid=d0c3b10fd259e1dd63341e19d261a235baabb4af-1693421880; path=/; domain=.workos.com;
|
74
|
+
HttpOnly; Secure; SameSite=None
|
75
|
+
Server:
|
76
|
+
- cloudflare
|
77
|
+
body:
|
78
|
+
encoding: ASCII-8BIT
|
79
|
+
string: '{"user":{"object":"user","id":"user_01H93WD0R0KWF8Q7BK02C0RPYJ","email":"test@workos.app","email_verified":true,"first_name":"Lucille","last_name":"Bluth","created_at":"2023-08-30T18:48:26.517Z","updated_at":"2023-08-30T18:58:00.821Z","user_type":"unmanaged","email_verified_at":"2023-08-30T18:58:00.915Z","google_oauth_profile_id":null,"microsoft_oauth_profile_id":null}}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Wed, 30 Aug 2023 18:58:00 GMT
|
82
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,81 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.workos.com/user_management/authenticate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"client_id":"project_01EGKAEB7G5N88E83MF99J785F","client_secret":"","ip_address":null,"user_agent":null,"grant_type":"urn:workos:oauth:grant-type:organization-selection","organization_id":"invalid_org_id","pending_authentication_token":"pending_authentication_token_1234"}'
|
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.6; arm64-darwin23; v2.16.0
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 400
|
21
|
+
message: Bad Request
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Wed, 20 Dec 2023 22:00:13 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Content-Length:
|
28
|
+
- '155'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Cf-Ray:
|
32
|
+
- 838b28288bab1588-SJC
|
33
|
+
Cf-Cache-Status:
|
34
|
+
- DYNAMIC
|
35
|
+
Etag:
|
36
|
+
- W/"9b-OK0o7f8HUr1VD42cGHuyxEaTUsQ"
|
37
|
+
Strict-Transport-Security:
|
38
|
+
- max-age=15552000; includeSubDomains
|
39
|
+
Vary:
|
40
|
+
- Origin, Accept-Encoding
|
41
|
+
Via:
|
42
|
+
- 1.1 spaces-router (devel)
|
43
|
+
Access-Control-Allow-Credentials:
|
44
|
+
- 'true'
|
45
|
+
Content-Security-Policy:
|
46
|
+
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
47
|
+
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
48
|
+
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
49
|
+
Expect-Ct:
|
50
|
+
- max-age=0
|
51
|
+
Referrer-Policy:
|
52
|
+
- no-referrer
|
53
|
+
X-Content-Type-Options:
|
54
|
+
- nosniff
|
55
|
+
X-Dns-Prefetch-Control:
|
56
|
+
- 'off'
|
57
|
+
X-Download-Options:
|
58
|
+
- noopen
|
59
|
+
X-Frame-Options:
|
60
|
+
- SAMEORIGIN
|
61
|
+
X-Permitted-Cross-Domain-Policies:
|
62
|
+
- none
|
63
|
+
X-Request-Id:
|
64
|
+
- be14dde8-2d00-4b00-8619-4586c0d811af
|
65
|
+
X-Xss-Protection:
|
66
|
+
- '0'
|
67
|
+
Set-Cookie:
|
68
|
+
- __cf_bm=7BxHtdm8uv2CHfYDw8rzp4.OIRtS41sROdLi.QeBoos-1703109613-1-AZjOgJ3uXY3OUH0x0E2p9lf4mQWAiN95j2vUJ2WZTkH/bRMjJMiKm0bBtrV4A8ok8elfmr34+mQGJaTw4FHR7ww=;
|
69
|
+
path=/; expires=Wed, 20-Dec-23 22:30:13 GMT; domain=.workos.com; HttpOnly;
|
70
|
+
Secure; SameSite=None
|
71
|
+
- __cfruid=71b77aa5ec84c0fc82c02ff4d4fc8e8ae6d37ee3-1703109613; path=/; domain=.workos.com;
|
72
|
+
HttpOnly; Secure; SameSite=None
|
73
|
+
Server:
|
74
|
+
- cloudflare
|
75
|
+
body:
|
76
|
+
encoding: UTF-8
|
77
|
+
string: '{"code":"invalid_pending_authentication_token","message":"The pending_authentication_token
|
78
|
+
''pending_authentication_token_1234'' has expired or is invalid."}'
|
79
|
+
http_version:
|
80
|
+
recorded_at: Wed, 20 Dec 2023 22:00:13 GMT
|
81
|
+
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/user_management/authenticate
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
'{"client_id":"project_01EGKAEB7G5N88E83MF99J785F","client_secret":"","ip_address":"200.240.210.16","user_agent":"Mozilla/5.0
|
10
|
+
(Macintosh; Intel Mac OS X 10_15_7) Chrome/108.0.0.0 Safari/537.36","grant_type":"urn:workos:oauth:grant-type:organization-selection","organization_id":"org_01H5JQDV7R7ATEYZDEG0W5PRYS","pending_authentication_token":"pending_authentication_token_1234"}'
|
11
|
+
headers:
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
User-Agent:
|
19
|
+
- WorkOS; ruby/3.0.6; arm64-darwin23; v2.16.0
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Wed, 20 Dec 2023 22:00:12 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Content-Length:
|
30
|
+
- "155"
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cf-Ray:
|
34
|
+
- 838b2825b878fad6-SJC
|
35
|
+
Cf-Cache-Status:
|
36
|
+
- DYNAMIC
|
37
|
+
Etag:
|
38
|
+
- W/"9b-OK0o7f8HUr1VD42cGHuyxEaTUsQ"
|
39
|
+
Strict-Transport-Security:
|
40
|
+
- max-age=15552000; includeSubDomains
|
41
|
+
Vary:
|
42
|
+
- Origin, Accept-Encoding
|
43
|
+
Via:
|
44
|
+
- 1.1 spaces-router (devel)
|
45
|
+
Access-Control-Allow-Credentials:
|
46
|
+
- "true"
|
47
|
+
Content-Security-Policy:
|
48
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
49
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
50
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
51
|
+
Expect-Ct:
|
52
|
+
- max-age=0
|
53
|
+
Referrer-Policy:
|
54
|
+
- no-referrer
|
55
|
+
X-Content-Type-Options:
|
56
|
+
- nosniff
|
57
|
+
X-Dns-Prefetch-Control:
|
58
|
+
- "off"
|
59
|
+
X-Download-Options:
|
60
|
+
- noopen
|
61
|
+
X-Frame-Options:
|
62
|
+
- SAMEORIGIN
|
63
|
+
X-Permitted-Cross-Domain-Policies:
|
64
|
+
- none
|
65
|
+
X-Request-Id:
|
66
|
+
- 63def249-6e78-46d3-8289-939aab5b232e
|
67
|
+
X-Xss-Protection:
|
68
|
+
- "0"
|
69
|
+
Set-Cookie:
|
70
|
+
- __cf_bm=VFWq3DG4vQE5c_IcmK6dGE.XEoss3DhFFsaogQ1KgCc-1703109612-1-AbJic+K1H2u1qaFULTbKzgQYpgyHIjzHB8DM2tkKUcC3nMNsOXV0WlSYcRS4s3l4BAMeAjDsdjllwxm3CLN063E=;
|
71
|
+
path=/; expires=Wed, 20-Dec-23 22:30:12 GMT; domain=.workos.com; HttpOnly;
|
72
|
+
Secure; SameSite=None
|
73
|
+
- __cfruid=ca64bb4ffb95b2c79caf4149a1944be0a9d16462-1703109612; path=/; domain=.workos.com;
|
74
|
+
HttpOnly; Secure; SameSite=None
|
75
|
+
Server:
|
76
|
+
- cloudflare
|
77
|
+
body:
|
78
|
+
encoding: UTF-8
|
79
|
+
string: '{"organization_id":"org_01H5JQDV7R7ATEYZDEG0W5PRYS","user":{"object":"user","id":"user_01H93WD0R0KWF8Q7BK02C0RPYJ","email":"test@workos.app","email_verified":true,"first_name":"Lucille","last_name":"Bluth","created_at":"2023-08-30T18:48:26.517Z","updated_at":"2023-08-30T18:58:00.821Z","user_type":"unmanaged","email_verified_at":"2023-08-30T18:58:00.915Z","google_oauth_profile_id":null,"microsoft_oauth_profile_id":null}}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Wed, 20 Dec 2023 22:00:12 GMT
|
82
|
+
recorded_with: VCR 5.0.0
|