workos 2.17.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/Gemfile.lock +5 -14
  4. data/lib/workos/authentication_factor_and_challenge.rb +31 -0
  5. data/lib/workos/authentication_response.rb +27 -0
  6. data/lib/workos/invitation.rb +68 -0
  7. data/lib/workos/organization_membership.rb +50 -0
  8. data/lib/workos/types/invitation_struct.rb +20 -0
  9. data/lib/workos/types/magic_auth_challenge_struct.rb +12 -0
  10. data/lib/workos/types/organization_membership_struct.rb +15 -0
  11. data/lib/workos/types/user_struct.rb +17 -0
  12. data/lib/workos/types.rb +9 -5
  13. data/lib/workos/user.rb +57 -0
  14. data/lib/workos/user_and_token.rb +29 -0
  15. data/lib/workos/user_management.rb +1008 -0
  16. data/lib/workos/user_response.rb +25 -0
  17. data/lib/workos/version.rb +1 -1
  18. data/lib/workos.rb +17 -12
  19. data/spec/lib/workos/user_management_spec.rb +1092 -0
  20. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_code/invalid.yml +84 -0
  21. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_code/valid.yml +82 -0
  22. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_email_verification/invalid.yml +83 -0
  23. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_email_verification/valid.yml +81 -0
  24. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_magic_auth/invalid.yml +82 -0
  25. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_magic_auth/valid.yml +82 -0
  26. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_organization_selection/invalid.yml +81 -0
  27. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_organization_selection/valid.yml +82 -0
  28. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_password/invalid.yml +82 -0
  29. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_password/valid.yml +82 -0
  30. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_totp/invalid.yml +83 -0
  31. data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_totp/valid.yml +81 -0
  32. data/spec/support/fixtures/vcr_cassettes/user_management/confirm_password_reset/invalid.yml +82 -0
  33. data/spec/support/fixtures/vcr_cassettes/user_management/confirm_password_reset/valid.yml +82 -0
  34. data/spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/invalid.yml +83 -0
  35. data/spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/valid.yml +82 -0
  36. data/spec/support/fixtures/vcr_cassettes/user_management/create_user_invalid.yml +83 -0
  37. data/spec/support/fixtures/vcr_cassettes/user_management/create_user_valid.yml +82 -0
  38. data/spec/support/fixtures/vcr_cassettes/user_management/delete_organization_membership/invalid.yml +82 -0
  39. data/spec/support/fixtures/vcr_cassettes/user_management/delete_organization_membership/valid.yml +78 -0
  40. data/spec/support/fixtures/vcr_cassettes/user_management/delete_user/invalid.yml +82 -0
  41. data/spec/support/fixtures/vcr_cassettes/user_management/delete_user/valid.yml +78 -0
  42. data/spec/support/fixtures/vcr_cassettes/user_management/enroll_auth_factor/invalid.yml +82 -0
  43. data/spec/support/fixtures/vcr_cassettes/user_management/enroll_auth_factor/valid.yml +82 -0
  44. data/spec/support/fixtures/vcr_cassettes/user_management/get_invitation/invalid.yml +82 -0
  45. data/spec/support/fixtures/vcr_cassettes/user_management/get_invitation/valid.yml +82 -0
  46. data/spec/support/fixtures/vcr_cassettes/user_management/get_organization_membership.yml +82 -0
  47. data/spec/support/fixtures/vcr_cassettes/user_management/get_user.yml +82 -0
  48. data/spec/support/fixtures/vcr_cassettes/user_management/list_auth_factors/invalid.yml +82 -0
  49. data/spec/support/fixtures/vcr_cassettes/user_management/list_auth_factors/valid.yml +82 -0
  50. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_after.yml +83 -0
  51. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_before.yml +83 -0
  52. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_limit.yml +83 -0
  53. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_no_options.yml +83 -0
  54. data/spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_organization_id.yml +83 -0
  55. data/spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/no_options.yml +82 -0
  56. data/spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/with_options.yml +82 -0
  57. data/spec/support/fixtures/vcr_cassettes/user_management/list_users/no_options.yml +82 -0
  58. data/spec/support/fixtures/vcr_cassettes/user_management/list_users/with_options.yml +82 -0
  59. data/spec/support/fixtures/vcr_cassettes/user_management/reset_password/invalid.yml +82 -0
  60. data/spec/support/fixtures/vcr_cassettes/user_management/reset_password/valid.yml +82 -0
  61. data/spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/invalid.yml +82 -0
  62. data/spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/valid.yml +82 -0
  63. data/spec/support/fixtures/vcr_cassettes/user_management/send_invitation/invalid.yml +82 -0
  64. data/spec/support/fixtures/vcr_cassettes/user_management/send_invitation/valid.yml +82 -0
  65. data/spec/support/fixtures/vcr_cassettes/user_management/send_magic_auth_code/valid.yml +82 -0
  66. data/spec/support/fixtures/vcr_cassettes/user_management/send_password_reset_email/invalid.yml +83 -0
  67. data/spec/support/fixtures/vcr_cassettes/user_management/send_password_reset_email/valid.yml +82 -0
  68. data/spec/support/fixtures/vcr_cassettes/user_management/send_verification_email/invalid.yml +82 -0
  69. data/spec/support/fixtures/vcr_cassettes/user_management/send_verification_email/valid.yml +82 -0
  70. data/spec/support/fixtures/vcr_cassettes/user_management/update_user/invalid.yml +82 -0
  71. data/spec/support/fixtures/vcr_cassettes/user_management/update_user/valid.yml +82 -0
  72. data/spec/support/fixtures/vcr_cassettes/user_management/update_user_password/invalid.yml +82 -0
  73. data/spec/support/fixtures/vcr_cassettes/user_management/update_user_password/valid.yml +82 -0
  74. data/spec/support/fixtures/vcr_cassettes/user_management/verify_email/invalid_code.yml +83 -0
  75. data/spec/support/fixtures/vcr_cassettes/user_management/verify_email/invalid_magic_auth_challenge.yml +82 -0
  76. data/spec/support/fixtures/vcr_cassettes/user_management/verify_email/valid.yml +82 -0
  77. data/workos.gemspec +0 -1
  78. metadata +131 -49
  79. data/bin/docs +0 -5
  80. data/docs/WorkOS/APIError.html +0 -160
  81. data/docs/WorkOS/AuditLog.html +0 -235
  82. data/docs/WorkOS/AuditTrail.html +0 -235
  83. data/docs/WorkOS/AuthenticationError.html +0 -160
  84. data/docs/WorkOS/Base.html +0 -287
  85. data/docs/WorkOS/Client.html +0 -504
  86. data/docs/WorkOS/InvalidRequestError.html +0 -160
  87. data/docs/WorkOS/Profile.html +0 -788
  88. data/docs/WorkOS/RequestError.html +0 -135
  89. data/docs/WorkOS/SSO.html +0 -691
  90. data/docs/WorkOS/Types/ProfileStruct.html +0 -135
  91. data/docs/WorkOS/Types/Provider.html +0 -135
  92. data/docs/WorkOS/Types.html +0 -128
  93. data/docs/WorkOS/WorkOSError.html +0 -447
  94. data/docs/WorkOS.html +0 -324
  95. data/docs/class_list.html +0 -51
  96. data/docs/css/common.css +0 -1
  97. data/docs/css/full_list.css +0 -58
  98. data/docs/css/style.css +0 -496
  99. data/docs/file.README.html +0 -252
  100. data/docs/file_list.html +0 -56
  101. data/docs/frames.html +0 -17
  102. data/docs/index.html +0 -250
  103. data/docs/js/app.js +0 -314
  104. data/docs/js/full_list.js +0 -216
  105. data/docs/js/jquery.js +0 -4
  106. data/docs/method_list.html +0 -267
  107. data/docs/top-level-namespace.html +0 -110
  108. data/lib/workos/audit_trail.rb +0 -111
  109. data/spec/lib/workos/audit_trail_spec.rb +0 -146
@@ -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":"client_123","client_secret":"<API_KEY>","email":"invalid@workos.app","password":"invalid","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":"password"}'
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
+ - Tue, 29 Aug 2023 00:24:25 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7fe0a6a5aff008df-SEA
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"68-vJ+qM+jhqT7OYdncb+ks9c+Wbao"
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
+ - 0ed3cdf7-03f9-4b37-bbc8-b86834679ed9
67
+ X-Xss-Protection:
68
+ - "0"
69
+ Set-Cookie:
70
+ - __cf_bm=_uZ1fHEnPVRWYuwQtAju5yf86eP5qqgBjNwvB2Albts-1693268665-0-Ads+iW6svcBYUZvMoNJBzxcUx+KQnhea78QwLCa2DUxT70OtGFXL95y+5BVHtkU4+a0vq1478vpuWzCr/dUzHls=;
71
+ path=/; expires=Tue, 29-Aug-23 00:54:25 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=beafd87202de7b7d34fd4a1af55696cb5d19364d-1693268665; 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: ''other@blips.app''.","code":"entity_not_found","entity_id":"other@blips.app"}'
80
+ http_version:
81
+ recorded_at: Tue, 29 Aug 2023 00:24:25 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/user_management/authenticate
6
+ body:
7
+ encoding: UTF-8
8
+ string:
9
+ '{"client_id":"client_123","client_secret":"<API_KEY>","email":"test@workos.app","password":"7YtYic00VWcXatPb","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":"password"}'
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
+ - Tue, 29 Aug 2023 00:24:25 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7fe0a6a27b0bc39c-SEA
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"16e-hoaHaR0EhmAH7TaNBOF8B2OHJq4"
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
+ - 62990367-ddaf-46b3-a32f-38fc4f29d581
67
+ X-Xss-Protection:
68
+ - "0"
69
+ Set-Cookie:
70
+ - __cf_bm=IiwoT1XAlPdVWj334oRTocU7zZyvKgYw61o0UoA7GtE-1693268665-0-AZTn/iGDfGV6R5j3aj7lcPod7FB9P3cbHc9pD1oN/U5ZmnUYvpCecp6AL+8p/+/bMuwwGqXGNMSa/eIpa0TVm+I=;
71
+ path=/; expires=Tue, 29-Aug-23 00:54:25 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=beafd87202de7b7d34fd4a1af55696cb5d19364d-1693268665; 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_01H7TVSKS45SDHN5V9XPSM6H44","email":"test@workos.app","email_verified":true,"first_name":null,"last_name":null,"created_at":"2023-08-14T20:28:58.929Z","updated_at":"2023-08-28T15:56:19.798Z","user_type":"unmanaged","email_verified_at":"2023-08-22T11:18:01.850Z","google_oauth_profile_id":null,"microsoft_oauth_profile_id":null}}'
80
+ http_version:
81
+ recorded_at: Tue, 29 Aug 2023 00:24:25 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:mfa-totp", "pending_authentication_token="pending_authentication_token_1234", "authentication_challenge_id": "authentication_challenge_id_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:mfa-totp", "pending_authentication_token="pending_authentication_token_1234", "authentication_challenge_id": "authentication_challenge_id_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
@@ -0,0 +1,82 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.workos.com/user_management/password_reset/confirm
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"token":"bogus_token","new_password":"new_password"}'
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-darwin23; v2.16.0
18
+ Authorization:
19
+ - 'Bearer '
20
+ response:
21
+ status:
22
+ code: 401
23
+ message: Unauthorized
24
+ headers:
25
+ Date:
26
+ - Sat, 25 Nov 2023 21:46:08 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - '26'
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 82bd15298d6aa562-GRU
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"1a-pljHtlo127JYJR4E/RYOPb6ucbw"
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
+ - f1a0b3f8-67fb-4885-81f8-18a40a4dd2c5
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=bOqLLKZ3OqpZ3OPfDa2w7klrkJKdkS9Y9apX.l.nSYU-1700948768-0-AbdBkjCZaXQcftSAC9N6KB1K0k2BGHaZZkJ2fqyngyDfWsGZiI9MnCe7HXBU8jhuevFp6MC8kxfWFY3tgW2hFZI=;
71
+ path=/; expires=Sat, 25-Nov-23 22:16:08 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=7aeaa81f9fe2d2f5c00011adcc897a137e871796-1700948768; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: UTF-8
79
+ string: '{"message":"Unauthorized"}'
80
+ http_version:
81
+ recorded_at: Sat, 25 Nov 2023 21:46:08 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/user_management/password_reset/confirm
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"token":"eEgAgvAE0blvU1zWV3yWVAD22","new_password":"very_cool_new_pa$$word"}'
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-darwin23; v2.16.0
18
+ Authorization:
19
+ - 'Bearer '
20
+ response:
21
+ status:
22
+ code: 401
23
+ message: Unauthorized
24
+ headers:
25
+ Date:
26
+ - Sat, 25 Nov 2023 21:46:08 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - '26'
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 82bd15254f97a56e-GRU
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"1a-pljHtlo127JYJR4E/RYOPb6ucbw"
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
+ - 7b813ca7-add6-4a7f-a7de-62b6a888543a
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=hmCZ.6OoiqzmwuUv6cpz.7XUdZcGTwNtfljW2v0dgPU-1700948768-0-ARWxWopNivTNFw8yWMnXuWh02wkLM9ahNWpAbgpDrKDdgzjMG7NPI1AQS81qrJakN4McyBudLtMYxrrVSoLm0I0=;
71
+ path=/; expires=Sat, 25-Nov-23 22:16:08 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=7aeaa81f9fe2d2f5c00011adcc897a137e871796-1700948768; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: UTF-8
79
+ string: '{"message":"Unauthorized"}'
80
+ http_version:
81
+ recorded_at: Sat, 25 Nov 2023 21:46:07 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/organization_memberships
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"user_id":"","organization_id":""}'
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-darwin22; v2.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 422
23
+ message: Unprocessable Entity
24
+ headers:
25
+ Date:
26
+ - Wed, 16 Aug 2023 22:20:27 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - '159'
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7f7d108dbb190c96-EWR
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"9f-BfzHwYu4Bw+fPyyn8hWTmMF4Lio"
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
+ - 2613d428-dfcc-4a40-8a32-d8b5634ad25e
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=A.5rC7UV26nOVmm0JDUdbBqITMPrX4eH4TaWgNTR8vw-1692224427-0-Abv9MzVBcqqhkKXLp7mgiOMgg+6rW9W3BKhbbhAR3P3msKzRNGsvztll65omw63yshr4A4S4FTvipQJGajpKRws=;
71
+ path=/; expires=Wed, 16-Aug-23 22:50:27 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=e57296bbc6ac05c18bc3a943f7bfc936fa954094-1692224427; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: UTF-8
79
+ string: '{"code":"invalid_request_parameters","message":"Validation failed","errors":[{"code":"user_id_string_required","message":"User ID
80
+ should be a non-empty string."}]}'
81
+ http_version:
82
+ recorded_at: Wed, 16 Aug 2023 22:20:27 GMT
83
+ 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/organization_memberships
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"user_id":"user_01H5JQDV7R7ATEYZDEG0W5PRYS","organization_id":"org_01H5JQDV7R7ATEYZDEG0W5PRYS"}'
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-darwin22; v2.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Date:
26
+ - Thu, 17 Aug 2023 14:20:07 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - '335'
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7f828e50ac5dc41d-EWR
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"14f-2n2KgFcHBXf1Yz7SYqzpAxR3E/E"
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
+ - 8d277b87-b703-40d2-95ac-5f40bf96fcbf
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=Pd2y8tPXDzQthhv7HAd93AsNAjT9V0tbWdH6PzS_iyA-1692282007-0-AUsV9W08vMNk02vMMYwMWj3KVIAJtXMGZdhGaWVL9yL3e4S5D1cGL2925nELffPsxoejtsVqyeqdvIixzD7UnL8=;
71
+ path=/; expires=Thu, 17-Aug-23 14:50:07 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=432b4f1724bbd993a76e1e2e8c4d5e2381680fb1-1692282007; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: UTF-8
79
+ string: '{"object":"organization_membership","id":"om_01H5JQDV7R7ATEYZDEG0W5PRYS","user_id":"user_01H5JQDV7R7ATEYZDEG0W5PRYS","organization_id":"organization_01H5JQDV7R7ATEYZDEG0W5PRYS","created_at":"2023-07-18T02:07:19.911Z","updated_at":"2023-07-18T02:07:19.911Z"}'
80
+ http_version:
81
+ recorded_at: Thu, 17 Aug 2023 14:20:07 GMT
82
+ recorded_with: VCR 5.0.0