workos 4.5.0 → 4.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/workos/email_verification.rb +37 -0
- data/lib/workos/invitation.rb +5 -1
- data/lib/workos/password_reset.rb +37 -0
- data/lib/workos/user_management.rb +88 -1
- data/lib/workos/version.rb +1 -1
- data/lib/workos.rb +2 -0
- data/spec/lib/workos/user_management_spec.rb +142 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/create_password_reset/valid.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/deactivate_organization_membership.yml +64 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/get_email_verification/invalid.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/get_email_verification/valid.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/get_password_reset/invalid.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/get_password_reset/valid.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/with_statuses_option.yml +64 -0
- data/spec/support/fixtures/vcr_cassettes/user_management/reactivate_organization_membership.yml +64 -0
- metadata +20 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a8eee76f744e675549099b150414fde6c8fb299bd40efd35f4765f4491a7896
|
4
|
+
data.tar.gz: de96239fdd72faf0e772146a7532b1e9a948f001c43e217d8af7636a75c2aa43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abc6d1b314105f5fb113e178015376d3ea607970ebb7d28cd1cdea8b914d558803504bdc420148aae0649fbcf997ee6cecf3602732b76fe356447e87fa5121a8
|
7
|
+
data.tar.gz: 36d55ffc100b13b92a172002fc921ffd980399c395b2f7bffea9d266eb9c9f01db4439b16dbb10371bb08f6d23b4e6f101c5b92559754be29b03bbc16e2b2f93
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module WorkOS
|
4
|
+
# The EmailVerification class provides a lightweight wrapper around a WorkOS email
|
5
|
+
# verification resource. This class is not meant to be instantiated in a user space,
|
6
|
+
# and is instantiated internally but exposed.
|
7
|
+
class EmailVerification
|
8
|
+
include HashProvider
|
9
|
+
|
10
|
+
attr_accessor :id, :user_id, :email,
|
11
|
+
:expires_at, :code, :created_at, :updated_at
|
12
|
+
|
13
|
+
def initialize(json)
|
14
|
+
hash = JSON.parse(json, symbolize_names: true)
|
15
|
+
|
16
|
+
@id = hash[:id]
|
17
|
+
@user_id = hash[:user_id]
|
18
|
+
@email = hash[:email]
|
19
|
+
@code = hash[:code]
|
20
|
+
@expires_at = hash[:expires_at]
|
21
|
+
@created_at = hash[:created_at]
|
22
|
+
@updated_at = hash[:updated_at]
|
23
|
+
end
|
24
|
+
|
25
|
+
def to_json(*)
|
26
|
+
{
|
27
|
+
id: id,
|
28
|
+
user_id: user_id,
|
29
|
+
email: email,
|
30
|
+
code: code,
|
31
|
+
expires_at: expires_at,
|
32
|
+
created_at: created_at,
|
33
|
+
updated_at: updated_at,
|
34
|
+
}
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/workos/invitation.rb
CHANGED
@@ -8,8 +8,9 @@ module WorkOS
|
|
8
8
|
include HashProvider
|
9
9
|
|
10
10
|
attr_accessor :id, :email, :state, :accepted_at, :revoked_at, :accept_invitation_url,
|
11
|
-
:expires_at, :token, :organization_id, :created_at, :updated_at
|
11
|
+
:expires_at, :token, :organization_id, :inviter_user_id, :created_at, :updated_at
|
12
12
|
|
13
|
+
# rubocop:disable Metrics/AbcSize
|
13
14
|
def initialize(json)
|
14
15
|
hash = JSON.parse(json, symbolize_names: true)
|
15
16
|
|
@@ -19,12 +20,14 @@ module WorkOS
|
|
19
20
|
@token = hash[:token]
|
20
21
|
@accept_invitation_url = hash[:accept_invitation_url]
|
21
22
|
@organization_id = hash[:organization_id]
|
23
|
+
@inviter_user_id = hash[:inviter_user_id]
|
22
24
|
@accepted_at = hash[:accepted_at]
|
23
25
|
@revoked_at = hash[:revoked_at]
|
24
26
|
@expires_at = hash[:expires_at]
|
25
27
|
@created_at = hash[:created_at]
|
26
28
|
@updated_at = hash[:updated_at]
|
27
29
|
end
|
30
|
+
# rubocop:enable Metrics/AbcSize
|
28
31
|
|
29
32
|
def to_json(*)
|
30
33
|
{
|
@@ -34,6 +37,7 @@ module WorkOS
|
|
34
37
|
token: token,
|
35
38
|
accept_invitation_url: accept_invitation_url,
|
36
39
|
organization_id: organization_id,
|
40
|
+
inviter_user_id: inviter_user_id,
|
37
41
|
accepted_at: accepted_at,
|
38
42
|
revoked_at: revoked_at,
|
39
43
|
expires_at: expires_at,
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module WorkOS
|
4
|
+
# The PasswordReset class provides a lightweight wrapper around a WorkOS password
|
5
|
+
# reset resource. This class is not meant to be instantiated in a user space,
|
6
|
+
# and is instantiated internally but exposed.
|
7
|
+
class PasswordReset
|
8
|
+
include HashProvider
|
9
|
+
|
10
|
+
attr_accessor :id, :user_id, :email, :password_reset_token,
|
11
|
+
:password_reset_url, :expires_at, :created_at
|
12
|
+
|
13
|
+
def initialize(json)
|
14
|
+
hash = JSON.parse(json, symbolize_names: true)
|
15
|
+
|
16
|
+
@id = hash[:id]
|
17
|
+
@user_id = hash[:user_id]
|
18
|
+
@email = hash[:email]
|
19
|
+
@password_reset_token = hash[:password_reset_token]
|
20
|
+
@password_reset_url = hash[:password_reset_url]
|
21
|
+
@expires_at = hash[:expires_at]
|
22
|
+
@created_at = hash[:created_at]
|
23
|
+
end
|
24
|
+
|
25
|
+
def to_json(*)
|
26
|
+
{
|
27
|
+
id: id,
|
28
|
+
user_id: user_id,
|
29
|
+
email: email,
|
30
|
+
password_reset_token: password_reset_token,
|
31
|
+
password_reset_url: password_reset_url,
|
32
|
+
expires_at: expires_at,
|
33
|
+
created_at: created_at,
|
34
|
+
}
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -650,6 +650,22 @@ module WorkOS
|
|
650
650
|
)
|
651
651
|
end
|
652
652
|
|
653
|
+
# Gets an email verification object
|
654
|
+
#
|
655
|
+
# @param [String] id The unique ID of the EmailVerification object.
|
656
|
+
#
|
657
|
+
# @return WorkOS::EmailVerification
|
658
|
+
def get_email_verification(id:)
|
659
|
+
response = execute_request(
|
660
|
+
request: get_request(
|
661
|
+
path: "/user_management/email_verification/#{id}",
|
662
|
+
auth: true,
|
663
|
+
),
|
664
|
+
)
|
665
|
+
|
666
|
+
WorkOS::EmailVerification.new(response.body)
|
667
|
+
end
|
668
|
+
|
653
669
|
# Sends a verification email to the provided user.
|
654
670
|
#
|
655
671
|
# @param [String] user_id The unique ID of the User whose email address will be verified.
|
@@ -686,6 +702,41 @@ module WorkOS
|
|
686
702
|
WorkOS::UserResponse.new(response.body)
|
687
703
|
end
|
688
704
|
|
705
|
+
# Gets a password reset object
|
706
|
+
#
|
707
|
+
# @param [String] id The unique ID of the PasswordReset object.
|
708
|
+
#
|
709
|
+
# @return WorkOS::PasswordReset
|
710
|
+
def get_password_reset(id:)
|
711
|
+
response = execute_request(
|
712
|
+
request: get_request(
|
713
|
+
path: "/user_management/password_reset/#{id}",
|
714
|
+
auth: true,
|
715
|
+
),
|
716
|
+
)
|
717
|
+
|
718
|
+
WorkOS::PasswordReset.new(response.body)
|
719
|
+
end
|
720
|
+
|
721
|
+
# Creates a password reset token
|
722
|
+
#
|
723
|
+
# @param [String] email The email address of the user.
|
724
|
+
#
|
725
|
+
# @return WorkOS::PasswordReset
|
726
|
+
def create_password_reset(email:)
|
727
|
+
response = execute_request(
|
728
|
+
request: post_request(
|
729
|
+
path: '/user_management/password_reset',
|
730
|
+
body: {
|
731
|
+
email: email,
|
732
|
+
},
|
733
|
+
auth: true,
|
734
|
+
),
|
735
|
+
)
|
736
|
+
|
737
|
+
WorkOS::PasswordReset.new(response.body)
|
738
|
+
end
|
739
|
+
|
689
740
|
# Create a password reset challenge and emails a password reset link to a user.
|
690
741
|
#
|
691
742
|
# @param [String] email The email of the user that wishes to reset their password.
|
@@ -693,6 +744,9 @@ module WorkOS
|
|
693
744
|
#
|
694
745
|
# @return [Bool] - returns `true` if successful
|
695
746
|
def send_password_reset_email(email:, password_reset_url:)
|
747
|
+
warn_deprecation '`send_password_reset_email` is deprecated.
|
748
|
+
Please use `create_password_reset` instead. This method will be removed in a future major version.'
|
749
|
+
|
696
750
|
request = post_request(
|
697
751
|
path: '/user_management/password_reset/send',
|
698
752
|
body: {
|
@@ -748,7 +802,8 @@ module WorkOS
|
|
748
802
|
#
|
749
803
|
# @param [Hash] options
|
750
804
|
# @option options [String] user_id The ID of the User.
|
751
|
-
# @option options [String] organization_id Filter
|
805
|
+
# @option options [String] organization_id Filter memberships by the organization they are members of.
|
806
|
+
# @option options [Array<String>] statuses Filter memberships by status.
|
752
807
|
# @option options [String] limit Maximum number of records to return.
|
753
808
|
# @option options [String] order The order in which to paginate records
|
754
809
|
# @option options [String] before Pagination cursor to receive records
|
@@ -816,6 +871,38 @@ module WorkOS
|
|
816
871
|
response.is_a? Net::HTTPSuccess
|
817
872
|
end
|
818
873
|
|
874
|
+
# Deactivate an Organization Membership
|
875
|
+
#
|
876
|
+
# @param [String] id The unique ID of the Organization Membership.
|
877
|
+
#
|
878
|
+
# @return WorkOS::OrganizationMembership
|
879
|
+
def deactivate_organization_membership(id:)
|
880
|
+
response = execute_request(
|
881
|
+
request: put_request(
|
882
|
+
path: "/user_management/organization_memberships/#{id}/deactivate",
|
883
|
+
auth: true,
|
884
|
+
),
|
885
|
+
)
|
886
|
+
|
887
|
+
WorkOS::OrganizationMembership.new(response.body)
|
888
|
+
end
|
889
|
+
|
890
|
+
# Reactivate an Organization Membership
|
891
|
+
#
|
892
|
+
# @param [String] id The unique ID of the Organization Membership.
|
893
|
+
#
|
894
|
+
# @return WorkOS::OrganizationMembership
|
895
|
+
def reactivate_organization_membership(id:)
|
896
|
+
response = execute_request(
|
897
|
+
request: put_request(
|
898
|
+
path: "/user_management/organization_memberships/#{id}/reactivate",
|
899
|
+
auth: true,
|
900
|
+
),
|
901
|
+
)
|
902
|
+
|
903
|
+
WorkOS::OrganizationMembership.new(response.body)
|
904
|
+
end
|
905
|
+
|
819
906
|
# Gets an Invitation
|
820
907
|
#
|
821
908
|
# @param [String] id The unique ID of the Invitation.
|
data/lib/workos/version.rb
CHANGED
data/lib/workos.rb
CHANGED
@@ -54,6 +54,7 @@ module WorkOS
|
|
54
54
|
autoload :DirectoryGroup, 'workos/directory_group'
|
55
55
|
autoload :DirectorySync, 'workos/directory_sync'
|
56
56
|
autoload :DirectoryUser, 'workos/directory_user'
|
57
|
+
autoload :EmailVerification, 'workos/email_verification'
|
57
58
|
autoload :Event, 'workos/event'
|
58
59
|
autoload :Events, 'workos/events'
|
59
60
|
autoload :Factor, 'workos/factor'
|
@@ -65,6 +66,7 @@ module WorkOS
|
|
65
66
|
autoload :Organizations, 'workos/organizations'
|
66
67
|
autoload :OrganizationMembership, 'workos/organization_membership'
|
67
68
|
autoload :Passwordless, 'workos/passwordless'
|
69
|
+
autoload :PasswordReset, 'workos/password_reset'
|
68
70
|
autoload :Portal, 'workos/portal'
|
69
71
|
autoload :Profile, 'workos/profile'
|
70
72
|
autoload :ProfileAndToken, 'workos/profile_and_token'
|
@@ -736,6 +736,31 @@ describe WorkOS::UserManagement do
|
|
736
736
|
end
|
737
737
|
end
|
738
738
|
|
739
|
+
describe '.get_email_verification' do
|
740
|
+
context 'with a valid id' do
|
741
|
+
it 'returns an email_verification object' do
|
742
|
+
VCR.use_cassette 'user_management/get_email_verification/valid' do
|
743
|
+
email_verification = described_class.get_email_verification(
|
744
|
+
id: 'email_verification_01HYK9VKNJQ0MJDXEXQP0DA1VK',
|
745
|
+
)
|
746
|
+
|
747
|
+
expect(email_verification.id.instance_of?(String))
|
748
|
+
expect(email_verification.instance_of?(WorkOS::EmailVerification))
|
749
|
+
end
|
750
|
+
end
|
751
|
+
end
|
752
|
+
|
753
|
+
context 'with an invalid id' do
|
754
|
+
it 'raises an error' do
|
755
|
+
VCR.use_cassette('user_management/get_email_verification/invalid') do
|
756
|
+
expect do
|
757
|
+
WorkOS::UserManagement.get_email_verification(id: 'invalid')
|
758
|
+
end.to raise_error(WorkOS::APIError, /Email Verification not found/)
|
759
|
+
end
|
760
|
+
end
|
761
|
+
end
|
762
|
+
end
|
763
|
+
|
739
764
|
describe '.send_verification_email' do
|
740
765
|
context 'with valid parameters' do
|
741
766
|
it 'sends an email to that user and the magic auth challenge' do
|
@@ -804,6 +829,46 @@ describe WorkOS::UserManagement do
|
|
804
829
|
end
|
805
830
|
end
|
806
831
|
|
832
|
+
describe '.get_password_reset' do
|
833
|
+
context 'with a valid id' do
|
834
|
+
it 'returns a password_reset object' do
|
835
|
+
VCR.use_cassette 'user_management/get_password_reset/valid' do
|
836
|
+
password_reset = described_class.get_password_reset(
|
837
|
+
id: 'password_reset_01HYKA8DTF8TW5YD30MF0ZXZKT',
|
838
|
+
)
|
839
|
+
|
840
|
+
expect(password_reset.id.instance_of?(String))
|
841
|
+
expect(password_reset.instance_of?(WorkOS::PasswordReset))
|
842
|
+
end
|
843
|
+
end
|
844
|
+
end
|
845
|
+
|
846
|
+
context 'with an invalid id' do
|
847
|
+
it 'raises an error' do
|
848
|
+
VCR.use_cassette('user_management/get_password_reset/invalid') do
|
849
|
+
expect do
|
850
|
+
WorkOS::UserManagement.get_password_reset(id: 'invalid')
|
851
|
+
end.to raise_error(WorkOS::APIError, /Password Reset not found/)
|
852
|
+
end
|
853
|
+
end
|
854
|
+
end
|
855
|
+
end
|
856
|
+
|
857
|
+
describe '.create_password_reset' do
|
858
|
+
context 'with valid payload' do
|
859
|
+
it 'creates a password_reset object' do
|
860
|
+
VCR.use_cassette 'user_management/create_password_reset/valid' do
|
861
|
+
password_reset = described_class.create_password_reset(
|
862
|
+
email: 'test@workos.com',
|
863
|
+
)
|
864
|
+
|
865
|
+
expect(password_reset.id).to eq('password_reset_01HYKA8DTF8TW5YD30MF0ZXZKT')
|
866
|
+
expect(password_reset.email).to eq('test@workos.com')
|
867
|
+
end
|
868
|
+
end
|
869
|
+
end
|
870
|
+
end
|
871
|
+
|
807
872
|
describe '.send_password_reset_email' do
|
808
873
|
context 'with a valid payload' do
|
809
874
|
it 'sends a password reset email' do
|
@@ -933,6 +998,33 @@ describe WorkOS::UserManagement do
|
|
933
998
|
end
|
934
999
|
end
|
935
1000
|
end
|
1001
|
+
|
1002
|
+
context 'with statuses option' do
|
1003
|
+
it 'returns a list of matching users' do
|
1004
|
+
request_args = [
|
1005
|
+
'/user_management/organization_memberships?user_id=user_01HXYSZBKQE2N3NHBKZHDP1X5X&'\
|
1006
|
+
'statuses=active&statuses=inactive&order=desc&limit=5',
|
1007
|
+
'Content-Type' => 'application/json'
|
1008
|
+
]
|
1009
|
+
|
1010
|
+
expected_request = Net::HTTP::Get.new(*request_args)
|
1011
|
+
|
1012
|
+
expect(Net::HTTP::Get).to receive(:new).with(*request_args).
|
1013
|
+
and_return(expected_request)
|
1014
|
+
|
1015
|
+
VCR.use_cassette 'user_management/list_organization_memberships/with_statuses_option' do
|
1016
|
+
organization_memberships = described_class.list_organization_memberships(
|
1017
|
+
user_id: 'user_01HXYSZBKQE2N3NHBKZHDP1X5X',
|
1018
|
+
statuses: %w[active inactive],
|
1019
|
+
order: 'desc',
|
1020
|
+
limit: '5',
|
1021
|
+
)
|
1022
|
+
|
1023
|
+
expect(organization_memberships.data.size).to eq(1)
|
1024
|
+
expect(organization_memberships.data[0].user_id).to eq('user_01HXYSZBKQE2N3NHBKZHDP1X5X')
|
1025
|
+
end
|
1026
|
+
end
|
1027
|
+
end
|
936
1028
|
end
|
937
1029
|
|
938
1030
|
describe '.create_organization_membership' do
|
@@ -988,6 +1080,56 @@ describe WorkOS::UserManagement do
|
|
988
1080
|
end
|
989
1081
|
end
|
990
1082
|
|
1083
|
+
describe '.deactivate_organization_membership' do
|
1084
|
+
context 'with a valid id' do
|
1085
|
+
it 'returns a organization membership' do
|
1086
|
+
VCR.use_cassette 'user_management/deactivate_organization_membership' do
|
1087
|
+
organization_membership = described_class.deactivate_organization_membership(
|
1088
|
+
id: 'om_01HXYT0G3H5QG9YTSHSHFZQE6D',
|
1089
|
+
)
|
1090
|
+
|
1091
|
+
expect(organization_membership.id.instance_of?(String))
|
1092
|
+
expect(organization_membership.instance_of?(WorkOS::OrganizationMembership))
|
1093
|
+
end
|
1094
|
+
end
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
context 'with an invalid id' do
|
1098
|
+
it 'returns an error' do
|
1099
|
+
expect do
|
1100
|
+
described_class.deactivate_organization_membership(
|
1101
|
+
id: 'invalid_organization_membership_id',
|
1102
|
+
).to raise_error(WorkOS::APIError)
|
1103
|
+
end
|
1104
|
+
end
|
1105
|
+
end
|
1106
|
+
end
|
1107
|
+
|
1108
|
+
describe '.reactivate_organization_membership' do
|
1109
|
+
context 'with a valid id' do
|
1110
|
+
it 'returns a organization membership' do
|
1111
|
+
VCR.use_cassette 'user_management/reactivate_organization_membership' do
|
1112
|
+
organization_membership = described_class.reactivate_organization_membership(
|
1113
|
+
id: 'om_01HXYT0G3H5QG9YTSHSHFZQE6D',
|
1114
|
+
)
|
1115
|
+
|
1116
|
+
expect(organization_membership.id.instance_of?(String))
|
1117
|
+
expect(organization_membership.instance_of?(WorkOS::OrganizationMembership))
|
1118
|
+
end
|
1119
|
+
end
|
1120
|
+
end
|
1121
|
+
|
1122
|
+
context 'with an invalid id' do
|
1123
|
+
it 'returns an error' do
|
1124
|
+
expect do
|
1125
|
+
described_class.reactivate_organization_membership(
|
1126
|
+
id: 'invalid_organization_membership_id',
|
1127
|
+
).to raise_error(WorkOS::APIError)
|
1128
|
+
end
|
1129
|
+
end
|
1130
|
+
end
|
1131
|
+
end
|
1132
|
+
|
991
1133
|
describe '.get_invitation' do
|
992
1134
|
context 'with a valid id' do
|
993
1135
|
it 'returns an invitation' do
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.workos.com/user_management/password_reset
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"email":"blair@workos.com"}'
|
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; x86_64-darwin19; v4.6.0
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 23 May 2024 18:08:51 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Content-Length:
|
30
|
+
- '397'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cf-Ray:
|
34
|
+
- 8886fe5e1c317b24-DEN
|
35
|
+
Cf-Cache-Status:
|
36
|
+
- DYNAMIC
|
37
|
+
Etag:
|
38
|
+
- W/"18d-Z6VC8jkvZuXmNL0BcJcqkF7M0BQ"
|
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
|
+
- db59df36-fce8-4174-a031-bd259bca32f8
|
65
|
+
X-Xss-Protection:
|
66
|
+
- '0'
|
67
|
+
Set-Cookie:
|
68
|
+
- __cf_bm=d6moUiiUczj82CNolGPFWxb99g4YP_C.ZlaH9W7xnF8-1716487731-1.0.1.1-pRG1tKVpL4EV8NrdL78THPAhMdBiKwY_tOlgnuanVHgNFvw6MeMv2wJG0Nkp4oLwXdW629gkH1OwSaLIv9EuYQ;
|
69
|
+
path=/; expires=Thu, 23-May-24 18:38:51 GMT; domain=.workos.com; HttpOnly;
|
70
|
+
Secure; SameSite=None
|
71
|
+
- __cfruid=bd64ac4e2572b6fc609d5cc06577eed03bc1bbcb-1716487731; path=/; domain=.workos.com;
|
72
|
+
HttpOnly; Secure; SameSite=None
|
73
|
+
Server:
|
74
|
+
- cloudflare
|
75
|
+
body:
|
76
|
+
encoding: UTF-8
|
77
|
+
string: '{"object":"password_reset","id":"password_reset_01HYKA8DTF8TW5YD30MF0ZXZKT","user_id":"user_01HH5GTVSP6PEXV0SRB9ANFE9G","email":"test@workos.com","password_reset_token":"DmNQt1ZWOz7k5hulOoGDN0TZd","password_reset_url":"https://my-app.com/reset-password/?token=DmNQt1ZWOz7k5hulOoGDN0TZd","expires_at":"2024-05-23T18:23:51.024Z","created_at":"2024-05-23T18:08:51.024Z"}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Thu, 23 May 2024 18:08:50 GMT
|
80
|
+
recorded_with: VCR 5.0.0
|
data/spec/support/fixtures/vcr_cassettes/user_management/deactivate_organization_membership.yml
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://api.workos.com/user_management/organization_memberships/om_01HXYT0G3H5QG9YTSHSHFZQE6D/deactivate
|
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.3.0; arm64-darwin23; v4.5.0
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Wed, 15 May 2024 19:13:06 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=15552000; includeSubDomains
|
35
|
+
Vary:
|
36
|
+
- Origin, Accept-Encoding
|
37
|
+
Access-Control-Allow-Credentials:
|
38
|
+
- "true"
|
39
|
+
Content-Security-Policy:
|
40
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
41
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
42
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
43
|
+
Expect-Ct:
|
44
|
+
- max-age=0
|
45
|
+
Referrer-Policy:
|
46
|
+
- no-referrer
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Dns-Prefetch-Control:
|
50
|
+
- "off"
|
51
|
+
X-Download-Options:
|
52
|
+
- noopen
|
53
|
+
X-Frame-Options:
|
54
|
+
- SAMEORIGIN
|
55
|
+
X-Permitted-Cross-Domain-Policies:
|
56
|
+
- none
|
57
|
+
X-Xss-Protection:
|
58
|
+
- "0"
|
59
|
+
body:
|
60
|
+
encoding: ASCII-8BIT
|
61
|
+
string: '{"object":"organization_membership","id":"om_01HXYT0G3H5QG9YTSHSHFZQE6D","organization_id":"org_01HRCVHACPY05V2FP0KEBQZYD3","user_id":"user_01HXYSZBKQE2N3NHBKZHDP1X5X","status":"inactive","role":{"slug":"member"},"created_at":"2024-05-15T19:00:05.359Z","updated_at":"2024-05-15T19:13:06.259Z"}'
|
62
|
+
http_version:
|
63
|
+
recorded_at: Wed, 15 May 2024 19:13:06 GMT
|
64
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.workos.com/user_management/email_verification/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; x86_64-darwin19; v4.6.0
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 404
|
23
|
+
message: Not Found
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 23 May 2024 18:04:34 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cf-Ray:
|
34
|
+
- 8886f81a5d7e7b18-DEN
|
35
|
+
Cf-Cache-Status:
|
36
|
+
- DYNAMIC
|
37
|
+
Etag:
|
38
|
+
- W/"66-ESd/ROLsUvsCu/wiWkoaXfmv1gY"
|
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
|
+
- 777e6230-9045-4858-9925-efb5c5783aa7
|
65
|
+
X-Xss-Protection:
|
66
|
+
- '0'
|
67
|
+
Set-Cookie:
|
68
|
+
- __cf_bm=jfT91VpwVMXi901oaS57bdvcPNjXwzgT0NN.TADMkSA-1716487474-1.0.1.1-D3FZIQ5VQOMnMl3UudReuAR600DpJh8NzCxffFA.bRKl_H6zziPQu7Kk3_.wsy8_ESDjlcUQ3suhVmUb5Iwbhg;
|
69
|
+
path=/; expires=Thu, 23-May-24 18:34:34 GMT; domain=.workos.com; HttpOnly;
|
70
|
+
Secure; SameSite=None
|
71
|
+
- __cfruid=387f8a46c39c44e43af2f39cd9fd8aea810da563-1716487474; path=/; domain=.workos.com;
|
72
|
+
HttpOnly; Secure; SameSite=None
|
73
|
+
Server:
|
74
|
+
- cloudflare
|
75
|
+
body:
|
76
|
+
encoding: ASCII-8BIT
|
77
|
+
string: '{"message":"Email Verification not found: ''invalid''.","code":"entity_not_found","entity_id":"invalid"}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Thu, 23 May 2024 18:04:34 GMT
|
80
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.workos.com/user_management/email_verification/email_verification_01HYK9VKNJQ0MJDXEXQP0DA1VK
|
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; x86_64-darwin19; v4.6.0
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 23 May 2024 18:20:20 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cf-Ray:
|
34
|
+
- 88870f32dcd07c2e-DEN
|
35
|
+
Cf-Cache-Status:
|
36
|
+
- DYNAMIC
|
37
|
+
Etag:
|
38
|
+
- W/"12b-ekjr8XAvfdiqyjIkVD8WtynlLBo"
|
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
|
+
- 52bf7914-d672-454b-bd61-353e397fdad5
|
65
|
+
X-Xss-Protection:
|
66
|
+
- '0'
|
67
|
+
Set-Cookie:
|
68
|
+
- __cf_bm=huBpGvZo0rq1TOrNY2F0wBwT69_y.Paz9joecCAWK2Y-1716488420-1.0.1.1-YY9yAQE6aOIbVg6Vf8Rxc8ScBPueEKTcUGUXIQmi_AYXfCtcQUa3MzjWeeC0.vmO0AetYPSX3FmmWUf26GH2Fw;
|
69
|
+
path=/; expires=Thu, 23-May-24 18:50:20 GMT; domain=.workos.com; HttpOnly;
|
70
|
+
Secure; SameSite=None
|
71
|
+
- __cfruid=823df799452104e182687db9c4f57d862b59f78e-1716488420; path=/; domain=.workos.com;
|
72
|
+
HttpOnly; Secure; SameSite=None
|
73
|
+
Server:
|
74
|
+
- cloudflare
|
75
|
+
body:
|
76
|
+
encoding: ASCII-8BIT
|
77
|
+
string: '{"object":"email_verification","id":"email_verification_01HYK9VKNJQ0MJDXEXQP0DA1VK","user_id":"user_01HYK9VAAW34TPP0KSYXCX44SB","email":"blairlunceford@gmail.com","code":"561814","expires_at":"2024-05-23T18:11:51.024Z","created_at":"2024-05-23T18:01:50.997Z","updated_at":"2024-05-23T18:01:50.997Z"}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Thu, 23 May 2024 18:20:20 GMT
|
80
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.workos.com/user_management/password_reset/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; x86_64-darwin19; v4.6.0
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 404
|
23
|
+
message: Not Found
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 23 May 2024 18:04:34 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cf-Ray:
|
34
|
+
- 8886f81cb89c7b00-DEN
|
35
|
+
Cf-Cache-Status:
|
36
|
+
- DYNAMIC
|
37
|
+
Etag:
|
38
|
+
- W/"62-MwEIS86+oNNsmjVX0JyWZTcjZ9s"
|
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
|
+
- 5b33aeae-7a47-4893-8fef-f014e6692866
|
65
|
+
X-Xss-Protection:
|
66
|
+
- '0'
|
67
|
+
Set-Cookie:
|
68
|
+
- __cf_bm=nkAinUzRPwshxLJMd18TIu20ff0fkGCILsc2NGkWLcs-1716487474-1.0.1.1-Ci9e5PwUuKRRSCrdjfPf3hLETEBr8qGDcVdllyCDW39my5OtwL58BZDu0vB0kuC_6vsPe4UrLSzfoz6XMyjmmw;
|
69
|
+
path=/; expires=Thu, 23-May-24 18:34:34 GMT; domain=.workos.com; HttpOnly;
|
70
|
+
Secure; SameSite=None
|
71
|
+
- __cfruid=387f8a46c39c44e43af2f39cd9fd8aea810da563-1716487474; path=/; domain=.workos.com;
|
72
|
+
HttpOnly; Secure; SameSite=None
|
73
|
+
Server:
|
74
|
+
- cloudflare
|
75
|
+
body:
|
76
|
+
encoding: ASCII-8BIT
|
77
|
+
string: '{"message":"Password Reset not found: ''invalid''.","code":"entity_not_found","entity_id":"invalid"}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Thu, 23 May 2024 18:04:34 GMT
|
80
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.workos.com/user_management/password_reset/password_reset_01HYKA8DTF8TW5YD30MF0ZXZKT
|
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; x86_64-darwin19; v4.6.0
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 23 May 2024 18:10:20 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cf-Ray:
|
34
|
+
- 8887008eb83c51eb-DEN
|
35
|
+
Cf-Cache-Status:
|
36
|
+
- DYNAMIC
|
37
|
+
Etag:
|
38
|
+
- W/"18d-Z6VC8jkvZuXmNL0BcJcqkF7M0BQ"
|
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
|
+
- bd5403d4-e651-4b63-acde-50287326e0d7
|
65
|
+
X-Xss-Protection:
|
66
|
+
- '0'
|
67
|
+
Set-Cookie:
|
68
|
+
- __cf_bm=YhPLb6u6gDZZcI3AVyfPTCitp9JKWpSMhZ236D6EPJI-1716487820-1.0.1.1-F0GOL.FAH1ROxtTJumLoe_YGWkO6uoozp7qv4oFniAc0aX20kqay7JvCfszxpxRsEbvj5mPTJcqVyvDm7qedeA;
|
69
|
+
path=/; expires=Thu, 23-May-24 18:40:20 GMT; domain=.workos.com; HttpOnly;
|
70
|
+
Secure; SameSite=None
|
71
|
+
- __cfruid=cdbb09208777e3b5b5ee0ae80b61e07279d590c0-1716487820; path=/; domain=.workos.com;
|
72
|
+
HttpOnly; Secure; SameSite=None
|
73
|
+
Server:
|
74
|
+
- cloudflare
|
75
|
+
body:
|
76
|
+
encoding: ASCII-8BIT
|
77
|
+
string: '{"object":"password_reset","id":"password_reset_01HYKA8DTF8TW5YD30MF0ZXZKT","user_id":"user_01HH5GTVSP6PEXV0SRB9ANFE9G","email":"blair@workos.com","password_reset_token":"DmNQt1ZWOz7k5hulOoGDN0TZd","password_reset_url":"https://manageable-child-63-staging.authkit.app/reset-password/?token=DmNQt1ZWOz7k5hulOoGDN0TZd","expires_at":"2024-05-23T18:23:51.024Z","created_at":"2024-05-23T18:08:51.024Z"}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Thu, 23 May 2024 18:10:20 GMT
|
80
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.workos.com/user_management/organization_memberships?limit=5&order=desc&statuses=inactive&user_id=user_01HXYSZBKQE2N3NHBKZHDP1X5X
|
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.3.0; arm64-darwin23; v4.5.0
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Wed, 15 May 2024 19:14:44 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=15552000; includeSubDomains
|
35
|
+
Vary:
|
36
|
+
- Origin, Accept-Encoding
|
37
|
+
Access-Control-Allow-Credentials:
|
38
|
+
- "true"
|
39
|
+
Content-Security-Policy:
|
40
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
41
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
42
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
43
|
+
Expect-Ct:
|
44
|
+
- max-age=0
|
45
|
+
Referrer-Policy:
|
46
|
+
- no-referrer
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Dns-Prefetch-Control:
|
50
|
+
- "off"
|
51
|
+
X-Download-Options:
|
52
|
+
- noopen
|
53
|
+
X-Frame-Options:
|
54
|
+
- SAMEORIGIN
|
55
|
+
X-Permitted-Cross-Domain-Policies:
|
56
|
+
- none
|
57
|
+
X-Xss-Protection:
|
58
|
+
- "0"
|
59
|
+
body:
|
60
|
+
encoding: ASCII-8BIT
|
61
|
+
string: '{"object":"list","data":[{"object":"organization_membership","id":"om_01HXYT0G3H5QG9YTSHSHFZQE6D","organization_id":"org_01HRCVHACPY05V2FP0KEBQZYD3","user_id":"user_01HXYSZBKQE2N3NHBKZHDP1X5X","status":"active","role":{"slug":"member"},"created_at":"2024-05-15T19:00:05.359Z","updated_at":"2024-05-15T19:13:06.427Z"}],"list_metadata":{"before":null,"after":null}}'
|
62
|
+
http_version:
|
63
|
+
recorded_at: Wed, 15 May 2024 19:14:44 GMT
|
64
|
+
recorded_with: VCR 5.0.0
|
data/spec/support/fixtures/vcr_cassettes/user_management/reactivate_organization_membership.yml
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://api.workos.com/user_management/organization_memberships/om_01HXYT0G3H5QG9YTSHSHFZQE6D/reactivate
|
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.3.0; arm64-darwin23; v4.5.0
|
18
|
+
Authorization:
|
19
|
+
- Bearer <API_KEY>
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Wed, 15 May 2024 19:13:06 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=15552000; includeSubDomains
|
35
|
+
Vary:
|
36
|
+
- Origin, Accept-Encoding
|
37
|
+
Access-Control-Allow-Credentials:
|
38
|
+
- "true"
|
39
|
+
Content-Security-Policy:
|
40
|
+
- "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
|
41
|
+
https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
|
42
|
+
'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
|
43
|
+
Expect-Ct:
|
44
|
+
- max-age=0
|
45
|
+
Referrer-Policy:
|
46
|
+
- no-referrer
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Dns-Prefetch-Control:
|
50
|
+
- "off"
|
51
|
+
X-Download-Options:
|
52
|
+
- noopen
|
53
|
+
X-Frame-Options:
|
54
|
+
- SAMEORIGIN
|
55
|
+
X-Permitted-Cross-Domain-Policies:
|
56
|
+
- none
|
57
|
+
X-Xss-Protection:
|
58
|
+
- "0"
|
59
|
+
body:
|
60
|
+
encoding: ASCII-8BIT
|
61
|
+
string: '{"object":"organization_membership","id":"om_01HXYT0G3H5QG9YTSHSHFZQE6D","organization_id":"org_01HRCVHACPY05V2FP0KEBQZYD3","user_id":"user_01HXYSZBKQE2N3NHBKZHDP1X5X","status":"active","role":{"slug":"member"},"created_at":"2024-05-15T19:00:05.359Z","updated_at":"2024-05-15T19:13:06.427Z"}'
|
62
|
+
http_version:
|
63
|
+
recorded_at: Wed, 15 May 2024 19:13:06 GMT
|
64
|
+
recorded_with: VCR 5.0.0
|
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: 4.
|
4
|
+
version: 4.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WorkOS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- lib/workos/directory_group.rb
|
119
119
|
- lib/workos/directory_sync.rb
|
120
120
|
- lib/workos/directory_user.rb
|
121
|
+
- lib/workos/email_verification.rb
|
121
122
|
- lib/workos/errors.rb
|
122
123
|
- lib/workos/event.rb
|
123
124
|
- lib/workos/events.rb
|
@@ -130,6 +131,7 @@ files:
|
|
130
131
|
- lib/workos/organization.rb
|
131
132
|
- lib/workos/organization_membership.rb
|
132
133
|
- lib/workos/organizations.rb
|
134
|
+
- lib/workos/password_reset.rb
|
133
135
|
- lib/workos/passwordless.rb
|
134
136
|
- lib/workos/portal.rb
|
135
137
|
- lib/workos/profile.rb
|
@@ -272,19 +274,25 @@ files:
|
|
272
274
|
- spec/support/fixtures/vcr_cassettes/user_management/create_magic_auth/valid.yml
|
273
275
|
- spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/invalid.yml
|
274
276
|
- spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/valid.yml
|
277
|
+
- spec/support/fixtures/vcr_cassettes/user_management/create_password_reset/valid.yml
|
275
278
|
- spec/support/fixtures/vcr_cassettes/user_management/create_user_invalid.yml
|
276
279
|
- spec/support/fixtures/vcr_cassettes/user_management/create_user_valid.yml
|
280
|
+
- spec/support/fixtures/vcr_cassettes/user_management/deactivate_organization_membership.yml
|
277
281
|
- spec/support/fixtures/vcr_cassettes/user_management/delete_organization_membership/invalid.yml
|
278
282
|
- spec/support/fixtures/vcr_cassettes/user_management/delete_organization_membership/valid.yml
|
279
283
|
- spec/support/fixtures/vcr_cassettes/user_management/delete_user/invalid.yml
|
280
284
|
- spec/support/fixtures/vcr_cassettes/user_management/delete_user/valid.yml
|
281
285
|
- spec/support/fixtures/vcr_cassettes/user_management/enroll_auth_factor/invalid.yml
|
282
286
|
- spec/support/fixtures/vcr_cassettes/user_management/enroll_auth_factor/valid.yml
|
287
|
+
- spec/support/fixtures/vcr_cassettes/user_management/get_email_verification/invalid.yml
|
288
|
+
- spec/support/fixtures/vcr_cassettes/user_management/get_email_verification/valid.yml
|
283
289
|
- spec/support/fixtures/vcr_cassettes/user_management/get_invitation/invalid.yml
|
284
290
|
- spec/support/fixtures/vcr_cassettes/user_management/get_invitation/valid.yml
|
285
291
|
- spec/support/fixtures/vcr_cassettes/user_management/get_magic_auth/invalid.yml
|
286
292
|
- spec/support/fixtures/vcr_cassettes/user_management/get_magic_auth/valid.yml
|
287
293
|
- spec/support/fixtures/vcr_cassettes/user_management/get_organization_membership.yml
|
294
|
+
- spec/support/fixtures/vcr_cassettes/user_management/get_password_reset/invalid.yml
|
295
|
+
- spec/support/fixtures/vcr_cassettes/user_management/get_password_reset/valid.yml
|
288
296
|
- spec/support/fixtures/vcr_cassettes/user_management/get_user.yml
|
289
297
|
- spec/support/fixtures/vcr_cassettes/user_management/list_auth_factors/invalid.yml
|
290
298
|
- spec/support/fixtures/vcr_cassettes/user_management/list_auth_factors/valid.yml
|
@@ -295,8 +303,10 @@ files:
|
|
295
303
|
- spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_organization_id.yml
|
296
304
|
- spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/no_options.yml
|
297
305
|
- spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/with_options.yml
|
306
|
+
- spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/with_statuses_option.yml
|
298
307
|
- spec/support/fixtures/vcr_cassettes/user_management/list_users/no_options.yml
|
299
308
|
- spec/support/fixtures/vcr_cassettes/user_management/list_users/with_options.yml
|
309
|
+
- spec/support/fixtures/vcr_cassettes/user_management/reactivate_organization_membership.yml
|
300
310
|
- spec/support/fixtures/vcr_cassettes/user_management/reset_password/invalid.yml
|
301
311
|
- spec/support/fixtures/vcr_cassettes/user_management/reset_password/valid.yml
|
302
312
|
- spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/invalid.yml
|
@@ -469,19 +479,25 @@ test_files:
|
|
469
479
|
- spec/support/fixtures/vcr_cassettes/user_management/create_magic_auth/valid.yml
|
470
480
|
- spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/invalid.yml
|
471
481
|
- spec/support/fixtures/vcr_cassettes/user_management/create_organization_membership/valid.yml
|
482
|
+
- spec/support/fixtures/vcr_cassettes/user_management/create_password_reset/valid.yml
|
472
483
|
- spec/support/fixtures/vcr_cassettes/user_management/create_user_invalid.yml
|
473
484
|
- spec/support/fixtures/vcr_cassettes/user_management/create_user_valid.yml
|
485
|
+
- spec/support/fixtures/vcr_cassettes/user_management/deactivate_organization_membership.yml
|
474
486
|
- spec/support/fixtures/vcr_cassettes/user_management/delete_organization_membership/invalid.yml
|
475
487
|
- spec/support/fixtures/vcr_cassettes/user_management/delete_organization_membership/valid.yml
|
476
488
|
- spec/support/fixtures/vcr_cassettes/user_management/delete_user/invalid.yml
|
477
489
|
- spec/support/fixtures/vcr_cassettes/user_management/delete_user/valid.yml
|
478
490
|
- spec/support/fixtures/vcr_cassettes/user_management/enroll_auth_factor/invalid.yml
|
479
491
|
- spec/support/fixtures/vcr_cassettes/user_management/enroll_auth_factor/valid.yml
|
492
|
+
- spec/support/fixtures/vcr_cassettes/user_management/get_email_verification/invalid.yml
|
493
|
+
- spec/support/fixtures/vcr_cassettes/user_management/get_email_verification/valid.yml
|
480
494
|
- spec/support/fixtures/vcr_cassettes/user_management/get_invitation/invalid.yml
|
481
495
|
- spec/support/fixtures/vcr_cassettes/user_management/get_invitation/valid.yml
|
482
496
|
- spec/support/fixtures/vcr_cassettes/user_management/get_magic_auth/invalid.yml
|
483
497
|
- spec/support/fixtures/vcr_cassettes/user_management/get_magic_auth/valid.yml
|
484
498
|
- spec/support/fixtures/vcr_cassettes/user_management/get_organization_membership.yml
|
499
|
+
- spec/support/fixtures/vcr_cassettes/user_management/get_password_reset/invalid.yml
|
500
|
+
- spec/support/fixtures/vcr_cassettes/user_management/get_password_reset/valid.yml
|
485
501
|
- spec/support/fixtures/vcr_cassettes/user_management/get_user.yml
|
486
502
|
- spec/support/fixtures/vcr_cassettes/user_management/list_auth_factors/invalid.yml
|
487
503
|
- spec/support/fixtures/vcr_cassettes/user_management/list_auth_factors/valid.yml
|
@@ -492,8 +508,10 @@ test_files:
|
|
492
508
|
- spec/support/fixtures/vcr_cassettes/user_management/list_invitations/with_organization_id.yml
|
493
509
|
- spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/no_options.yml
|
494
510
|
- spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/with_options.yml
|
511
|
+
- spec/support/fixtures/vcr_cassettes/user_management/list_organization_memberships/with_statuses_option.yml
|
495
512
|
- spec/support/fixtures/vcr_cassettes/user_management/list_users/no_options.yml
|
496
513
|
- spec/support/fixtures/vcr_cassettes/user_management/list_users/with_options.yml
|
514
|
+
- spec/support/fixtures/vcr_cassettes/user_management/reactivate_organization_membership.yml
|
497
515
|
- spec/support/fixtures/vcr_cassettes/user_management/reset_password/invalid.yml
|
498
516
|
- spec/support/fixtures/vcr_cassettes/user_management/reset_password/valid.yml
|
499
517
|
- spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/invalid.yml
|