workos 5.3.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -1
- data/.github/workflows/ci.yml +2 -4
- data/.github/workflows/lint-pr-title.yml +20 -0
- data/.github/workflows/release-please.yml +25 -0
- data/.github/workflows/release.yml +22 -25
- data/.gitignore +1 -0
- data/.release-please-manifest.json +3 -0
- data/.rubocop.yml +11 -8
- data/.rubocop_todo.yml +94 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +32 -18
- data/Rakefile +8 -0
- data/context7.json +4 -0
- data/lib/workos/authentication_response.rb +32 -4
- data/lib/workos/cache.rb +94 -0
- data/lib/workos/client.rb +9 -1
- data/lib/workos/directory_sync.rb +1 -1
- data/lib/workos/directory_user.rb +31 -3
- data/lib/workos/encryptors/aes_gcm.rb +49 -0
- data/lib/workos/encryptors.rb +9 -0
- data/lib/workos/errors.rb +4 -0
- data/lib/workos/feature_flag.rb +34 -0
- data/lib/workos/mfa.rb +0 -1
- data/lib/workos/oauth_tokens.rb +29 -0
- data/lib/workos/organization.rb +14 -1
- data/lib/workos/organization_membership.rb +5 -1
- data/lib/workos/organizations.rb +87 -3
- data/lib/workos/profile.rb +10 -2
- data/lib/workos/refresh_authentication_response.rb +29 -2
- data/lib/workos/role.rb +38 -0
- data/lib/workos/session.rb +187 -0
- data/lib/workos/sso.rb +3 -24
- data/lib/workos/types/intent.rb +3 -1
- data/lib/workos/types/provider.rb +1 -1
- data/lib/workos/types/widget_scope.rb +15 -0
- data/lib/workos/types.rb +1 -0
- data/lib/workos/user.rb +7 -1
- data/lib/workos/user_management/session.rb +57 -0
- data/lib/workos/user_management.rb +213 -45
- data/lib/workos/version.rb +1 -1
- data/lib/workos/widgets.rb +46 -0
- data/lib/workos.rb +8 -0
- data/release-please-config.json +12 -0
- data/spec/lib/workos/cache_spec.rb +94 -0
- data/spec/lib/workos/directory_user_spec.rb +13 -3
- data/spec/lib/workos/encryptors/aes_gcm_spec.rb +41 -0
- data/spec/lib/workos/organizations_spec.rb +258 -1
- data/spec/lib/workos/portal_spec.rb +30 -0
- data/spec/lib/workos/role_spec.rb +142 -0
- data/spec/lib/workos/session_spec.rb +475 -0
- data/spec/lib/workos/sso_spec.rb +106 -5
- data/spec/lib/workos/user_management_spec.rb +496 -1
- data/spec/lib/workos/widgets_spec.rb +73 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_user.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/organization/create_with_external_id.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/organization/list_organization_feature_flags.yml +78 -0
- data/spec/support/fixtures/vcr_cassettes/organization/list_organization_roles.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/organization/update_with_external_id.yml +78 -0
- data/spec/support/fixtures/vcr_cassettes/organization/update_with_external_id_null.yml +78 -0
- data/spec/support/fixtures/vcr_cassettes/organization/update_with_stripe_customer_id.yml +78 -0
- data/spec/support/fixtures/vcr_cassettes/organization/update_without_name.yml +85 -0
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_certificate_renewal.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_domain_verification.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/profile.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_code/valid_with_oauth_tokens.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_password/unverified.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_refresh_token/valid.yml +79 -78
- data/spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/valid_multiple_roles.yml +76 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/create_user_with_external_id.yml +77 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/get_user.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/user_management/list_sessions/valid.yml +38 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/accepted.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/expired.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/invalid.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/revoked.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/valid.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/reset_password/valid.yml +1 -1
- data/spec/support/fixtures/vcr_cassettes/user_management/update_organization_membership/valid_multiple_roles.yml +76 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/update_user/email.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/update_user/locale.yml +76 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/update_user/valid.yml +2 -2
- data/spec/support/fixtures/vcr_cassettes/user_management/update_user_external_id_null.yml +77 -0
- data/spec/support/fixtures/vcr_cassettes/widgets/get_token.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/widgets/get_token_invalid_organization_id.yml +74 -0
- data/spec/support/fixtures/vcr_cassettes/widgets/get_token_invalid_user_id.yml +74 -0
- data/spec/support/profile.txt +1 -1
- data/workos.gemspec +7 -3
- metadata +132 -10
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.workos.com/portal/generate_link
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
8
|
+
string: '{"intent":"domain_verification","organization":"org_01EHQMYV6MBK39QC5PZXHY59C3","return_url":null,"success_url":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/2.7.1; x86_64-darwin19; v0.5.0
|
|
18
|
+
Authorization:
|
|
19
|
+
- Bearer <API_KEY>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 201
|
|
23
|
+
message: Created
|
|
24
|
+
headers:
|
|
25
|
+
Server:
|
|
26
|
+
- Cowboy
|
|
27
|
+
Connection:
|
|
28
|
+
- keep-alive
|
|
29
|
+
Vary:
|
|
30
|
+
- Origin, Accept-Encoding
|
|
31
|
+
Access-Control-Allow-Credentials:
|
|
32
|
+
- 'true'
|
|
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
|
+
X-Request-Id:
|
|
56
|
+
- cb9ad5cf-243a-4084-a4f6-2d7d2b097b8b
|
|
57
|
+
Content-Type:
|
|
58
|
+
- application/json; charset=utf-8
|
|
59
|
+
Content-Length:
|
|
60
|
+
- '79'
|
|
61
|
+
Etag:
|
|
62
|
+
- W/"4f-NN86NUZRu/GQgPAYTexTS6/9DnM"
|
|
63
|
+
Date:
|
|
64
|
+
- Wed, 09 Sep 2020 23:43:07 GMT
|
|
65
|
+
Via:
|
|
66
|
+
- 1.1 vegur
|
|
67
|
+
body:
|
|
68
|
+
encoding: UTF-8
|
|
69
|
+
string: '{"link":"https://id.workos.com/portal/launch?secret=secret"}'
|
|
70
|
+
http_version:
|
|
71
|
+
recorded_at: Wed, 09 Sep 2020 23:43:07 GMT
|
|
72
|
+
recorded_with: VCR 5.0.0
|
|
@@ -67,7 +67,7 @@ http_interactions:
|
|
|
67
67
|
body:
|
|
68
68
|
encoding: UTF-8
|
|
69
69
|
string:
|
|
70
|
-
'{"object":"profile","id":"prof_01EEJTY9SZ1R350RB7B73SNBKF","organization_id":"org_01FG53X8636WSNW2WEKB2C31ZB","connection_id":"conn_01E83FVYZHY7DM4S9503JHV0R5","connection_type":"GoogleOAuth","idp_id":"116485463307139932699","email":"bob.loblaw@workos.com","first_name":"Bob","last_name":"Loblaw","raw_attributes":{"hd":"workos.com","id":"116485463307139932699","name":"Bob
|
|
70
|
+
'{"object":"profile","id":"prof_01EEJTY9SZ1R350RB7B73SNBKF","organization_id":"org_01FG53X8636WSNW2WEKB2C31ZB","connection_id":"conn_01E83FVYZHY7DM4S9503JHV0R5","connection_type":"GoogleOAuth","idp_id":"116485463307139932699","email":"bob.loblaw@workos.com","first_name":"Bob","last_name":"Loblaw","role":{"slug":"member"},"roles":[{"slug":"member"}],"custom_attributes":{},"raw_attributes":{"hd":"workos.com","id":"116485463307139932699","name":"Bob
|
|
71
71
|
Loblaw","email":"bob.loblaw@workos.com","locale":"en","picture":"https://lh3.googleusercontent.com/a-/AOh14GyO2hLlgZvteDQ3Ldi3_-RteZLya0hWH7247Cam=s96-c","given_name":"Bob","family_name":"Loblaw","verified_email":true}}'
|
|
72
72
|
http_version:
|
|
73
73
|
recorded_at: Tue, 18 May 2021 22:55:21 GMT
|
|
@@ -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"},"access_token":"<ACCESS_TOKEN>","refresh_token":"<REFRESH_TOKEN>","oauth_tokens":{"access_token":"oauth_access_token","refresh_token":"oauth_refresh_token","scopes":["read","write"],"expires_at":1234567890}}'
|
|
80
|
+
http_version:
|
|
81
|
+
recorded_at: Wed, 30 Aug 2023 19:51:51 GMT
|
|
82
|
+
recorded_with: VCR 5.0.0
|
data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_password/unverified.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
|
+
'{"client_id":"client_123","client_secret":"<API_KEY>","email":"unverified@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: 403
|
|
23
|
+
message: Email ownership must be verified before authentication.
|
|
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: '{"code":"email_verification_required", "message":"Email ownership must be verified before authentication.", "email":"unverified@workos.app", "pending_authentication_token":"RWx94aFHwanPOebv7tKbBkJm0", "email_verification_id":"email_verification_01JG43A0WYAFAPHMNBV5XF2R4M"}'
|
|
80
|
+
http_version:
|
|
81
|
+
recorded_at: Tue, 29 Aug 2023 00:24:25 GMT
|
|
82
|
+
recorded_with: VCR 5.0.0
|
data/spec/support/fixtures/vcr_cassettes/user_management/authenticate_with_refresh_token/valid.yml
CHANGED
|
@@ -1,81 +1,82 @@
|
|
|
1
1
|
---
|
|
2
2
|
http_interactions:
|
|
3
|
-
- request:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.workos.com/user_management/authenticate
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
8
|
+
string:
|
|
9
|
+
'{"refresh_token":"some_refresh_token","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":"refresh_token"}'
|
|
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.2.2; arm64-darwin22; v4.0.0
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
24
|
+
headers:
|
|
25
|
+
Date:
|
|
26
|
+
- Mon, 18 Mar 2024 19:00:53 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Transfer-Encoding:
|
|
30
|
+
- chunked
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
Cf-Ray:
|
|
34
|
+
- 866777d63b4627e8-SLC
|
|
35
|
+
Cf-Cache-Status:
|
|
36
|
+
- DYNAMIC
|
|
37
|
+
Etag:
|
|
38
|
+
- W/"335-M3MDQYhs5724SayBHHCwnBDn3qA"
|
|
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
|
+
- 995ed1ed-e892-4049-86c9-0e07baa6cc4b
|
|
67
|
+
X-Xss-Protection:
|
|
68
|
+
- '0'
|
|
69
|
+
Set-Cookie:
|
|
70
|
+
- __cf_bm=2NHqv1cd1BisOc8KKcQ0oNzFxZZT4OHQd6c2QDuGnUU-1710788453-1.0.1.1-4BxBRzVrhL7rCH895PcfORXr_6Rnj3Oh5w1YG4xi7X1st62LMzb5dHZO7u7P.V1P8nBDAAt3Wbz7xsDTWrfWJg;
|
|
71
|
+
path=/; expires=Mon, 18-Mar-24 19:30:53 GMT; domain=.workos.com; HttpOnly;
|
|
72
|
+
Secure; SameSite=None
|
|
73
|
+
- __cfruid=06035c17e9b60a1d7a42a5b568146a0bb71a06dc-1710788453; path=/; domain=.workos.com;
|
|
74
|
+
HttpOnly; Secure; SameSite=None
|
|
75
|
+
Server:
|
|
76
|
+
- cloudflare
|
|
77
|
+
body:
|
|
78
|
+
encoding: UTF-8
|
|
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},"access_token":"<ACCESS_TOKEN>","refresh_token":"<REFRESH_TOKEN>"}'
|
|
80
|
+
http_version:
|
|
81
|
+
recorded_at: Mon, 18 Mar 2024 19:00:53 GMT
|
|
81
82
|
recorded_with: VCR 5.0.0
|
|
@@ -0,0 +1,76 @@
|
|
|
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","role_slugs":["admin","member"]}'
|
|
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.1.4; arm64-darwin24; v5.25.0
|
|
18
|
+
Authorization:
|
|
19
|
+
- Bearer <API_KEY>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 201
|
|
23
|
+
message: Created
|
|
24
|
+
headers:
|
|
25
|
+
Date:
|
|
26
|
+
- Mon, 06 Oct 2025 19:57:34 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Content-Length:
|
|
30
|
+
- '26'
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
Server:
|
|
34
|
+
- cloudflare
|
|
35
|
+
Cf-Ray:
|
|
36
|
+
- 98a7ba7fea91ead7-ORD
|
|
37
|
+
Cf-Cache-Status:
|
|
38
|
+
- DYNAMIC
|
|
39
|
+
Etag:
|
|
40
|
+
- W/"1a-pljHtlo127JYJR4E/RYOPb6ucbw"
|
|
41
|
+
Strict-Transport-Security:
|
|
42
|
+
- max-age=15552000; includeSubDomains
|
|
43
|
+
Vary:
|
|
44
|
+
- Origin, Accept-Encoding
|
|
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
|
+
- 6507807d-d3b9-4e8f-9ca8-f84c6f9c6eb4
|
|
67
|
+
X-Xss-Protection:
|
|
68
|
+
- '0'
|
|
69
|
+
Set-Cookie:
|
|
70
|
+
- _cfuvid=recfIuOTSO3jIxK5SUOdhHRRfTGoiOFOMgSbEpVIjpg-1759780654123-0.0.1.1-604800000;
|
|
71
|
+
path=/; domain=.workos.com; HttpOnly; Secure; SameSite=None
|
|
72
|
+
body:
|
|
73
|
+
encoding: UTF-8
|
|
74
|
+
string: '{"object":"organization_membership","id":"om_01H5JQDV7R7ATEYZDEG0W5PRYS","user_id":"user_01H5JQDV7R7ATEYZDEG0W5PRYS","organization_id":"organization_01H5JQDV7R7ATEYZDEG0W5PRYS","status":"active","role":{"slug":"member"}, "roles":[{"slug":"member"}, {"slug":"admin"}], "created_at":"2023-07-18T02:07:19.911Z","updated_at":"2023-07-18T02:07:19.911Z"}'
|
|
75
|
+
recorded_at: Mon, 06 Oct 2025 19:57:34 GMT
|
|
76
|
+
recorded_with: VCR 6.3.1
|
|
@@ -0,0 +1,77 @@
|
|
|
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":"external@example.com","password":null,"first_name":"External","last_name":"User","email_verified":null,"external_id":"ext_user_123","password_hash":null,"password_hash_type":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.1.4; arm64-darwin24; v5.20.0
|
|
18
|
+
Authorization:
|
|
19
|
+
- Bearer <API_KEY>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 201
|
|
23
|
+
message: Created
|
|
24
|
+
headers:
|
|
25
|
+
Date:
|
|
26
|
+
- Tue, 22 Jul 2025 19:00:50 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Content-Length:
|
|
30
|
+
- '326'
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
Cf-Ray:
|
|
34
|
+
- 96352ee9395c36b3-YYZ
|
|
35
|
+
Cf-Cache-Status:
|
|
36
|
+
- DYNAMIC
|
|
37
|
+
Etag:
|
|
38
|
+
- W/"146-upR+rp+FopOrmNrHPnshQZCSTFg"
|
|
39
|
+
Strict-Transport-Security:
|
|
40
|
+
- max-age=15552000; includeSubDomains
|
|
41
|
+
Vary:
|
|
42
|
+
- Origin, Accept-Encoding
|
|
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
|
+
- 0ca01f80-ab79-4dac-ac38-85013ee190fc
|
|
65
|
+
X-Xss-Protection:
|
|
66
|
+
- '0'
|
|
67
|
+
Set-Cookie:
|
|
68
|
+
- _cfuvid=eS3jraDP_ZTVdNpNKtpQG80hPBRXhXcHuq1V_QbAQjY-1753210850912-0.0.1.1-604800000;
|
|
69
|
+
path=/; domain=.workos.com; HttpOnly; Secure; SameSite=None
|
|
70
|
+
Server:
|
|
71
|
+
- cloudflare
|
|
72
|
+
body:
|
|
73
|
+
encoding: UTF-8
|
|
74
|
+
string: '{"object":"user","id":"user_01K0SR53HJ58M957MYAB6TDZ9X","email":"external@example.com","email_verified":false,"first_name":"External","last_name":"User","profile_picture_url":null,"metadata":{},"last_sign_in_at":null,"created_at":"2025-07-22T19:00:50.852Z","updated_at":"2025-07-22T19:00:50.852Z","external_id":"ext_user_123"}'
|
|
75
|
+
http_version:
|
|
76
|
+
recorded_at: Tue, 22 Jul 2025 19:00:50 GMT
|
|
77
|
+
recorded_with: VCR 5.0.0
|
|
@@ -76,7 +76,7 @@ http_interactions:
|
|
|
76
76
|
- cloudflare
|
|
77
77
|
body:
|
|
78
78
|
encoding: ASCII-8BIT
|
|
79
|
-
string: '{"object":"user","id":"user_01HP0B4ZV2FWWVY0BF16GFDAER","email":"bob@example.com","email_verified":false,"first_name":"Bob","last_name":"Loblaw","profile_picture_url":null,"created_at":"2024-02-06T23:13:18.137Z","updated_at":"2024-02-06T23:13:36.946Z"}'
|
|
79
|
+
string: '{"object":"user","id":"user_01HP0B4ZV2FWWVY0BF16GFDAER","email":"bob@example.com","email_verified":false,"first_name":"Bob","last_name":"Loblaw","profile_picture_url":null,"last_sign_in_at":"2024-02-06T23:13:18.137Z","created_at":"2024-02-06T23:13:18.137Z","updated_at":"2024-02-06T23:13:36.946Z"}'
|
|
80
80
|
http_version:
|
|
81
81
|
recorded_at: Tue, 06 Feb 2024 23:16:59 GMT
|
|
82
82
|
recorded_with: VCR 5.0.0
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: https://api.workos.com/user_management/users/user_01H7TVSKS45SDHN5V9XPSM6H44/sessions?order=desc
|
|
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-darwin22; v2.16.0
|
|
18
|
+
Authorization:
|
|
19
|
+
- Bearer <API_KEY>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
24
|
+
headers:
|
|
25
|
+
Date:
|
|
26
|
+
- Mon, 05 Jan 2026 12:00:00 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Transfer-Encoding:
|
|
30
|
+
- chunked
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
body:
|
|
34
|
+
encoding: ASCII-8BIT
|
|
35
|
+
string: '{"object":"list","data":[{"object":"session","id":"session_01H96FETXGTW2S0V5V9XPSM6H44","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0","ip_address":"192.168.1.1","organization_id":"org_01H96FETXGTW2SXRA136PCMAQJ0","user_id":"user_01H7TVSKS45SDHN5V9XPSM6H44","auth_method":"password","status":"active","expires_at":"2027-01-02T03:47:13.027Z","ended_at":null,"created_at":"2026-01-02T03:47:13.024Z","updated_at":"2026-01-05T02:56:09.379Z"}],"list_metadata":{"before":null,"after":null}}'
|
|
36
|
+
http_version:
|
|
37
|
+
recorded_at: Mon, 05 Jan 2026 12:00:00 GMT
|
|
38
|
+
recorded_with: VCR 5.0.0
|