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,83 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.workos.com/user_management/users
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"email":"","password":null,"first_name":null,"last_name":null,"email_verified":null}'
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":"email_string_required","message":"Email
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/users
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"email":"foo@example.com","password":null,"first_name":"Foo","last_name":"Bar","email_verified":true}'
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":"user","id":"user_01H81XWBPCV7Y9Q3DHCZHZ9SF8","email":"foo@example.com","first_name":"Foo","last_name":"Bar","created_at":"2023-08-17T14:20:07.199Z","updated_at":"2023-08-17T14:20:07.199Z","email_verified":true}'
80
+ http_version:
81
+ recorded_at: Thu, 17 Aug 2023 14:20:07 GMT
82
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,82 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.workos.com/user_management/organization_memberships/invalid
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.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 404
23
+ message: Not Found
24
+ headers:
25
+ Date:
26
+ - Fri, 25 Aug 2023 21:38:47 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7fc6fbe4ef26ec80-SEA
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"58-5GtYccQgavNavjEU+gaKkOl1gq4"
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
+ - f3bf3ce2-ed1c-4fdf-9bba-065c2ab4e5e3
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=VyJvcfBZAdCVUhGKRtHsl9enJXaR64T8urur5ClUQWY-1692999527-0-AahBwhyZ59RlA2LkZ5bsanqtnkJWCPSngTzr7vokapEBcsZzjppDl90U6KcM3t3w2iZ0p7uHvZZ5zI0G74Wlmg4=;
71
+ path=/; expires=Fri, 25-Aug-23 22:08:47 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=1a7b02324f49135ba91ab0fc79714ad620549ae5-1692999527; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: ASCII-8BIT
79
+ string: '{"message":"Organization Membership not found: ''invalid''.","code":"entity_not_found","entity_id":"invalid"}'
80
+ http_version:
81
+ recorded_at: Fri, 25 Aug 2023 21:38:47 GMT
82
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,78 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.workos.com/user_management/organization_memberships/om_01H5JQDV7R7ATEYZDEG0W5PRYS
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.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Fri, 25 Aug 2023 21:34:33 GMT
27
+ Content-Length:
28
+ - '0'
29
+ Connection:
30
+ - keep-alive
31
+ Cf-Ray:
32
+ - 7fc6f5b3099d27a1-SEA
33
+ Cf-Cache-Status:
34
+ - DYNAMIC
35
+ Strict-Transport-Security:
36
+ - max-age=15552000; includeSubDomains
37
+ Vary:
38
+ - Origin, Accept-Encoding
39
+ Via:
40
+ - 1.1 spaces-router (devel)
41
+ Access-Control-Allow-Credentials:
42
+ - 'true'
43
+ Content-Security-Policy:
44
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
45
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
46
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
47
+ Expect-Ct:
48
+ - max-age=0
49
+ Referrer-Policy:
50
+ - no-referrer
51
+ X-Content-Type-Options:
52
+ - nosniff
53
+ X-Dns-Prefetch-Control:
54
+ - 'off'
55
+ X-Download-Options:
56
+ - noopen
57
+ X-Frame-Options:
58
+ - SAMEORIGIN
59
+ X-Permitted-Cross-Domain-Policies:
60
+ - none
61
+ X-Request-Id:
62
+ - 4360f118-e0a2-4268-b151-8d1937827fd6
63
+ X-Xss-Protection:
64
+ - '0'
65
+ Set-Cookie:
66
+ - __cf_bm=oqV.TgF_9o3H.4tP5C9YodhA7dHiTLAoyxSgwfAobDU-1692999273-0-Abnb1JhKF9MP9ocItBnZFluz3W6rf1OEScevjc0NSioiyzuNkPdZLYPhsH0i388aVh6BWD+iLCQW3WgdYviU0DE=;
67
+ path=/; expires=Fri, 25-Aug-23 22:04:33 GMT; domain=.workos.com; HttpOnly;
68
+ Secure; SameSite=None
69
+ - __cfruid=74c71c5ec19f5cb375dcedb89bcdb04a1d40efd6-1692999273; path=/; domain=.workos.com;
70
+ HttpOnly; Secure; SameSite=None
71
+ Server:
72
+ - cloudflare
73
+ body:
74
+ encoding: UTF-8
75
+ string: ''
76
+ http_version:
77
+ recorded_at: Fri, 25 Aug 2023 21:34:33 GMT
78
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,82 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.workos.com/user_management/users/invalid
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.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 404
23
+ message: Not Found
24
+ headers:
25
+ Date:
26
+ - Fri, 25 Aug 2023 21:38:47 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7fc6fbe4ef26ec80-SEA
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"58-5GtYccQgavNavjEU+gaKkOl1gq4"
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
+ - f3bf3ce2-ed1c-4fdf-9bba-065c2ab4e5e3
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=VyJvcfBZAdCVUhGKRtHsl9enJXaR64T8urur5ClUQWY-1692999527-0-AahBwhyZ59RlA2LkZ5bsanqtnkJWCPSngTzr7vokapEBcsZzjppDl90U6KcM3t3w2iZ0p7uHvZZ5zI0G74Wlmg4=;
71
+ path=/; expires=Fri, 25-Aug-23 22:08:47 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=1a7b02324f49135ba91ab0fc79714ad620549ae5-1692999527; 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: ''invalid''.","code":"entity_not_found","entity_id":"invalid"}'
80
+ http_version:
81
+ recorded_at: Fri, 25 Aug 2023 21:38:47 GMT
82
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,78 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.workos.com/user_management/users/user_01H7WRJBPAAHX1BYRQHEK7QC4A
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.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Fri, 25 Aug 2023 21:34:33 GMT
27
+ Content-Length:
28
+ - '0'
29
+ Connection:
30
+ - keep-alive
31
+ Cf-Ray:
32
+ - 7fc6f5b3099d27a1-SEA
33
+ Cf-Cache-Status:
34
+ - DYNAMIC
35
+ Strict-Transport-Security:
36
+ - max-age=15552000; includeSubDomains
37
+ Vary:
38
+ - Origin, Accept-Encoding
39
+ Via:
40
+ - 1.1 spaces-router (devel)
41
+ Access-Control-Allow-Credentials:
42
+ - 'true'
43
+ Content-Security-Policy:
44
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
45
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
46
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
47
+ Expect-Ct:
48
+ - max-age=0
49
+ Referrer-Policy:
50
+ - no-referrer
51
+ X-Content-Type-Options:
52
+ - nosniff
53
+ X-Dns-Prefetch-Control:
54
+ - 'off'
55
+ X-Download-Options:
56
+ - noopen
57
+ X-Frame-Options:
58
+ - SAMEORIGIN
59
+ X-Permitted-Cross-Domain-Policies:
60
+ - none
61
+ X-Request-Id:
62
+ - 4360f118-e0a2-4268-b151-8d1937827fd6
63
+ X-Xss-Protection:
64
+ - '0'
65
+ Set-Cookie:
66
+ - __cf_bm=oqV.TgF_9o3H.4tP5C9YodhA7dHiTLAoyxSgwfAobDU-1692999273-0-Abnb1JhKF9MP9ocItBnZFluz3W6rf1OEScevjc0NSioiyzuNkPdZLYPhsH0i388aVh6BWD+iLCQW3WgdYviU0DE=;
67
+ path=/; expires=Fri, 25-Aug-23 22:04:33 GMT; domain=.workos.com; HttpOnly;
68
+ Secure; SameSite=None
69
+ - __cfruid=74c71c5ec19f5cb375dcedb89bcdb04a1d40efd6-1692999273; path=/; domain=.workos.com;
70
+ HttpOnly; Secure; SameSite=None
71
+ Server:
72
+ - cloudflare
73
+ body:
74
+ encoding: UTF-8
75
+ string: ''
76
+ http_version:
77
+ recorded_at: Fri, 25 Aug 2023 21:34:33 GMT
78
+ 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/users/user_01H7TVSKS45SDHN5V9XPSM6H44/auth_factors
6
+ body:
7
+ encoding: US-ASCII
8
+ string: '{"type":"totp"}'
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 '
20
+ response:
21
+ status:
22
+ code: 400
23
+ message: Bad Request
24
+ headers:
25
+ Date:
26
+ - Thu, 31 Aug 2023 23:40:52 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - '26'
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7ff91efd88d838e1-YYZ
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
+ - 8eae4ac4-8213-4f3f-966f-a2421a113bf8
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=M_MJukGgDu7U9.wmReWdBW.NzCb1vSBzW1fvbnNPkMo-1693525252-0-AUtIKPsJjb1vSM1Q+ny4TPcpo5BpudZWt0gRLw9x5pZpvSPmYrftp68dc2cjpbRaKieTinfRpgEccLO5HiThNbQ=;
71
+ path=/; expires=Fri, 01-Sep-23 00:10:52 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=8d5f43bf29ca9bafc65d9794d1c54d31c49ef1bf-1693525252; 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: Thu, 31 Aug 2023 23:40:52 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/users/user_01H7TVSKS45SDHN5V9XPSM6H44/auth_factors
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"type":"totp"}'
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.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Fri, 25 Aug 2023 23:37:04 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7fc7a9287d0330ba-SEA
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"153-w5d8Z7u7b9Obt9NziECtNSAY9Ac"
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
+ - b333b9e1-c9ec-4e99-ae4f-17a854859cf1
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=adC6w3NUNGTpdZDzNn39guANJ9wi798uCuqc_EI8190-1693006624-0-AcpsuyzFE/KdM7ev5pSVTt2vnGqCSZBOuQYZ0iKFiJT0mBlAuNITn3hICEKvcZ4LH7JUIyjnEOWfq2w7JyRmrJ4=;
71
+ path=/; expires=Sat, 26-Aug-23 00:07:04 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=1d0cc3edf886cc7b90bd0c9c3226f5611a385c1a-1693006624; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: ASCII-8BIT
79
+ string: '{ "authentication_factor": { "object": "authentication_factor", "id": "auth_factor_01H96FETXENNY99ARX0GRC804C", "user_id": "user_01H96FETWYSJMJEGF0Q3ZB272F", "type": "totp", "totp": { "issuer": "Foo Corp", "qr_code": "data:image/png;base64,iVBOR...", "secret": "OFAFOQAPHR6XMQKAIYMWU72XIE3DGI3P", "uri": "otpauth://totp/Foo%20Corp:user@foo-corp.com?secret=OFAFOQAPHR6XMQKAIYMWU72XIE3DGI3P&issuer=Foo%20Corp&algorithm=SHA1&digits=6&period=30", "user": "user@foo-corp.com" }, "created_at": "2023-08-31T18:59:57.962Z", "updated_at": "2023-08-31T18:59:57.962Z" }, "authentication_challenge": { "object": "authentication_challenge", "id": "auth_challenge_01H96FETXGTW1QMBSBT2T36PW0", "authentication_factor_id": "auth_factor_01H96FETXENNY99ARX0GRC804C", "expires_at": "2023-08-31T19:09:57.999Z", "created_at": "2023-08-31T18:59:57.962Z", "updated_at": "2023-08-31T18:59:57.962Z" } }'
80
+ http_version:
81
+ recorded_at: Fri, 25 Aug 2023 23:37:04 GMT
82
+ recorded_with: VCR 5.0.0