workos 10.3.0 → 10.4.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.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +2 -2
  3. data/.github/workflows/docs.yml +3 -3
  4. data/.github/workflows/lint.yml +2 -2
  5. data/.github/workflows/release-please.yml +3 -3
  6. data/.github/workflows/release.yml +2 -2
  7. data/.last-synced-sha +1 -1
  8. data/.oagen-manifest.json +234 -156
  9. data/.release-please-manifest.json +1 -1
  10. data/.ruby-version +1 -1
  11. data/CHANGELOG.md +174 -0
  12. data/Gemfile.lock +14 -14
  13. data/README.md +23 -0
  14. data/lib/workos/admin_portal.rb +2 -2
  15. data/lib/workos/agents.rb +5 -1
  16. data/lib/workos/api_keys/validate_api_key.rb +12 -1
  17. data/lib/workos/base_client.rb +6 -2
  18. data/lib/workos/configuration.rb +3 -2
  19. data/lib/workos/inflections.rb +2 -0
  20. data/lib/workos/multi_factor_auth.rb +1 -1
  21. data/lib/workos/pipes/connected_account.rb +9 -0
  22. data/lib/workos/pipes/create_data_integration.rb +3 -0
  23. data/lib/workos/pipes/data_integration.rb +3 -0
  24. data/lib/workos/pipes/data_integration_installation.rb +9 -0
  25. data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +3 -0
  26. data/lib/workos/pipes/data_integrations_get_user_token_request.rb +11 -2
  27. data/lib/workos/pipes/data_integrations_list_response_data.rb +18 -3
  28. data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +9 -0
  29. data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +25 -1
  30. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +6 -0
  31. data/lib/workos/pipes/data_integrations_vend_credentials_request.rb +11 -2
  32. data/lib/workos/pipes.rb +324 -17
  33. data/lib/workos/session_manager.rb +11 -6
  34. data/lib/workos/shared/account_selection_required_error.rb +22 -0
  35. data/lib/workos/shared/pipe_connected_account.rb +15 -0
  36. data/lib/workos/shared/pipes_account_connection_add_failed.rb +34 -0
  37. data/lib/workos/shared/pipes_account_connection_add_failed_data.rb +49 -0
  38. data/lib/workos/shared/pipes_account_connection_connected.rb +34 -0
  39. data/lib/workos/shared/pipes_account_connection_connection_failed.rb +34 -0
  40. data/lib/workos/shared/pipes_account_connection_connection_failed_data.rb +7 -0
  41. data/lib/workos/shared/pipes_account_connection_disconnected.rb +34 -0
  42. data/lib/workos/shared/pipes_account_connection_reauthorization_needed.rb +34 -0
  43. data/lib/workos/shared/pipes_connected_account_connection_failed_data.rb +1 -40
  44. data/lib/workos/types/connected_account_connection_role.rb +13 -0
  45. data/lib/workos/types/create_data_integration_ownership.rb +13 -0
  46. data/lib/workos/types/create_webhook_endpoint_events.rb +6 -1
  47. data/lib/workos/types/data_integration_installation_connection_role.rb +9 -0
  48. data/lib/workos/types/data_integration_ownership.rb +9 -0
  49. data/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +9 -0
  50. data/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb +9 -0
  51. data/lib/workos/types/data_integrations_list_response_data_connected_account_connection_role.rb +9 -0
  52. data/lib/workos/types/data_integrations_list_response_data_connection_owner.rb +9 -0
  53. data/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb +9 -0
  54. data/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb +9 -0
  55. data/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb +9 -0
  56. data/lib/workos/types/pipe_connected_account_auth_method.rb +9 -0
  57. data/lib/workos/types/pipe_connected_account_connection_role.rb +9 -0
  58. data/lib/workos/types/pipes_ownership.rb +9 -0
  59. data/lib/workos/types/resource_export_completed_data_resource_type.rb +3 -1
  60. data/lib/workos/user_management/authkit_oauth_resource.rb +34 -0
  61. data/lib/workos/user_management/create_authkit_oauth_resource.rb +22 -0
  62. data/lib/workos/user_management.rb +87 -0
  63. data/lib/workos/version.rb +1 -1
  64. data/rbi/workos/account_selection_required_error.rbi +30 -0
  65. data/rbi/workos/agents.rbi +2 -1
  66. data/rbi/workos/authkit_oauth_resource.rbi +54 -0
  67. data/rbi/workos/connected_account.rbi +18 -0
  68. data/rbi/workos/create_authkit_oauth_resource.rbi +30 -0
  69. data/rbi/workos/create_data_integration.rbi +6 -0
  70. data/rbi/workos/data_integration.rbi +6 -0
  71. data/rbi/workos/data_integration_installation.rbi +19 -1
  72. data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +6 -0
  73. data/rbi/workos/data_integrations_get_user_token_request.rbi +18 -0
  74. data/rbi/workos/data_integrations_list_response_data.rbi +12 -0
  75. data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +18 -0
  76. data/rbi/workos/data_integrations_upsert_api_key_request.rbi +12 -0
  77. data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +12 -0
  78. data/rbi/workos/data_integrations_vend_credentials_request.rbi +18 -0
  79. data/rbi/workos/pipe_connected_account.rbi +30 -0
  80. data/rbi/workos/pipes.rbi +122 -11
  81. data/rbi/workos/pipes_account_connection_add_failed.rbi +54 -0
  82. data/rbi/workos/pipes_account_connection_add_failed_data.rbi +84 -0
  83. data/rbi/workos/pipes_account_connection_connected.rbi +54 -0
  84. data/rbi/workos/pipes_account_connection_connection_failed.rbi +54 -0
  85. data/rbi/workos/pipes_account_connection_connection_failed_data.rbi +84 -0
  86. data/rbi/workos/pipes_account_connection_disconnected.rbi +54 -0
  87. data/rbi/workos/pipes_account_connection_reauthorization_needed.rbi +54 -0
  88. data/rbi/workos/pipes_connected_account_connection_failed_data.rbi +6 -0
  89. data/rbi/workos/user_management.rbi +28 -0
  90. data/test/workos/test_pipes.rb +64 -0
  91. data/test/workos/test_pipes_model_round_trip.rb +35 -5
  92. data/test/workos/test_session.rb +63 -0
  93. data/test/workos/test_shared_model_round_trip.rb +161 -0
  94. data/test/workos/test_user_management.rb +24 -0
  95. data/test/workos/test_user_management_model_round_trip.rb +32 -0
  96. metadata +35 -1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,179 @@
1
1
  # Changelog
2
2
 
3
+ ## [10.4.0](https://github.com/workos/workos-ruby/compare/v10.3.0...v10.4.0) (2026-09-18)
4
+
5
+ ### Features
6
+
7
+ * Add optional jwt_issuer option for session token validation ([#552](https://github.com/workos/workos-ruby/issues/552)) ([841bf57](https://github.com/workos/workos-ruby/commit/841bf57ed103bf8f1d1a079f7a0d70edb9e7a854))
8
+
9
+ * [#550](https://github.com/workos/workos-ruby/pull/550) fix(generated): regenerate from spec
10
+
11
+ **Features**
12
+ * **[pipes](https://workos.com/docs/reference/pipes)**:
13
+ * Added `connected_account_id` to `DataIntegrationsVendCredentialsRequest`
14
+ * Added `connected_account_id` to `DataIntegrationsGetUserTokenRequest`
15
+ * Added parameter `UserManagementDataProviders.getUserDataInstallation.connected_account_id`
16
+ * Changed errors for endpoint `GET /user_management/users/{user_id}/connected_accounts/{slug}`
17
+ * Added parameter `UserManagementDataProviders.updateUserDataInstallation.connected_account_id`
18
+ * Changed errors for endpoint `PUT /user_management/users/{user_id}/connected_accounts/{slug}`
19
+ * Added parameter `UserManagementDataProviders.deleteUserDataInstallation.connected_account_id`
20
+ * Changed errors for endpoint `DELETE /user_management/users/{user_id}/connected_accounts/{slug}`
21
+ * Added `connected_accounts` to `DataIntegrationsListResponseData`
22
+ * Changed errors for endpoint `PUT /data-integrations/{slug}`
23
+ * Changed errors for endpoint `PUT /data-integrations/{slug}/api-key`
24
+ * Changed errors for endpoint `PUT /data-integrations/{slug}/client-credentials`
25
+ * Changed errors for endpoint `POST /data-integrations/{slug}/credentials`
26
+ * Changed errors for endpoint `POST /data-integrations/{provider}/token`
27
+
28
+ * [#553](https://github.com/workos/workos-ruby/pull/553) feat(generated): regenerate from spec (4 changes)
29
+
30
+ **Features**
31
+ * **[admin_portal](https://workos.com/docs/reference/admin-portal)**:
32
+ * Changed the format of `PortalLinkResponse.link`
33
+ * **[agents](https://workos.com/docs/reference/agents)**:
34
+ * Added parameter `AgentsSessions.list.organization_id`
35
+ * Changed the format of `ClaimViewResponse.user_code`
36
+ * Changed the format of `AgentAdminValidateCredentialRequest.credential`
37
+ * **[api_keys](https://workos.com/docs/reference/authkit/api-keys)**:
38
+ * Changed the format of `ValidateApiKey.value`
39
+ * Changed the format of `OrganizationApiKeyWithValue.value`
40
+ * Changed the format of `UserApiKeyWithValue.value`
41
+ * **[multi_factor_auth](https://workos.com/docs/reference/authkit/mfa)**:
42
+ * Changed the format of `AuthenticationChallenge.code`
43
+ * Changed the format of `AuthenticationFactorEnrolledTotp.secret`
44
+ * Changed the format of `AuthenticationFactorEnrolledTotp.qr_code`
45
+ * Changed the format of `AuthenticationFactorEnrolledTotp.uri`
46
+ * Changed the format of `AuthenticationChallengesVerifyRequest.code`
47
+ * **[pipes](https://workos.com/docs/reference/pipes)**:
48
+ * Added `supports_multiple_connections` to `DataIntegrationsVendCredentialsRequest`
49
+ * Added `supports_multiple_connections` to `DataIntegrationsGetUserTokenRequest`
50
+ * Added parameter `UserManagementDataProviders.getUserDataInstallation.supports_multiple_connections`
51
+ * Added parameter `UserManagementDataProviders.updateUserDataInstallation.supports_multiple_connections`
52
+ * Added parameter `UserManagementDataProviders.deleteUserDataInstallation.supports_multiple_connections`
53
+ * Added parameter `UserManagementDataProviders.getUserDataIntegrations.supports_multiple_connections`
54
+ * Added enum `PipesOwnership`
55
+ * Added `user` to `CreateDataIntegrationOwnership`
56
+ * Added `user` to `DataIntegrationOwnership`
57
+ * Added endpoint `GET /data-integrations/{slug}/organization`
58
+ * Added endpoint `PUT /data-integrations/{slug}/organization`
59
+ * Added endpoint `DELETE /data-integrations/{slug}/organization`
60
+ * Added parameter `Pipes.listDataIntegrations.ownership`
61
+ * Changed errors for endpoint `GET /data-integrations`
62
+ * Changed errors for endpoint `PUT /user_management/users/{user_id}/connected_accounts/{slug}`
63
+ * Changed errors for endpoint `DELETE /user_management/users/{user_id}/connected_accounts/{slug}`
64
+ * Changed the format of `DataIntegrationCredentialsResponseCredential.value`
65
+ * Added `connection_owner` to `DataIntegrationsUpsertApiKeyRequest`
66
+ * Added `connection_owner` to `DataIntegrationsUpsertClientCredentialsRequest`
67
+ * Added enum `DataIntegrationsUpsertApiKeyRequestConnectionOwner`
68
+ * Added enum `DataIntegrationsUpsertClientCredentialsRequestConnectionOwner`
69
+ * Added model `AccountSelectionRequiredError`
70
+ * Added `connected_account_id` to `DataIntegrationsUpsertApiKeyRequest`
71
+ * Added `connected_account_id` to `DataIntegrationsUpsertClientCredentialsRequest`
72
+ * Added `ownership` to `CreateDataIntegration`
73
+ * Added `ownership` to `DataIntegration`
74
+ * Added `connection_owner` to `DataIntegrationsVendCredentialsRequest`
75
+ * Added `connection_owner` to `DataIntegrationsGetUserTokenRequest`
76
+ * Added enum `CreateDataIntegrationOwnership`
77
+ * Added enum `DataIntegrationOwnership`
78
+ * Added enum `DataIntegrationsVendCredentialsRequestConnectionOwner`
79
+ * Added enum `DataIntegrationsGetUserTokenRequestConnectionOwner`
80
+ * Changed errors for endpoint `POST /data-integrations/{slug}/credentials`
81
+ * Changed errors for endpoint `POST /data-integrations/{provider}/token`
82
+ * **[sso](https://workos.com/docs/reference/sso)**:
83
+ * Changed the format of `CreateConnectionKeyPair.key`
84
+ * Changed the format of `TokenQuery.code`
85
+ * Changed the format of `SSOLogoutAuthorizeResponse.logout_url`
86
+ * **[user_management](https://workos.com/docs/reference/authkit/user)**:
87
+ * Added model `CreateAuthkitOAuthResource`
88
+ * Added model `AuthkitOAuthResource`
89
+ * Added service `UserManagementAuthkitOAuthResources`
90
+ * Changed the format of `DeviceAuthorizationResponse.verification_uri_complete`
91
+ * Changed the format of `VerifyEmailAddress.code`
92
+ * Changed the format of `ConfirmEmailChange.code`
93
+ * Changed the format of `MagicAuth.code`
94
+ * Changed the format of `UserInvite.accept_invitation_url`
95
+ * Changed the format of `EmailVerification.code`
96
+ * Changed the format of `PasswordReset.password_reset_url`
97
+ * Changed the format of `AuthenticateResponse.authkit_authorization_code`
98
+ * Changed the format of `DeviceAuthorizationResponse.device_code`
99
+ * Changed the format of `DeviceAuthorizationResponse.user_code`
100
+ * Changed the format of `AuthorizationCodeSessionAuthenticateRequest.code`
101
+ * Changed the format of `AuthorizationCodeSessionAuthenticateRequest.code_verifier`
102
+ * Changed the format of `MagicAuthCodeSessionAuthenticateRequest.code`
103
+ * Changed the format of `EmailVerificationCodeSessionAuthenticateRequest.code`
104
+ * Changed the format of `MfaTotpSessionAuthenticateRequest.code`
105
+ * Changed the format of `RadarEmailChallengeCodeSessionAuthenticateRequest.code`
106
+ * Changed the format of `RadarSmsChallengeCodeSessionAuthenticateRequest.code`
107
+ * Changed the format of `DeviceCodeSessionAuthenticateRequest.device_code`
108
+ * Changed the format of `Invitation.accept_invitation_url`
109
+ * Changed the format of `MagicAuthSendMagicAuthCodeAndReturnResponse.code`
110
+ * **[radar](https://workos.com/docs/reference/radar)**:
111
+ * Changed the format of `RadarChallenge.code`
112
+ * **[vault](https://workos.com/docs/reference/vault)**:
113
+ * Changed the format of `CreateObjectRequest.value`
114
+ * Changed the format of `VaultObject.value`
115
+ * Changed the format of `UpdateObjectRequest.value`
116
+
117
+ **Fixes**
118
+ * **[pipes](https://workos.com/docs/reference/pipes)**:
119
+ * Removed `userland_user` from `CreateDataIntegrationOwnership`
120
+ * Removed `userland_user` from `DataIntegrationOwnership`
121
+ * Changed errors for endpoint `POST /user_management/users/{user_id}/connected_accounts/{slug}`
122
+ * Changed errors for endpoint `PUT /data-integrations/{slug}/api-key`
123
+ * Changed errors for endpoint `PUT /data-integrations/{slug}/client-credentials`
124
+ * Changed errors for endpoint `POST /data-integrations/{slug}/credentials`
125
+ * Changed errors for endpoint `POST /data-integrations/{provider}/token`
126
+ * Changed errors for endpoint `GET /user_management/users/{user_id}/connected_accounts/{slug}`
127
+ * Changed errors for endpoint `PUT /user_management/users/{user_id}/connected_accounts/{slug}`
128
+ * Changed errors for endpoint `DELETE /user_management/users/{user_id}/connected_accounts/{slug}`
129
+ * Changed the type of `DataIntegrationInstallation.user_id`
130
+
131
+ * [#556](https://github.com/workos/workos-ruby/pull/556) fix(generated): regenerate from spec (1 change)
132
+
133
+ **Features**
134
+ * **[multi_factor_auth](https://workos.com/docs/reference/authkit/mfa)**:
135
+ * Changed errors for endpoint `POST /auth/factors/{id}/challenge`
136
+ * **[pipes](https://workos.com/docs/reference/pipes)**:
137
+ * Added `connection_owner` to `DataIntegrationsListResponseData`
138
+ * Added enum `DataIntegrationsListResponseDataConnectionOwner`
139
+ * Added `connection_role` to `DataIntegrationsListResponseDataConnectedAccount`
140
+ * Added `account_identifier` to `DataIntegrationsListResponseDataConnectedAccount`
141
+ * Added `account_display_name` to `DataIntegrationsListResponseDataConnectedAccount`
142
+ * Added enum `DataIntegrationsListResponseDataConnectedAccountConnectionRole`
143
+ * Added `connection_role` to `DataIntegrationInstallation`
144
+ * Added `account_identifier` to `DataIntegrationInstallation`
145
+ * Added `account_display_name` to `DataIntegrationInstallation`
146
+ * Added enum `DataIntegrationInstallationConnectionRole`
147
+ * Added `connection_owner` to `DataIntegrationsGetDataIntegrationAuthorizeUrlRequest`
148
+ * Added enum `DataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner`
149
+ * Added the organization connected-account operations on `Pipes`: `client.pipes.get_organization_connected_account`, `create_organization_connected_account`, `update_organization_connected_account`, `delete_organization_connected_account`, `list_organization_data_providers`
150
+ * **[connect](https://workos.com/docs/reference/workos-connect/standalone)**:
151
+ * Added `connection_role` to `ConnectedAccount`
152
+ * Added `account_identifier` to `ConnectedAccount`
153
+ * Added `account_display_name` to `ConnectedAccount`
154
+ * Added enum `ConnectedAccountConnectionRole`
155
+ * **[webhooks](https://workos.com/docs/reference/webhooks)**:
156
+ * Added `pipes.account_connection.add_failed` to `CreateWebhookEndpointEvents`
157
+ * Added `pipes.account_connection.connected` to `CreateWebhookEndpointEvents`
158
+ * Added `pipes.account_connection.connection_failed` to `CreateWebhookEndpointEvents`
159
+ * Added `pipes.account_connection.disconnected` to `CreateWebhookEndpointEvents`
160
+ * Added `pipes.account_connection.reauthorization_needed` to `CreateWebhookEndpointEvents`
161
+ * Added `pipes.account_connection.add_failed` to `UpdateWebhookEndpointEvents`
162
+ * Added `pipes.account_connection.connected` to `UpdateWebhookEndpointEvents`
163
+ * Added `pipes.account_connection.connection_failed` to `UpdateWebhookEndpointEvents`
164
+ * Added `pipes.account_connection.disconnected` to `UpdateWebhookEndpointEvents`
165
+ * Added `pipes.account_connection.reauthorization_needed` to `UpdateWebhookEndpointEvents`
166
+
167
+ **Fixes**
168
+ * **[multi_factor_auth](https://workos.com/docs/reference/authkit/mfa)**:
169
+ * Changed errors for endpoint `POST /auth/factors/{id}/challenge`
170
+
171
+ * [#557](https://github.com/workos/workos-ruby/pull/557) fix(generated): regenerate from spec (1 change)
172
+
173
+ **Fixes**
174
+ * **[multi_factor_auth](https://workos.com/docs/reference/authkit/mfa)**:
175
+ * Changed errors for endpoint `POST /auth/factors/{id}/challenge`
176
+
3
177
  ## [10.3.0](https://github.com/workos/workos-ruby/compare/v10.2.1...v10.3.0) (2026-09-01)
4
178
 
5
179
  * [#546](https://github.com/workos/workos-ruby/pull/546) feat(generated)!: regenerate from spec (5 changes)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workos (10.3.0)
4
+ workos (10.4.0)
5
5
  jwt (~> 3.1)
6
6
  logger (~> 1.7)
7
7
  zeitwerk (~> 2.6)
@@ -17,12 +17,12 @@ GEM
17
17
  crack (1.0.1)
18
18
  bigdecimal
19
19
  rexml
20
- csv (3.3.5)
20
+ csv (3.3.6)
21
21
  date (3.5.1)
22
22
  drb (2.2.3)
23
- erb (6.0.4)
23
+ erb (6.0.7)
24
24
  hashdiff (1.2.1)
25
- json (2.19.4)
25
+ json (2.19.9)
26
26
  jwt (3.2.0)
27
27
  base64
28
28
  language_server-protocol (3.17.0.5)
@@ -36,7 +36,7 @@ GEM
36
36
  ast (~> 2.4.1)
37
37
  racc
38
38
  prism (1.9.0)
39
- psych (5.3.1)
39
+ psych (5.5.0)
40
40
  date
41
41
  stringio
42
42
  public_suffix (7.0.5)
@@ -90,8 +90,8 @@ GEM
90
90
  crack (>= 0.3.2)
91
91
  hashdiff (>= 0.4.0, < 2.0.0)
92
92
  webrick (1.9.2)
93
- yard (0.9.44)
94
- yard-markdown (0.7.1)
93
+ yard (0.9.45)
94
+ yard-markdown (0.9.1)
95
95
  csv
96
96
  rdoc
97
97
  yard
@@ -118,12 +118,12 @@ CHECKSUMS
118
118
  base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
119
119
  bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
120
120
  crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e
121
- csv (3.3.5) sha256=6e5134ac3383ef728b7f02725d9872934f523cb40b961479f69cf3afa6c8e73f
121
+ csv (3.3.6) sha256=aba61e7e507a66f03d45cb1f3c4b6359861c3504038b422962875dce099e4456
122
122
  date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
123
123
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
124
- erb (6.0.4) sha256=38e3803694be357fe2bfe312487c74beaf9fb4e5beb3e22498952fe1645b95d9
124
+ erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
125
125
  hashdiff (1.2.1) sha256=9c079dbc513dfc8833ab59c0c2d8f230fa28499cc5efb4b8dd276cf931457cd1
126
- json (2.19.4) sha256=670a7d333fb3b18ca5b29cb255eb7bef099e40d88c02c80bd42a3f30fe5239ac
126
+ json (2.19.9) sha256=9b9025b7cdddafa38d316eca0b2358488e42d417045c1b90d216a9fefe46b79a
127
127
  jwt (3.2.0) sha256=5419b1fe37b1da0982bd07051f573a8b8789ab724c2aa7e785e4784a3ed217d7
128
128
  language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
129
129
  lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
@@ -132,7 +132,7 @@ CHECKSUMS
132
132
  parallel (1.28.0) sha256=33e6de1484baf2524792d178b0913fc8eb94c628d6cfe45599ad4458c638c970
133
133
  parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
134
134
  prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
135
- psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
135
+ psych (5.5.0) sha256=4b245bbbd0f3238df8ccee766ebc1a6b062b10e4ee1d3284eb588739ba156a0a
136
136
  public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
137
137
  racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
138
138
  rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
@@ -153,9 +153,9 @@ CHECKSUMS
153
153
  unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
154
154
  webmock (3.26.2) sha256=774556f2ea6371846cca68c01769b2eac0d134492d21f6d0ab5dd643965a4c90
155
155
  webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
156
- workos (10.3.0)
157
- yard (0.9.44) sha256=eb087e9b631ccd887b049f303d489963945452d5e2a7eb49a5a74a7cf6887f28
158
- yard-markdown (0.7.1) sha256=06c378632dfe7ba053be9ba469eb4701aa0470e36bcf7e5546f353eb90c1bfd1
156
+ workos (10.4.0)
157
+ yard (0.9.45) sha256=52e211493f7cb8a3ebf7e104a25a1e73937a3103092545d34cb88fafebb3dc51
158
+ yard-markdown (0.9.1) sha256=51adf55a814172f70ed81fbd1af4dc42c0e1a698915f7da33eff5a3bb527062d
159
159
  zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd
160
160
 
161
161
  BUNDLED WITH
data/README.md CHANGED
@@ -155,6 +155,29 @@ Anything shorter than 32 bytes (including `nil` or `""`) raises
155
155
  `ArgumentError` as soon as you load, seal, or unseal a session — sealing or
156
156
  unsealing will not silently proceed with a weakened key.
157
157
 
158
+ ### Validating the access token issuer
159
+
160
+ By default the SDK verifies the signature and expiry of session access tokens
161
+ but does not check the `iss` claim. To also require a specific issuer (or one
162
+ of several), set `jwt_issuer` on the client — either a single string or an
163
+ array of accepted issuers:
164
+
165
+ ```ruby
166
+ WorkOS.configure do |config|
167
+ config.jwt_issuer = "https://api.workos.com/user_management/#{ENV["WORKOS_CLIENT_ID"]}"
168
+ end
169
+
170
+ # or per client
171
+ client = WorkOS::Client.new(
172
+ api_key: ENV.fetch("WORKOS_API_KEY"),
173
+ client_id: ENV["WORKOS_CLIENT_ID"],
174
+ jwt_issuer: ["https://api.workos.com", "https://auth.example.com"]
175
+ )
176
+ ```
177
+
178
+ Tokens whose `iss` is not in the configured set fail authentication with
179
+ reason `WorkOS::SessionManager::INVALID_JWT`.
180
+
158
181
  ### Verify a webhook
159
182
 
160
183
  ```ruby
@@ -11,8 +11,8 @@ module WorkOS
11
11
  end
12
12
 
13
13
  # Generate a Portal Link
14
- # @param return_url [String, nil] The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
15
- # @param success_url [String, nil] The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
14
+ # @param return_url [String, nil] The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
15
+ # @param success_url [String, nil] The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
16
16
  # @param organization [String] An [Organization](https://workos.com/docs/reference/organization) identifier.
17
17
  # @param intent [WorkOS::Types::GenerateLinkIntent, nil] The intent of the Admin Portal. - `sso` - Launch Admin Portal for creating SSO connections - `dsync` - Launch Admin Portal for creating Directory Sync connections - `audit_logs` - Launch Admin Portal for viewing Audit Logs - `log_streams` - Launch Admin Portal for creating Log Streams - `domain_verification` - Launch Admin Portal for Domain Verification - `certificate_renewal` - Launch Admin Portal for renewing SAML Certificates - `bring_your_own_key` - Launch Admin Portal for configuring Bring Your Own Key
18
18
  # @param it_contact_emails [Array<String>, nil] The email addresses of the IT contacts to grant access to the Admin Portal for the given organization. Accepts up to 20 emails.
data/lib/workos/agents.rb CHANGED
@@ -400,6 +400,7 @@ module WorkOS
400
400
  # @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
401
401
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
402
402
  # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
403
+ # @param organization_id [String, nil] Only return sessions of instances acting within this organization.
403
404
  # @param agent_blueprint_id [String, nil] Only return sessions of instances minted from this blueprint.
404
405
  # @param agent_instance_id [String, nil] Only return sessions belonging to this agent instance.
405
406
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
@@ -409,6 +410,7 @@ module WorkOS
409
410
  after: nil,
410
411
  limit: 10,
411
412
  order: "desc",
413
+ organization_id: nil,
412
414
  agent_blueprint_id: nil,
413
415
  agent_instance_id: nil,
414
416
  request_options: {}
@@ -418,6 +420,7 @@ module WorkOS
418
420
  "after" => after,
419
421
  "limit" => limit,
420
422
  "order" => order,
423
+ "organization_id" => organization_id,
421
424
  "agent_blueprint_id" => agent_blueprint_id,
422
425
  "agent_instance_id" => agent_instance_id
423
426
  }.compact
@@ -434,6 +437,7 @@ module WorkOS
434
437
  after: cursor,
435
438
  limit: limit,
436
439
  order: order,
440
+ organization_id: organization_id,
437
441
  agent_blueprint_id: agent_blueprint_id,
438
442
  agent_instance_id: agent_instance_id,
439
443
  request_options: request_options
@@ -442,7 +446,7 @@ module WorkOS
442
446
  WorkOS::Types::ListStruct.from_response(
443
447
  response,
444
448
  model: WorkOS::AgentInstanceSession,
445
- filters: {before: before, limit: limit, order: order, agent_blueprint_id: agent_blueprint_id, agent_instance_id: agent_instance_id},
449
+ filters: {before: before, limit: limit, order: order, organization_id: organization_id, agent_blueprint_id: agent_blueprint_id, agent_instance_id: agent_instance_id},
446
450
  fetch_next: fetch_next
447
451
  )
448
452
  end
@@ -3,5 +3,16 @@
3
3
  # This file is auto-generated by oagen. Do not edit.
4
4
 
5
5
  module WorkOS
6
- ValidateApiKey = CreateSAMLIdpSigningCertificate
6
+ class ValidateApiKey < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ value: :value
9
+ }.freeze
10
+
11
+ attr_accessor :value
12
+
13
+ def initialize(json)
14
+ hash = self.class.normalize(json)
15
+ @value = hash[:value]
16
+ end
17
+ end
7
18
  end
@@ -41,11 +41,14 @@ module WorkOS
41
41
  "v#{WorkOS::VERSION}"
42
42
  ].join("; ").freeze
43
43
 
44
- attr_reader :api_key, :base_url, :client_id, :timeout, :max_retries, :logger, :log_level
44
+ attr_reader :api_key, :base_url, :client_id, :timeout, :max_retries, :logger, :log_level, :jwt_issuer
45
45
 
46
+ # @param jwt_issuer [String, Array<String>, nil] Expected `iss` claim of
47
+ # session access tokens (one issuer or a list of accepted issuers).
48
+ # When nil, the issuer is not validated.
46
49
  def initialize(api_key: nil, base_url: DEFAULT_BASE_URL, client_id: nil,
47
50
  timeout: DEFAULT_TIMEOUT, max_retries: DEFAULT_MAX_RETRIES,
48
- logger: nil, log_level: nil, random: Random.new)
51
+ logger: nil, log_level: nil, jwt_issuer: nil, random: Random.new)
49
52
  @api_key = api_key
50
53
  @base_url = base_url
51
54
  @client_id = client_id
@@ -53,6 +56,7 @@ module WorkOS
53
56
  @max_retries = max_retries
54
57
  @logger = logger
55
58
  @log_level = log_level
59
+ @jwt_issuer = jwt_issuer
56
60
  @random = random
57
61
  end
58
62
 
@@ -12,7 +12,7 @@ module WorkOS
12
12
  # config.log_level = :info
13
13
  # end
14
14
  class Configuration
15
- attr_accessor :api_key, :base_url, :client_id, :timeout, :max_retries, :logger, :log_level
15
+ attr_accessor :api_key, :base_url, :client_id, :timeout, :max_retries, :logger, :log_level, :jwt_issuer
16
16
 
17
17
  def initialize
18
18
  @base_url = WorkOS::BaseClient::DEFAULT_BASE_URL
@@ -47,7 +47,8 @@ module WorkOS
47
47
  timeout: configuration.timeout,
48
48
  max_retries: configuration.max_retries,
49
49
  logger: configuration.logger,
50
- log_level: configuration.log_level
50
+ log_level: configuration.log_level,
51
+ jwt_issuer: configuration.jwt_issuer
51
52
  )
52
53
  end
53
54
 
@@ -31,6 +31,7 @@ WORKOS_INFLECTIONS = {
31
31
  "authentication_sso_timed_out_data" => "AuthenticationSSOTimedOutData",
32
32
  "authentication_sso_timed_out_data_error" => "AuthenticationSSOTimedOutDataError",
33
33
  "authentication_sso_timed_out_data_sso" => "AuthenticationSSOTimedOutDataSSO",
34
+ "authkit_oauth_resource" => "AuthkitOAuthResource",
34
35
  "connect_application_m2m" => "ConnectApplicationM2M",
35
36
  "connect_application_oauth" => "ConnectApplicationOAuth",
36
37
  "connect_application_oauth_redirect_uris" => "ConnectApplicationOAuthRedirectUris",
@@ -45,6 +46,7 @@ WORKOS_INFLECTIONS = {
45
46
  "connection_saml_certificate_renewed_data_certificate_certificate_type" => "ConnectionSAMLCertificateRenewedDataCertificateCertificateType",
46
47
  "connection_saml_certificate_renewed_data_connection" => "ConnectionSAMLCertificateRenewedDataConnection",
47
48
  "cors_origin_response" => "CORSOriginResponse",
49
+ "create_authkit_oauth_resource" => "CreateAuthkitOAuthResource",
48
50
  "create_connection_oidc_options" => "CreateConnectionOIDCOptions",
49
51
  "create_connection_oidc_options_id_token_signature_algorithm" => "CreateConnectionOIDCOptionsIdTokenSignatureAlgorithm",
50
52
  "create_connection_oidc_options_token_authentication_method" => "CreateConnectionOIDCOptionsTokenAuthenticationMethod",
@@ -108,7 +108,7 @@ module WorkOS
108
108
 
109
109
  # Challenge Factor
110
110
  # @param id [String] The unique ID of the Authentication Factor to be challenged.
111
- # @param sms_template [String, nil] A custom template for the SMS message. Use the {{code}} placeholder to include the verification code.
111
+ # @param sms_template [String, nil] A custom template for the SMS message. Use the {{code}} placeholder to include the verification code. Must not contain URLs or domain names.
112
112
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
113
113
  # @return [WorkOS::AuthenticationChallenge]
114
114
  def challenge_factor(
@@ -7,6 +7,9 @@ module WorkOS
7
7
  HASH_ATTRS = {
8
8
  object: :object,
9
9
  id: :id,
10
+ connection_role: :connection_role,
11
+ account_identifier: :account_identifier,
12
+ account_display_name: :account_display_name,
10
13
  user_id: :user_id,
11
14
  organization_id: :organization_id,
12
15
  scopes: :scopes,
@@ -23,6 +26,9 @@ module WorkOS
23
26
  attr_accessor \
24
27
  :object,
25
28
  :id,
29
+ :connection_role,
30
+ :account_identifier,
31
+ :account_display_name,
26
32
  :user_id,
27
33
  :organization_id,
28
34
  :scopes,
@@ -39,6 +45,9 @@ module WorkOS
39
45
  hash = self.class.normalize(json)
40
46
  @object = hash[:object]
41
47
  @id = hash[:id]
48
+ @connection_role = hash[:connection_role]
49
+ @account_identifier = hash[:account_identifier]
50
+ @account_display_name = hash[:account_display_name]
42
51
  @user_id = hash[:user_id]
43
52
  @organization_id = hash[:organization_id]
44
53
  @scopes = hash[:scopes] || []
@@ -6,6 +6,7 @@ module WorkOS
6
6
  class CreateDataIntegration < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
8
  provider: :provider,
9
+ ownership: :ownership,
9
10
  description: :description,
10
11
  enabled: :enabled,
11
12
  scopes: :scopes,
@@ -18,6 +19,7 @@ module WorkOS
18
19
 
19
20
  attr_accessor \
20
21
  :provider,
22
+ :ownership,
21
23
  :description,
22
24
  :enabled,
23
25
  :scopes,
@@ -30,6 +32,7 @@ module WorkOS
30
32
  def initialize(json)
31
33
  hash = self.class.normalize(json)
32
34
  @provider = hash[:provider]
35
+ @ownership = hash[:ownership]
33
36
  @description = hash[:description]
34
37
  @enabled = hash[:enabled]
35
38
  @scopes = hash[:scopes] || []
@@ -9,6 +9,7 @@ module WorkOS
9
9
  id: :id,
10
10
  slug: :slug,
11
11
  integration_type: :integration_type,
12
+ ownership: :ownership,
12
13
  description: :description,
13
14
  enabled: :enabled,
14
15
  state: :state,
@@ -28,6 +29,7 @@ module WorkOS
28
29
  :id,
29
30
  :slug,
30
31
  :integration_type,
32
+ :ownership,
31
33
  :description,
32
34
  :enabled,
33
35
  :state,
@@ -47,6 +49,7 @@ module WorkOS
47
49
  @id = hash[:id]
48
50
  @slug = hash[:slug]
49
51
  @integration_type = hash[:integration_type]
52
+ @ownership = hash[:ownership]
50
53
  @description = hash[:description]
51
54
  @enabled = hash[:enabled]
52
55
  @state = hash[:state]
@@ -6,6 +6,9 @@ module WorkOS
6
6
  class DataIntegrationInstallation < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
8
  id: :id,
9
+ connection_role: :connection_role,
10
+ account_identifier: :account_identifier,
11
+ account_display_name: :account_display_name,
9
12
  user_id: :user_id,
10
13
  organization_id: :organization_id,
11
14
  api_key_last_4: :api_key_last_4
@@ -13,6 +16,9 @@ module WorkOS
13
16
 
14
17
  attr_accessor \
15
18
  :id,
19
+ :connection_role,
20
+ :account_identifier,
21
+ :account_display_name,
16
22
  :user_id,
17
23
  :organization_id,
18
24
  :api_key_last_4
@@ -20,6 +26,9 @@ module WorkOS
20
26
  def initialize(json)
21
27
  hash = self.class.normalize(json)
22
28
  @id = hash[:id]
29
+ @connection_role = hash[:connection_role]
30
+ @account_identifier = hash[:account_identifier]
31
+ @account_display_name = hash[:account_display_name]
23
32
  @user_id = hash[:user_id]
24
33
  @organization_id = hash[:organization_id]
25
34
  @api_key_last_4 = hash[:api_key_last_4]
@@ -7,6 +7,7 @@ module WorkOS
7
7
  HASH_ATTRS = {
8
8
  user_id: :user_id,
9
9
  organization_id: :organization_id,
10
+ connection_owner: :connection_owner,
10
11
  return_to: :return_to,
11
12
  config: :config
12
13
  }.freeze
@@ -14,6 +15,7 @@ module WorkOS
14
15
  attr_accessor \
15
16
  :user_id,
16
17
  :organization_id,
18
+ :connection_owner,
17
19
  :return_to,
18
20
  :config
19
21
 
@@ -21,6 +23,7 @@ module WorkOS
21
23
  hash = self.class.normalize(json)
22
24
  @user_id = hash[:user_id]
23
25
  @organization_id = hash[:organization_id]
26
+ @connection_owner = hash[:connection_owner]
24
27
  @return_to = hash[:return_to]
25
28
  @config = hash[:config] || {}
26
29
  end
@@ -6,17 +6,26 @@ module WorkOS
6
6
  class DataIntegrationsGetUserTokenRequest < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
8
  user_id: :user_id,
9
- organization_id: :organization_id
9
+ organization_id: :organization_id,
10
+ connected_account_id: :connected_account_id,
11
+ connection_owner: :connection_owner,
12
+ supports_multiple_connections: :supports_multiple_connections
10
13
  }.freeze
11
14
 
12
15
  attr_accessor \
13
16
  :user_id,
14
- :organization_id
17
+ :organization_id,
18
+ :connected_account_id,
19
+ :connection_owner,
20
+ :supports_multiple_connections
15
21
 
16
22
  def initialize(json)
17
23
  hash = self.class.normalize(json)
18
24
  @user_id = hash[:user_id]
19
25
  @organization_id = hash[:organization_id]
26
+ @connected_account_id = hash[:connected_account_id]
27
+ @connection_owner = hash[:connection_owner]
28
+ @supports_multiple_connections = hash[:supports_multiple_connections]
20
29
  end
21
30
  end
22
31
  end
@@ -14,12 +14,17 @@ module WorkOS
14
14
  credentials_type: :credentials_type,
15
15
  scopes: :scopes,
16
16
  auth_methods: :auth_methods,
17
+ connection_owner: :connection_owner,
17
18
  ownership: :ownership,
18
19
  created_at: :created_at,
19
20
  updated_at: :updated_at,
20
- connected_account: :connected_account
21
+ connected_account: :connected_account,
22
+ connected_accounts: :connected_accounts
21
23
  }.freeze
22
24
 
25
+ # @!attribute ownership
26
+ # @deprecated Use `connection_owner` instead. Legacy spelling of the same value: `userland_user` corresponds to `connection_owner: "user"` and `organization` to `connection_owner: "organization"`.
27
+
23
28
  attr_accessor \
24
29
  :object,
25
30
  :id,
@@ -30,10 +35,18 @@ module WorkOS
30
35
  :credentials_type,
31
36
  :scopes,
32
37
  :auth_methods,
33
- :ownership,
38
+ :connection_owner,
34
39
  :created_at,
35
40
  :updated_at,
36
- :connected_account
41
+ :connected_account,
42
+ :connected_accounts
43
+
44
+ def ownership
45
+ warn "[DEPRECATION] `ownership` is deprecated and will be removed in a future version.", uplevel: 1
46
+ @ownership
47
+ end
48
+
49
+ attr_writer :ownership
37
50
 
38
51
  def initialize(json)
39
52
  hash = self.class.normalize(json)
@@ -46,10 +59,12 @@ module WorkOS
46
59
  @credentials_type = hash[:credentials_type]
47
60
  @scopes = hash[:scopes] || []
48
61
  @auth_methods = hash[:auth_methods] || []
62
+ @connection_owner = hash[:connection_owner]
49
63
  @ownership = hash[:ownership]
50
64
  @created_at = hash[:created_at]
51
65
  @updated_at = hash[:updated_at]
52
66
  @connected_account = hash[:connected_account] ? WorkOS::DataIntegrationsListResponseDataConnectedAccount.new(hash[:connected_account]) : nil
67
+ @connected_accounts = (hash[:connected_accounts] || []).map { |item| item ? WorkOS::DataIntegrationsListResponseDataConnectedAccount.new(item) : nil }
53
68
  end
54
69
  end
55
70
  end