workos 5.26.0 → 5.28.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/Gemfile.lock +1 -1
- data/lib/workos/user.rb +3 -1
- data/lib/workos/user_management.rb +20 -1
- data/lib/workos/version.rb +1 -1
- data/spec/lib/workos/user_management_spec.rb +86 -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_user/locale.yml +76 -0
- metadata +14 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f536a3eeb0b6d0fc877337104c31dc441ab6f32ccceef45ee7dad60bdba36e99
|
|
4
|
+
data.tar.gz: c9a9bb5353eb0077d43f41da09ad95269034f4a81b4504db72ca13f3086f3a29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b689a75850258ff01f9929fdcfccbe8b76c816395d6266053fdabb2515a8c2fcdae43becd6cec2e5ed378cf6f2b6a0176bc38d92111c9bc12a4f44ec8b1b03e6
|
|
7
|
+
data.tar.gz: da8fc3b665684df85724b12e8a9c7d86a95fdb26509b92c3e5a13923560c33c8106bc9a65e22d2abe2b7fcf444d3ba67121316b3b2cf75954ce2c51db256c71d
|
data/Gemfile.lock
CHANGED
data/lib/workos/user.rb
CHANGED
|
@@ -8,7 +8,7 @@ module WorkOS
|
|
|
8
8
|
include HashProvider
|
|
9
9
|
|
|
10
10
|
attr_accessor :id, :email, :first_name, :last_name, :email_verified,
|
|
11
|
-
:profile_picture_url, :external_id, :last_sign_in_at, :created_at, :updated_at
|
|
11
|
+
:profile_picture_url, :external_id, :locale, :last_sign_in_at, :created_at, :updated_at
|
|
12
12
|
|
|
13
13
|
def initialize(json)
|
|
14
14
|
hash = JSON.parse(json, symbolize_names: true)
|
|
@@ -20,6 +20,7 @@ module WorkOS
|
|
|
20
20
|
@email_verified = hash[:email_verified]
|
|
21
21
|
@profile_picture_url = hash[:profile_picture_url]
|
|
22
22
|
@external_id = hash[:external_id]
|
|
23
|
+
@locale = hash[:locale]
|
|
23
24
|
@last_sign_in_at = hash[:last_sign_in_at]
|
|
24
25
|
@created_at = hash[:created_at]
|
|
25
26
|
@updated_at = hash[:updated_at]
|
|
@@ -34,6 +35,7 @@ module WorkOS
|
|
|
34
35
|
email_verified: email_verified,
|
|
35
36
|
profile_picture_url: profile_picture_url,
|
|
36
37
|
external_id: external_id,
|
|
38
|
+
locale: locale,
|
|
37
39
|
last_sign_in_at: last_sign_in_at,
|
|
38
40
|
created_at: created_at,
|
|
39
41
|
updated_at: updated_at,
|
|
@@ -230,6 +230,7 @@ module WorkOS
|
|
|
230
230
|
# @param [String] last_name The user's last name.
|
|
231
231
|
# @param [Boolean] email_verified Whether the user's email address was previously verified.
|
|
232
232
|
# @param [String] external_id The users's external ID
|
|
233
|
+
# @param [String] locale The user's locale.
|
|
233
234
|
# @param [String] password The user's password.
|
|
234
235
|
# @param [String] password_hash The user's hashed password.
|
|
235
236
|
# @option [String] password_hash_type The algorithm originally used to hash the password.
|
|
@@ -243,6 +244,7 @@ module WorkOS
|
|
|
243
244
|
last_name: :not_set,
|
|
244
245
|
email_verified: :not_set,
|
|
245
246
|
external_id: :not_set,
|
|
247
|
+
locale: :not_set,
|
|
246
248
|
password: :not_set,
|
|
247
249
|
password_hash: :not_set,
|
|
248
250
|
password_hash_type: :not_set
|
|
@@ -255,6 +257,7 @@ module WorkOS
|
|
|
255
257
|
last_name: last_name,
|
|
256
258
|
email_verified: email_verified,
|
|
257
259
|
external_id: external_id,
|
|
260
|
+
locale: locale,
|
|
258
261
|
password: password,
|
|
259
262
|
password_hash: password_hash,
|
|
260
263
|
password_hash_type: password_hash_type,
|
|
@@ -866,7 +869,7 @@ module WorkOS
|
|
|
866
869
|
),
|
|
867
870
|
)
|
|
868
871
|
|
|
869
|
-
WorkOS::
|
|
872
|
+
WorkOS::UserResponse.new(response.body).user
|
|
870
873
|
end
|
|
871
874
|
|
|
872
875
|
# Get an Organization Membership
|
|
@@ -1136,6 +1139,22 @@ module WorkOS
|
|
|
1136
1139
|
WorkOS::Invitation.new(response.body)
|
|
1137
1140
|
end
|
|
1138
1141
|
|
|
1142
|
+
# Resends an existing Invitation.
|
|
1143
|
+
#
|
|
1144
|
+
# @param [String] id The unique ID of the Invitation.
|
|
1145
|
+
#
|
|
1146
|
+
# @return WorkOS::Invitation
|
|
1147
|
+
def resend_invitation(id:)
|
|
1148
|
+
request = post_request(
|
|
1149
|
+
path: "/user_management/invitations/#{id}/resend",
|
|
1150
|
+
auth: true,
|
|
1151
|
+
)
|
|
1152
|
+
|
|
1153
|
+
response = execute_request(request: request)
|
|
1154
|
+
|
|
1155
|
+
WorkOS::Invitation.new(response.body)
|
|
1156
|
+
end
|
|
1157
|
+
|
|
1139
1158
|
private
|
|
1140
1159
|
|
|
1141
1160
|
def validate_session(session)
|
data/lib/workos/version.rb
CHANGED
|
@@ -442,6 +442,16 @@ describe WorkOS::UserManagement do
|
|
|
442
442
|
end
|
|
443
443
|
end
|
|
444
444
|
|
|
445
|
+
it 'can update user locale' do
|
|
446
|
+
VCR.use_cassette 'user_management/update_user/locale' do
|
|
447
|
+
user = described_class.update_user(
|
|
448
|
+
id: 'user_01K78B3ZB5B7119MYEXTQE5KNE',
|
|
449
|
+
locale: 'en-US',
|
|
450
|
+
)
|
|
451
|
+
expect(user.locale).to eq('en-US')
|
|
452
|
+
end
|
|
453
|
+
end
|
|
454
|
+
|
|
445
455
|
it 'can update email addresses' do
|
|
446
456
|
VCR.use_cassette 'user_management/update_user/email' do
|
|
447
457
|
user = described_class.update_user(
|
|
@@ -462,6 +472,7 @@ describe WorkOS::UserManagement do
|
|
|
462
472
|
expect(body).not_to have_key(:first_name)
|
|
463
473
|
expect(body).not_to have_key(:last_name)
|
|
464
474
|
expect(body).not_to have_key(:email)
|
|
475
|
+
expect(body).not_to have_key(:locale)
|
|
465
476
|
|
|
466
477
|
# Return a mock request object
|
|
467
478
|
double('request')
|
|
@@ -1682,6 +1693,81 @@ describe WorkOS::UserManagement do
|
|
|
1682
1693
|
end
|
|
1683
1694
|
end
|
|
1684
1695
|
|
|
1696
|
+
describe '.resend_invitation' do
|
|
1697
|
+
context 'with valid payload' do
|
|
1698
|
+
it 'resends invitation' do
|
|
1699
|
+
VCR.use_cassette 'user_management/resend_invitation/valid' do
|
|
1700
|
+
invitation = described_class.resend_invitation(
|
|
1701
|
+
id: 'invitation_01H5JQDV7R7ATEYZDEG0W5PRYS',
|
|
1702
|
+
)
|
|
1703
|
+
|
|
1704
|
+
expect(invitation.id).to eq('invitation_01H5JQDV7R7ATEYZDEG0W5PRYS')
|
|
1705
|
+
expect(invitation.email).to eq('test@workos.com')
|
|
1706
|
+
end
|
|
1707
|
+
end
|
|
1708
|
+
end
|
|
1709
|
+
|
|
1710
|
+
context 'with an invalid id' do
|
|
1711
|
+
it 'returns an error' do
|
|
1712
|
+
VCR.use_cassette 'user_management/resend_invitation/invalid' do
|
|
1713
|
+
expect do
|
|
1714
|
+
described_class.resend_invitation(
|
|
1715
|
+
id: 'invalid_id',
|
|
1716
|
+
)
|
|
1717
|
+
end.to raise_error(
|
|
1718
|
+
WorkOS::NotFoundError,
|
|
1719
|
+
/Invitation not found/,
|
|
1720
|
+
)
|
|
1721
|
+
end
|
|
1722
|
+
end
|
|
1723
|
+
end
|
|
1724
|
+
|
|
1725
|
+
context 'when invitation has expired' do
|
|
1726
|
+
it 'returns an error' do
|
|
1727
|
+
VCR.use_cassette 'user_management/resend_invitation/expired' do
|
|
1728
|
+
expect do
|
|
1729
|
+
described_class.resend_invitation(
|
|
1730
|
+
id: 'invitation_01H5JQDV7R7ATEYZDEG0W5PRYS',
|
|
1731
|
+
)
|
|
1732
|
+
end.to raise_error(
|
|
1733
|
+
WorkOS::InvalidRequestError,
|
|
1734
|
+
/Invite has expired/,
|
|
1735
|
+
)
|
|
1736
|
+
end
|
|
1737
|
+
end
|
|
1738
|
+
end
|
|
1739
|
+
|
|
1740
|
+
context 'when invitation has been revoked' do
|
|
1741
|
+
it 'returns an error' do
|
|
1742
|
+
VCR.use_cassette 'user_management/resend_invitation/revoked' do
|
|
1743
|
+
expect do
|
|
1744
|
+
described_class.resend_invitation(
|
|
1745
|
+
id: 'invitation_01H5JQDV7R7ATEYZDEG0W5PRYS',
|
|
1746
|
+
)
|
|
1747
|
+
end.to raise_error(
|
|
1748
|
+
WorkOS::InvalidRequestError,
|
|
1749
|
+
/Invite has been revoked/,
|
|
1750
|
+
)
|
|
1751
|
+
end
|
|
1752
|
+
end
|
|
1753
|
+
end
|
|
1754
|
+
|
|
1755
|
+
context 'when invitation has already been accepted' do
|
|
1756
|
+
it 'returns an error' do
|
|
1757
|
+
VCR.use_cassette 'user_management/resend_invitation/accepted' do
|
|
1758
|
+
expect do
|
|
1759
|
+
described_class.resend_invitation(
|
|
1760
|
+
id: 'invitation_01H5JQDV7R7ATEYZDEG0W5PRYS',
|
|
1761
|
+
)
|
|
1762
|
+
end.to raise_error(
|
|
1763
|
+
WorkOS::InvalidRequestError,
|
|
1764
|
+
/Invite has already been accepted/,
|
|
1765
|
+
)
|
|
1766
|
+
end
|
|
1767
|
+
end
|
|
1768
|
+
end
|
|
1769
|
+
end
|
|
1770
|
+
|
|
1685
1771
|
describe '.revoke_session' do
|
|
1686
1772
|
context 'with valid payload' do
|
|
1687
1773
|
it 'revokes session' do
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.workos.com/user_management/invitations/invitation_01H5JQDV7R7ATEYZDEG0W5PRYS/resend
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
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: 400
|
|
23
|
+
message: Bad Request
|
|
24
|
+
headers:
|
|
25
|
+
Date:
|
|
26
|
+
- Mon, 17 Nov 2025 18:28:05 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Transfer-Encoding:
|
|
30
|
+
- chunked
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
Cf-Ray:
|
|
34
|
+
- 7fa4ef0eeafe8c12-EWR
|
|
35
|
+
Cf-Cache-Status:
|
|
36
|
+
- DYNAMIC
|
|
37
|
+
Etag:
|
|
38
|
+
- W/"56-2Auj80JGmZ1uWGCY950ud8v4KLQ"
|
|
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
|
+
- f5f06564-2f73-4b73-989b-b577cfbdaa9a
|
|
67
|
+
X-Xss-Protection:
|
|
68
|
+
- '0'
|
|
69
|
+
Set-Cookie:
|
|
70
|
+
- __cf_bm=v55WlV2dq1rXkfx9668LFtglSD5c9292fFLKsviMegY-1692642485-0-AWmCDzQSIwCjWvanffzmFA5KJT/nWucOWyv7i3fyyXeH+i5iM9ZusABSbNOUR6zO2mcugNYr/TRj6ltRmm8eC3M=;
|
|
71
|
+
path=/; expires=Mon, 21-Aug-23 18:58:05 GMT; domain=.workos.com; HttpOnly;
|
|
72
|
+
Secure; SameSite=None
|
|
73
|
+
- __cfruid=bea6b3e4c8ea6479881eb565b1ab9a0b6deabae9-1692642485; path=/; domain=.workos.com;
|
|
74
|
+
HttpOnly; Secure; SameSite=None
|
|
75
|
+
Server:
|
|
76
|
+
- cloudflare
|
|
77
|
+
body:
|
|
78
|
+
encoding: ASCII-8BIT
|
|
79
|
+
string: '{"code":"invite_accepted","message":"Invite has already been accepted."}'
|
|
80
|
+
http_version:
|
|
81
|
+
recorded_at: Mon, 17 Nov 2025 18:28:05 GMT
|
|
82
|
+
recorded_with: VCR 5.0.0
|
|
83
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.workos.com/user_management/invitations/invitation_01H5JQDV7R7ATEYZDEG0W5PRYS/resend
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
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: 400
|
|
23
|
+
message: Bad Request
|
|
24
|
+
headers:
|
|
25
|
+
Date:
|
|
26
|
+
- Mon, 17 Nov 2025 18:28:05 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Transfer-Encoding:
|
|
30
|
+
- chunked
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
Cf-Ray:
|
|
34
|
+
- 7fa4ef0eeafe8c12-EWR
|
|
35
|
+
Cf-Cache-Status:
|
|
36
|
+
- DYNAMIC
|
|
37
|
+
Etag:
|
|
38
|
+
- W/"56-2Auj80JGmZ1uWGCY950ud8v4KLQ"
|
|
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
|
+
- f5f06564-2f73-4b73-989b-b577cfbdaa9a
|
|
67
|
+
X-Xss-Protection:
|
|
68
|
+
- '0'
|
|
69
|
+
Set-Cookie:
|
|
70
|
+
- __cf_bm=v55WlV2dq1rXkfx9668LFtglSD5c9292fFLKsviMegY-1692642485-0-AWmCDzQSIwCjWvanffzmFA5KJT/nWucOWyv7i3fyyXeH+i5iM9ZusABSbNOUR6zO2mcugNYr/TRj6ltRmm8eC3M=;
|
|
71
|
+
path=/; expires=Mon, 21-Aug-23 18:58:05 GMT; domain=.workos.com; HttpOnly;
|
|
72
|
+
Secure; SameSite=None
|
|
73
|
+
- __cfruid=bea6b3e4c8ea6479881eb565b1ab9a0b6deabae9-1692642485; path=/; domain=.workos.com;
|
|
74
|
+
HttpOnly; Secure; SameSite=None
|
|
75
|
+
Server:
|
|
76
|
+
- cloudflare
|
|
77
|
+
body:
|
|
78
|
+
encoding: ASCII-8BIT
|
|
79
|
+
string: '{"code":"invite_expired","message":"Invite has expired."}'
|
|
80
|
+
http_version:
|
|
81
|
+
recorded_at: Mon, 17 Nov 2025 18:28:05 GMT
|
|
82
|
+
recorded_with: VCR 5.0.0
|
|
83
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.workos.com/user_management/invitations/invalid_id/resend
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
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: 404
|
|
23
|
+
message: Not Found
|
|
24
|
+
headers:
|
|
25
|
+
Date:
|
|
26
|
+
- Mon, 17 Nov 2025 18:28:05 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Transfer-Encoding:
|
|
30
|
+
- chunked
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
Cf-Ray:
|
|
34
|
+
- 7fa4ef0eeafe8c12-EWR
|
|
35
|
+
Cf-Cache-Status:
|
|
36
|
+
- DYNAMIC
|
|
37
|
+
Etag:
|
|
38
|
+
- W/"56-2Auj80JGmZ1uWGCY950ud8v4KLQ"
|
|
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
|
+
- f5f06564-2f73-4b73-989b-b577cfbdaa9a
|
|
67
|
+
X-Xss-Protection:
|
|
68
|
+
- '0'
|
|
69
|
+
Set-Cookie:
|
|
70
|
+
- __cf_bm=v55WlV2dq1rXkfx9668LFtglSD5c9292fFLKsviMegY-1692642485-0-AWmCDzQSIwCjWvanffzmFA5KJT/nWucOWyv7i3fyyXeH+i5iM9ZusABSbNOUR6zO2mcugNYr/TRj6ltRmm8eC3M=;
|
|
71
|
+
path=/; expires=Mon, 21-Aug-23 18:58:05 GMT; domain=.workos.com; HttpOnly;
|
|
72
|
+
Secure; SameSite=None
|
|
73
|
+
- __cfruid=bea6b3e4c8ea6479881eb565b1ab9a0b6deabae9-1692642485; path=/; domain=.workos.com;
|
|
74
|
+
HttpOnly; Secure; SameSite=None
|
|
75
|
+
Server:
|
|
76
|
+
- cloudflare
|
|
77
|
+
body:
|
|
78
|
+
encoding: ASCII-8BIT
|
|
79
|
+
string: '{"message":"Invitation not found: ''invalid_id''.","code":"entity_not_found","entity_id":"bad_id"}'
|
|
80
|
+
http_version:
|
|
81
|
+
recorded_at: Mon, 17 Nov 2025 18:28:05 GMT
|
|
82
|
+
recorded_with: VCR 5.0.0
|
|
83
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.workos.com/user_management/invitations/invitation_01H5JQDV7R7ATEYZDEG0W5PRYS/resend
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
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: 400
|
|
23
|
+
message: Bad Request
|
|
24
|
+
headers:
|
|
25
|
+
Date:
|
|
26
|
+
- Mon, 17 Nov 2025 18:28:05 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Transfer-Encoding:
|
|
30
|
+
- chunked
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
Cf-Ray:
|
|
34
|
+
- 7fa4ef0eeafe8c12-EWR
|
|
35
|
+
Cf-Cache-Status:
|
|
36
|
+
- DYNAMIC
|
|
37
|
+
Etag:
|
|
38
|
+
- W/"56-2Auj80JGmZ1uWGCY950ud8v4KLQ"
|
|
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
|
+
- f5f06564-2f73-4b73-989b-b577cfbdaa9a
|
|
67
|
+
X-Xss-Protection:
|
|
68
|
+
- '0'
|
|
69
|
+
Set-Cookie:
|
|
70
|
+
- __cf_bm=v55WlV2dq1rXkfx9668LFtglSD5c9292fFLKsviMegY-1692642485-0-AWmCDzQSIwCjWvanffzmFA5KJT/nWucOWyv7i3fyyXeH+i5iM9ZusABSbNOUR6zO2mcugNYr/TRj6ltRmm8eC3M=;
|
|
71
|
+
path=/; expires=Mon, 21-Aug-23 18:58:05 GMT; domain=.workos.com; HttpOnly;
|
|
72
|
+
Secure; SameSite=None
|
|
73
|
+
- __cfruid=bea6b3e4c8ea6479881eb565b1ab9a0b6deabae9-1692642485; path=/; domain=.workos.com;
|
|
74
|
+
HttpOnly; Secure; SameSite=None
|
|
75
|
+
Server:
|
|
76
|
+
- cloudflare
|
|
77
|
+
body:
|
|
78
|
+
encoding: ASCII-8BIT
|
|
79
|
+
string: '{"code":"invite_revoked","message":"Invite has been revoked."}'
|
|
80
|
+
http_version:
|
|
81
|
+
recorded_at: Mon, 17 Nov 2025 18:28:05 GMT
|
|
82
|
+
recorded_with: VCR 5.0.0
|
|
83
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.workos.com/user_management/invitations/invitation_01H5JQDV7R7ATEYZDEG0W5PRYS/resend
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
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
|
+
- Mon, 17 Nov 2025 18:28:05 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Content-Length:
|
|
30
|
+
- "376"
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
Cf-Ray:
|
|
34
|
+
- 7ff6b9122b60f8dd-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
|
+
- df30b890-b6d9-494f-b59c-317e85b5b5f0
|
|
67
|
+
X-Xss-Protection:
|
|
68
|
+
- "0"
|
|
69
|
+
Set-Cookie:
|
|
70
|
+
- __cf_bm=9k_hHql8o3VCr_ugrzhVkuvFJBIFO5rLKq88Tg1FQzI-1693500106-0-AWUpQpsgsfMWdRySOy7cT3NmqbANvylwBZn7ontxTsDKPijdiGDVMsPih2HAbK3+ldKDe9A1Ul6Mf2+9mfyLrjQ=;
|
|
71
|
+
path=/; expires=Thu, 31-Aug-23 17:11:46 GMT; domain=.workos.com; HttpOnly;
|
|
72
|
+
Secure; SameSite=None
|
|
73
|
+
- __cfruid=40a4c5b06423ba61b4c78144e7e0eddc58e13ff4-1693500106; path=/; domain=.workos.com;
|
|
74
|
+
HttpOnly; Secure; SameSite=None
|
|
75
|
+
Server:
|
|
76
|
+
- cloudflare
|
|
77
|
+
body:
|
|
78
|
+
encoding: UTF-8
|
|
79
|
+
string: '{"object":"invitation","id":"invitation_01H5JQDV7R7ATEYZDEG0W5PRYS","email":"test@workos.com","state":"pending","accepted_at":null,"revoked_at":null,"expires_at":"2023-07-25T02:07:19.911Z","organization_id":"org_01H5JQDV7R7ATEYZDEG0W5PRYS","token":"Z1uX3RbwcIl5fIGJJJCXXisdI","accept_invitation_url":"https://myauthkit.com/invite?invitation_token=Z1uX3RbwcIl5fIGJJJCXXisdI","created_at":"2023-07-18T02:07:19.911Z","updated_at":"2023-07-18T02:07:19.911Z"}'
|
|
80
|
+
http_version:
|
|
81
|
+
recorded_at: Mon, 17 Nov 2025 18:28:05 GMT
|
|
82
|
+
recorded_with: VCR 5.0.0
|
|
83
|
+
|
|
@@ -76,7 +76,7 @@ http_interactions:
|
|
|
76
76
|
- cloudflare
|
|
77
77
|
body:
|
|
78
78
|
encoding: UTF-8
|
|
79
|
-
string: '{"object":"user","id":"user_01H7WRJBPAAHX1BYRQHEK7QC4A","email":"lucy.lawless@example.com","first_name":"Lucy","last_name":"Lawless","created_at":"2023-08-15T14:11:04.519Z","updated_at":"2023-08-22T20:34:49.277Z","email_verified":false}'
|
|
79
|
+
string: '{"user":{"object":"user","id":"user_01H7WRJBPAAHX1BYRQHEK7QC4A","email":"lucy.lawless@example.com","first_name":"Lucy","last_name":"Lawless","created_at":"2023-08-15T14:11:04.519Z","updated_at":"2023-08-22T20:34:49.277Z","email_verified":false}}'
|
|
80
80
|
http_version:
|
|
81
81
|
recorded_at: Tue, 22 Aug 2023 20:35:40 GMT
|
|
82
82
|
recorded_with: VCR 5.0.0
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: put
|
|
5
|
+
uri: https://api.workos.com/user_management/users/user_01K78B3ZB5B7119MYEXTQE5KNE
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
8
|
+
string: '{"locale":"en-US"}'
|
|
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-darwin23; v5.25.0
|
|
18
|
+
Authorization:
|
|
19
|
+
- Bearer <API_KEY>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
24
|
+
headers:
|
|
25
|
+
Date:
|
|
26
|
+
- Sat, 11 Oct 2025 00:40:19 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Transfer-Encoding:
|
|
30
|
+
- chunked
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
Cf-Ray:
|
|
34
|
+
- 98ca4e2ece4df13a-ORD
|
|
35
|
+
Cf-Cache-Status:
|
|
36
|
+
- DYNAMIC
|
|
37
|
+
Etag:
|
|
38
|
+
- W/"14b-avtqVpGgr9LY49Al2c3gzw62Mbc"
|
|
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
|
+
- e9a5015e-44f0-4321-990a-66d2ba4a3e15
|
|
65
|
+
X-Xss-Protection:
|
|
66
|
+
- '0'
|
|
67
|
+
Set-Cookie:
|
|
68
|
+
- _cfuvid=IZBV12JrFjDy0rHr.O3LoIyI0iKnOHdGa_R3uam5bZI-1760143219077-0.0.1.1-604800000;
|
|
69
|
+
path=/; domain=.workos.com; HttpOnly; Secure; SameSite=None
|
|
70
|
+
Server:
|
|
71
|
+
- cloudflare
|
|
72
|
+
body:
|
|
73
|
+
encoding: ASCII-8BIT
|
|
74
|
+
string: '{"object":"user","id":"user_01K78B3ZB5B7119MYEXTQE5KNE","email":"test-locale@example.com","email_verified":false,"first_name":"Jane","last_name":"Doe","profile_picture_url":null,"metadata":{},"last_sign_in_at":null,"locale":"en-US","created_at":"2025-10-11T00:35:49.727Z","updated_at":"2025-10-11T00:40:19.051Z","external_id":null}'
|
|
75
|
+
recorded_at: Sat, 11 Oct 2025 00:40:19 GMT
|
|
76
|
+
recorded_with: VCR 6.3.1
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: workos
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.28.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- WorkOS
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: encryptor
|
|
@@ -363,6 +363,11 @@ files:
|
|
|
363
363
|
- spec/support/fixtures/vcr_cassettes/user_management/list_users/no_options.yml
|
|
364
364
|
- spec/support/fixtures/vcr_cassettes/user_management/list_users/with_options.yml
|
|
365
365
|
- spec/support/fixtures/vcr_cassettes/user_management/reactivate_organization_membership.yml
|
|
366
|
+
- spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/accepted.yml
|
|
367
|
+
- spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/expired.yml
|
|
368
|
+
- spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/invalid.yml
|
|
369
|
+
- spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/revoked.yml
|
|
370
|
+
- spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/valid.yml
|
|
366
371
|
- spec/support/fixtures/vcr_cassettes/user_management/reset_password/invalid.yml
|
|
367
372
|
- spec/support/fixtures/vcr_cassettes/user_management/reset_password/valid.yml
|
|
368
373
|
- spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/invalid.yml
|
|
@@ -381,6 +386,7 @@ files:
|
|
|
381
386
|
- spec/support/fixtures/vcr_cassettes/user_management/update_organization_membership/valid_multiple_roles.yml
|
|
382
387
|
- spec/support/fixtures/vcr_cassettes/user_management/update_user/email.yml
|
|
383
388
|
- spec/support/fixtures/vcr_cassettes/user_management/update_user/invalid.yml
|
|
389
|
+
- spec/support/fixtures/vcr_cassettes/user_management/update_user/locale.yml
|
|
384
390
|
- spec/support/fixtures/vcr_cassettes/user_management/update_user/valid.yml
|
|
385
391
|
- spec/support/fixtures/vcr_cassettes/user_management/update_user_external_id_null.yml
|
|
386
392
|
- spec/support/fixtures/vcr_cassettes/user_management/update_user_password/invalid.yml
|
|
@@ -596,6 +602,11 @@ test_files:
|
|
|
596
602
|
- spec/support/fixtures/vcr_cassettes/user_management/list_users/no_options.yml
|
|
597
603
|
- spec/support/fixtures/vcr_cassettes/user_management/list_users/with_options.yml
|
|
598
604
|
- spec/support/fixtures/vcr_cassettes/user_management/reactivate_organization_membership.yml
|
|
605
|
+
- spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/accepted.yml
|
|
606
|
+
- spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/expired.yml
|
|
607
|
+
- spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/invalid.yml
|
|
608
|
+
- spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/revoked.yml
|
|
609
|
+
- spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/valid.yml
|
|
599
610
|
- spec/support/fixtures/vcr_cassettes/user_management/reset_password/invalid.yml
|
|
600
611
|
- spec/support/fixtures/vcr_cassettes/user_management/reset_password/valid.yml
|
|
601
612
|
- spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/invalid.yml
|
|
@@ -614,6 +625,7 @@ test_files:
|
|
|
614
625
|
- spec/support/fixtures/vcr_cassettes/user_management/update_organization_membership/valid_multiple_roles.yml
|
|
615
626
|
- spec/support/fixtures/vcr_cassettes/user_management/update_user/email.yml
|
|
616
627
|
- spec/support/fixtures/vcr_cassettes/user_management/update_user/invalid.yml
|
|
628
|
+
- spec/support/fixtures/vcr_cassettes/user_management/update_user/locale.yml
|
|
617
629
|
- spec/support/fixtures/vcr_cassettes/user_management/update_user/valid.yml
|
|
618
630
|
- spec/support/fixtures/vcr_cassettes/user_management/update_user_external_id_null.yml
|
|
619
631
|
- spec/support/fixtures/vcr_cassettes/user_management/update_user_password/invalid.yml
|