stytch 8.0.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccc9948429ae0e2593b84c5cc3a67f23ab3203c23884b93a58af2a7c6aa34c0b
4
- data.tar.gz: bf365eef52a61a836855abf747aaab619b98244cdfef94fc091ee74366993e1b
3
+ metadata.gz: c5075518300c9fb8d82d98b80851825a1bfc72d61b637dbbbc54df07ad4b40f9
4
+ data.tar.gz: e4abd2aec41c59f9d9605f0c6f43a62d5d4126991cfe89b5e96ad293a33922d5
5
5
  SHA512:
6
- metadata.gz: fc4cefae842f14dadd8152eb61095abb6969b4abe934c33f9fcf168377642a8101bdde9eab5c929d3dbf13a7dea1146b608f614ee678f7a485e13255d6376f5c
7
- data.tar.gz: 6f3e5f2e1589a50898bc3a8fd95eb4a772e697de007d1b6a734c01fdeac46cc8ab71a7bcea4b97476ec8447da4ac16f1418452754af01ebaddafa873b4c84b57
6
+ metadata.gz: 29a88d3485f4cabefe89721a83506e0dcbe64d8864780eec0508da70f5d308a204fa427cd0fb8e0c725c07bb45c20f37d182cb3f75e2694536f562b863a35ce9
7
+ data.tar.gz: 6eaf332fea8ba9eb38da3af8d6eea7376b947a97e93f6478c0e149cc44d35236d9f148ee42e7179fb83ec6fa743076c806a7fc5b6c9e19e584763a3d2a5a2297
@@ -147,7 +147,7 @@ module StytchB2B
147
147
  # This endpoint will also create an initial Member Session for the newly created Member.
148
148
  #
149
149
  # The Member created by this endpoint will automatically be granted the `stytch_admin` Role. See the
150
- # [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/stytch-defaults) for more details on this Role.
150
+ # [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for more details on this Role.
151
151
  #
152
152
  # If the new Organization is created with a `mfa_policy` of `REQUIRED_FOR_ALL`, the newly created Member will need to complete an MFA step to log in to the Organization.
153
153
  # The `intermediate_session_token` will not be consumed and instead will be returned in the response.
@@ -181,6 +181,8 @@ module StytchB2B
181
181
 
182
182
  # Send either a login or signup magic link to a Member. A new, pending, or invited Member will receive a signup Email Magic Link. Members will have a `pending` status until they successfully authenticate. An active Member will receive a login Email Magic Link.
183
183
  #
184
+ # The magic link is valid for 60 minutes.
185
+ #
184
186
  # == Parameters:
185
187
  # organization_id::
186
188
  # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
@@ -263,7 +265,10 @@ module StytchB2B
263
265
  post_request('/v1/b2b/magic_links/email/login_or_signup', request, headers)
264
266
  end
265
267
 
266
- # Send an invite email to a new Member to join an Organization. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error. /%}
268
+ # Send an invite email to a new Member to join an Organization. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error.
269
+ #
270
+ # The magic link invite will be valid for 1 week.
271
+ # /%}
267
272
  #
268
273
  # == Parameters:
269
274
  # organization_id::
@@ -366,7 +371,7 @@ module StytchB2B
366
371
  @connection = connection
367
372
  end
368
373
 
369
- # Send a discovery magic link to an email address.
374
+ # Send a discovery magic link to an email address. The magic link is valid for 60 minutes.
370
375
  #
371
376
  # == Parameters:
372
377
  # email_address::
@@ -122,7 +122,7 @@ module StytchB2B
122
122
  # provider_values::
123
123
  # The `provider_values` object lists relevant identifiers, values, and scopes for a given OAuth provider. For example this object will include a provider's `access_token` that you can use to access the provider's API for a given user.
124
124
  #
125
- # Note that these values will vary based on the OAuth provider in question, e.g. `id_token` is only returned by Microsoft.
125
+ # Note that these values will vary based on the OAuth provider in question, e.g. `id_token` is only returned by Microsoft. Google One Tap does not return access tokens or refresh tokens.
126
126
  # The type of this field is nilable +ProviderValues+ (+object+).
127
127
  # mfa_required::
128
128
  # Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
@@ -929,6 +929,41 @@ module StytchB2B
929
929
  delete_request("/v1/b2b/organizations/#{organization_id}/members/mfa_phone_numbers/#{member_id}", headers)
930
930
  end
931
931
 
932
+ # Delete a Member's MFA TOTP registration.
933
+ #
934
+ # To mint a new registration for a Member, you must first call this endpoint to delete the existing registration.
935
+ #
936
+ # Existing Member Sessions that include the TOTP authentication factor will not be revoked if the registration is deleted, and MFA will not be enforced until the Member logs in again.
937
+ # /%}
938
+ #
939
+ # == Parameters:
940
+ # organization_id::
941
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
942
+ # The type of this field is +String+.
943
+ # member_id::
944
+ # Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
945
+ # The type of this field is +String+.
946
+ #
947
+ # == Returns:
948
+ # An object with the following fields:
949
+ # request_id::
950
+ # Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
951
+ # The type of this field is +String+.
952
+ # member_id::
953
+ # Globally unique UUID that identifies a specific Member.
954
+ # The type of this field is +String+.
955
+ # member::
956
+ # The [Member object](https://stytch.com/docs/b2b/api/member-object)
957
+ # The type of this field is +Member+ (+object+).
958
+ # organization::
959
+ # The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
960
+ # The type of this field is +Organization+ (+object+).
961
+ # status_code::
962
+ # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
963
+ # The type of this field is +Integer+.
964
+ #
965
+ # == Method Options:
966
+ # This method supports an optional +StytchB2B::Organizations::Members::DeleteTOTPRequestOptions+ object which will modify the headers sent in the HTTP request.
932
967
  def delete_totp(
933
968
  organization_id:,
934
969
  member_id:,
@@ -1223,6 +1258,8 @@ module StytchB2B
1223
1258
  # issued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the
1224
1259
  # access token automatically.
1225
1260
  #
1261
+ # Google One Tap does not return access tokens. If the member has only authenticated through Google One Tap and not through a regular Google OAuth flow, this endpoint will not return any tokens.
1262
+ #
1226
1263
  # __Note:__ Google does not issue a refresh token on every login, and refresh tokens may expire if unused.
1227
1264
  # To force a refresh token to be issued, pass the `?provider_prompt=consent` query param into the
1228
1265
  # [Start Google OAuth flow](https://stytch.com/docs/b2b/api/oauth-google-start) endpoint.
@@ -1249,12 +1286,6 @@ module StytchB2B
1249
1286
  # provider_subject::
1250
1287
  # The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols.
1251
1288
  # The type of this field is +String+.
1252
- # access_token::
1253
- # The `access_token` that you may use to access the User's data in the provider's API.
1254
- # The type of this field is +String+.
1255
- # access_token_expires_in::
1256
- # The number of seconds until the access token expires.
1257
- # The type of this field is +Integer+.
1258
1289
  # id_token::
1259
1290
  # The `id_token` returned by the OAuth provider. ID Tokens are JWTs that contain structured information about a user. The exact content of each ID Token varies from provider to provider. ID Tokens are returned from OAuth providers that conform to the [OpenID Connect](https://openid.net/foundation/) specification, which is based on OAuth.
1260
1291
  # The type of this field is +String+.
@@ -1264,6 +1295,12 @@ module StytchB2B
1264
1295
  # status_code::
1265
1296
  # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
1266
1297
  # The type of this field is +Integer+.
1298
+ # access_token::
1299
+ # The `access_token` that you may use to access the User's data in the provider's API.
1300
+ # The type of this field is nilable +String+.
1301
+ # access_token_expires_in::
1302
+ # The number of seconds until the access token expires.
1303
+ # The type of this field is nilable +Integer+.
1267
1304
  # refresh_token::
1268
1305
  # The `refresh_token` that you may use to obtain a new `access_token` for the User within the provider's API.
1269
1306
  # The type of this field is nilable +String+.
@@ -11,15 +11,15 @@ require_relative 'request_helper'
11
11
  module StytchB2B
12
12
  class SCIM
13
13
  include Stytch::RequestHelper
14
- attr_reader :connections
14
+ attr_reader :connection
15
15
 
16
16
  def initialize(connection)
17
17
  @connection = connection
18
18
 
19
- @connections = StytchB2B::SCIM::Connections.new(@connection)
19
+ @connection = StytchB2B::SCIM::Connection.new(@connection)
20
20
  end
21
21
 
22
- class Connections
22
+ class Connection
23
23
  class UpdateRequestOptions
24
24
  # Optional authorization object.
25
25
  # Pass in an active Stytch Member session token or session JWT and the request
@@ -173,7 +173,7 @@ module StytchB2B
173
173
  # The type of this field is nilable +String+.
174
174
  # identity_provider::
175
175
  # (no documentation yet)
176
- # The type of this field is nilable +UpdateRequestIdp+ (string enum).
176
+ # The type of this field is nilable +UpdateRequestIdentityProvider+ (string enum).
177
177
  # scim_group_implicit_role_assignments::
178
178
  # (no documentation yet)
179
179
  # The type of this field is nilable list of +SCIMGroupImplicitRoleAssignments+.
@@ -191,7 +191,7 @@ module StytchB2B
191
191
  # The type of this field is nilable +SCIMConnection+ (+object+).
192
192
  #
193
193
  # == Method Options:
194
- # This method supports an optional +StytchB2B::SCIM::Connections::UpdateRequestOptions+ object which will modify the headers sent in the HTTP request.
194
+ # This method supports an optional +StytchB2B::SCIM::Connection::UpdateRequestOptions+ object which will modify the headers sent in the HTTP request.
195
195
  def update(
196
196
  organization_id:,
197
197
  connection_id:,
@@ -207,7 +207,7 @@ module StytchB2B
207
207
  request[:identity_provider] = identity_provider unless identity_provider.nil?
208
208
  request[:scim_group_implicit_role_assignments] = scim_group_implicit_role_assignments unless scim_group_implicit_role_assignments.nil?
209
209
 
210
- put_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}", request, headers)
210
+ put_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}", request, headers)
211
211
  end
212
212
 
213
213
  # Deletes a SCIM Connection. /%}
@@ -233,7 +233,7 @@ module StytchB2B
233
233
  # The type of this field is +Integer+.
234
234
  #
235
235
  # == Method Options:
236
- # This method supports an optional +StytchB2B::SCIM::Connections::DeleteRequestOptions+ object which will modify the headers sent in the HTTP request.
236
+ # This method supports an optional +StytchB2B::SCIM::Connection::DeleteRequestOptions+ object which will modify the headers sent in the HTTP request.
237
237
  def delete(
238
238
  organization_id:,
239
239
  connection_id:,
@@ -241,7 +241,7 @@ module StytchB2B
241
241
  )
242
242
  headers = {}
243
243
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
244
- delete_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}", headers)
244
+ delete_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}", headers)
245
245
  end
246
246
 
247
247
  # Start a SCIM token rotation. /%}
@@ -267,7 +267,7 @@ module StytchB2B
267
267
  # The type of this field is nilable +SCIMConnectionWithNextToken+ (+object+).
268
268
  #
269
269
  # == Method Options:
270
- # This method supports an optional +StytchB2B::SCIM::Connections::RotateStartRequestOptions+ object which will modify the headers sent in the HTTP request.
270
+ # This method supports an optional +StytchB2B::SCIM::Connection::RotateStartRequestOptions+ object which will modify the headers sent in the HTTP request.
271
271
  def rotate_start(
272
272
  organization_id:,
273
273
  connection_id:,
@@ -277,7 +277,7 @@ module StytchB2B
277
277
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
278
278
  request = {}
279
279
 
280
- post_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}/rotate/start", request, headers)
280
+ post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/start", request, headers)
281
281
  end
282
282
 
283
283
  # Completes a SCIM token rotation. This will complete the current token rotation process and update the active token to be the new token supplied in the [start SCIM token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start) response. /%}
@@ -303,7 +303,7 @@ module StytchB2B
303
303
  # The type of this field is nilable +SCIMConnection+ (+object+).
304
304
  #
305
305
  # == Method Options:
306
- # This method supports an optional +StytchB2B::SCIM::Connections::RotateCompleteRequestOptions+ object which will modify the headers sent in the HTTP request.
306
+ # This method supports an optional +StytchB2B::SCIM::Connection::RotateCompleteRequestOptions+ object which will modify the headers sent in the HTTP request.
307
307
  def rotate_complete(
308
308
  organization_id:,
309
309
  connection_id:,
@@ -313,7 +313,7 @@ module StytchB2B
313
313
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
314
314
  request = {}
315
315
 
316
- post_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}/rotate/complete", request, headers)
316
+ post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/complete", request, headers)
317
317
  end
318
318
 
319
319
  # Cancel a SCIM token rotation. This will cancel the current token rotation process, keeping the original token active. /%}
@@ -339,7 +339,7 @@ module StytchB2B
339
339
  # The type of this field is nilable +SCIMConnection+ (+object+).
340
340
  #
341
341
  # == Method Options:
342
- # This method supports an optional +StytchB2B::SCIM::Connections::RotateCancelRequestOptions+ object which will modify the headers sent in the HTTP request.
342
+ # This method supports an optional +StytchB2B::SCIM::Connection::RotateCancelRequestOptions+ object which will modify the headers sent in the HTTP request.
343
343
  def rotate_cancel(
344
344
  organization_id:,
345
345
  connection_id:,
@@ -349,7 +349,7 @@ module StytchB2B
349
349
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
350
350
  request = {}
351
351
 
352
- post_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}/rotate/cancel", request, headers)
352
+ post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/cancel", request, headers)
353
353
  end
354
354
 
355
355
  # Create a new SCIM Connection. /%}
@@ -363,7 +363,7 @@ module StytchB2B
363
363
  # The type of this field is nilable +String+.
364
364
  # identity_provider::
365
365
  # (no documentation yet)
366
- # The type of this field is nilable +CreateRequestIdp+ (string enum).
366
+ # The type of this field is nilable +CreateRequestIdentityProvider+ (string enum).
367
367
  #
368
368
  # == Returns:
369
369
  # An object with the following fields:
@@ -378,7 +378,7 @@ module StytchB2B
378
378
  # The type of this field is nilable +SCIMConnectionWithToken+ (+object+).
379
379
  #
380
380
  # == Method Options:
381
- # This method supports an optional +StytchB2B::SCIM::Connections::CreateRequestOptions+ object which will modify the headers sent in the HTTP request.
381
+ # This method supports an optional +StytchB2B::SCIM::Connection::CreateRequestOptions+ object which will modify the headers sent in the HTTP request.
382
382
  def create(
383
383
  organization_id:,
384
384
  display_name: nil,
@@ -391,7 +391,7 @@ module StytchB2B
391
391
  request[:display_name] = display_name unless display_name.nil?
392
392
  request[:identity_provider] = identity_provider unless identity_provider.nil?
393
393
 
394
- post_request("/v1/b2b/scim/#{organization_id}/connections", request, headers)
394
+ post_request("/v1/b2b/scim/#{organization_id}/connection", request, headers)
395
395
  end
396
396
 
397
397
  # Get SCIM Connections. /%}
@@ -406,15 +406,15 @@ module StytchB2B
406
406
  # request_id::
407
407
  # Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
408
408
  # The type of this field is +String+.
409
- # connections::
410
- # (no documentation yet)
411
- # The type of this field is list of +SCIMConnection+ (+object+).
412
409
  # status_code::
413
410
  # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
414
411
  # The type of this field is +Integer+.
412
+ # connection::
413
+ # (no documentation yet)
414
+ # The type of this field is nilable +SCIMConnection+ (+object+).
415
415
  #
416
416
  # == Method Options:
417
- # This method supports an optional +StytchB2B::SCIM::Connections::GetRequestOptions+ object which will modify the headers sent in the HTTP request.
417
+ # This method supports an optional +StytchB2B::SCIM::Connection::GetRequestOptions+ object which will modify the headers sent in the HTTP request.
418
418
  def get(
419
419
  organization_id:,
420
420
  method_options: nil
@@ -422,7 +422,7 @@ module StytchB2B
422
422
  headers = {}
423
423
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
424
424
  query_params = {}
425
- request = request_with_query_params("/v1/b2b/scim/#{organization_id}/connections", query_params)
425
+ request = request_with_query_params("/v1/b2b/scim/#{organization_id}/connection", query_params)
426
426
  get_request(request, headers)
427
427
  end
428
428
  end
@@ -70,7 +70,7 @@ module StytchB2B
70
70
 
71
71
  # Authenticates a Session and updates its lifetime by the specified `session_duration_minutes`. If the `session_duration_minutes` is not specified, a Session will not be extended. This endpoint requires either a `session_jwt` or `session_token` be included in the request. It will return an error if both are present.
72
72
  #
73
- # You may provide a JWT that needs to be refreshed and is expired according to its `exp` claim. A new JWT will be returned if both the signature and the underlying Session are still valid.
73
+ # You may provide a JWT that needs to be refreshed and is expired according to its `exp` claim. A new JWT will be returned if both the signature and the underlying Session are still valid. See our [How to use Stytch Session JWTs](https://stytch.com/docs/b2b/guides/sessions/using-jwts) guide for more information.
74
74
  #
75
75
  # If an `authorization_check` object is passed in, this method will also check if the Member is authorized to perform the given action on the given Resource in the specified Organization. A Member is authorized if their Member Session contains a Role, assigned [explicitly or implicitly](https://stytch.com/docs/b2b/guides/rbac/role-assignment), with adequate permissions.
76
76
  # In addition, the `organization_id` passed in the authorization check must match the Member's Organization.
@@ -316,7 +316,7 @@ module StytchB2B
316
316
  post_request('/v1/b2b/sessions/exchange', request, headers)
317
317
  end
318
318
 
319
- # Migrate a session from an external OIDC compliant endpoint. Stytch will call the external UserInfo endpoint defined in your Stytch Project settings in the [Dashboard](/dashboard), and then perform a lookup using the `session_token`. If the response contains a valid email address, Stytch will attempt to match that email address with a Member in your Organization and create a Stytch Session.
319
+ # Migrate a session from an external OIDC compliant endpoint. Stytch will call the external UserInfo endpoint defined in your Stytch Project settings in the [Dashboard](/dashboard), and then perform a lookup using the `session_token`. If the response contains a valid email address, Stytch will attempt to match that email address with an existing Member in your Organization and create a Stytch Session. You will need to create the member before using this endpoint.
320
320
  #
321
321
  # == Parameters:
322
322
  # session_token::
@@ -397,6 +397,8 @@ module StytchB2B
397
397
  #
398
398
  # If you're using your own JWT validation library, many have built-in support for JWKS rotation, and you'll just need to supply this API endpoint. If not, your application should decide which JWKS to use for validation by inspecting the `kid` value.
399
399
  #
400
+ # See our [How to use Stytch Session JWTs](https://stytch.com/docs/b2b/guides/sessions/using-jwts) guide for more information.
401
+ #
400
402
  # == Parameters:
401
403
  # project_id::
402
404
  # The `project_id` to get the JWKS for.
@@ -76,6 +76,9 @@ module StytchB2B
76
76
  # oidc_connections::
77
77
  # The list of [OIDC Connections](https://stytch.com/docs/b2b/api/oidc-connection-object) owned by this organization.
78
78
  # The type of this field is list of +OIDCConnection+ (+object+).
79
+ # external_connections::
80
+ # (no documentation yet)
81
+ # The type of this field is list of +Connection+ (+object+).
79
82
  # status_code::
80
83
  # The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
81
84
  # The type of this field is +Integer+.
@@ -306,6 +309,9 @@ module StytchB2B
306
309
  # display_name::
307
310
  # A human-readable display name for the connection.
308
311
  # The type of this field is nilable +String+.
312
+ # identity_provider::
313
+ # The identity provider of this connection. For OIDC, the accepted values are `generic`, `okta`, and `microsoft-entra`. For SAML, the accepted values are `generic`, `okta`, `microsoft-entra`, and `google-workspace`.
314
+ # The type of this field is nilable +CreateConnectionRequestIdentityProvider+ (string enum).
309
315
  #
310
316
  # == Returns:
311
317
  # An object with the following fields:
@@ -324,12 +330,14 @@ module StytchB2B
324
330
  def create_connection(
325
331
  organization_id:,
326
332
  display_name: nil,
333
+ identity_provider: nil,
327
334
  method_options: nil
328
335
  )
329
336
  headers = {}
330
337
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
331
338
  request = {}
332
339
  request[:display_name] = display_name unless display_name.nil?
340
+ request[:identity_provider] = identity_provider unless identity_provider.nil?
333
341
 
334
342
  post_request("/v1/b2b/sso/oidc/#{organization_id}", request, headers)
335
343
  end
@@ -385,6 +393,9 @@ module StytchB2B
385
393
  # jwks_url::
386
394
  # The location of the IdP's JSON Web Key Set, used to verify credentials issued by the IdP. This will be provided by the IdP.
387
395
  # The type of this field is nilable +String+.
396
+ # identity_provider::
397
+ # The identity provider of this connection. For OIDC, the accepted values are `generic`, `okta`, and `microsoft-entra`. For SAML, the accepted values are `generic`, `okta`, `microsoft-entra`, and `google-workspace`.
398
+ # The type of this field is nilable +UpdateConnectionRequestIdentityProvider+ (string enum).
388
399
  #
389
400
  # == Returns:
390
401
  # An object with the following fields:
@@ -414,6 +425,7 @@ module StytchB2B
414
425
  token_url: nil,
415
426
  userinfo_url: nil,
416
427
  jwks_url: nil,
428
+ identity_provider: nil,
417
429
  method_options: nil
418
430
  )
419
431
  headers = {}
@@ -427,6 +439,7 @@ module StytchB2B
427
439
  request[:token_url] = token_url unless token_url.nil?
428
440
  request[:userinfo_url] = userinfo_url unless userinfo_url.nil?
429
441
  request[:jwks_url] = jwks_url unless jwks_url.nil?
442
+ request[:identity_provider] = identity_provider unless identity_provider.nil?
430
443
 
431
444
  put_request("/v1/b2b/sso/oidc/#{organization_id}/connections/#{connection_id}", request, headers)
432
445
  end
@@ -524,6 +537,9 @@ module StytchB2B
524
537
  # display_name::
525
538
  # A human-readable display name for the connection.
526
539
  # The type of this field is nilable +String+.
540
+ # identity_provider::
541
+ # The identity provider of this connection. For OIDC, the accepted values are `generic`, `okta`, and `microsoft-entra`. For SAML, the accepted values are `generic`, `okta`, `microsoft-entra`, and `google-workspace`.
542
+ # The type of this field is nilable +CreateConnectionRequestIdentityProvider+ (string enum).
527
543
  #
528
544
  # == Returns:
529
545
  # An object with the following fields:
@@ -542,12 +558,14 @@ module StytchB2B
542
558
  def create_connection(
543
559
  organization_id:,
544
560
  display_name: nil,
561
+ identity_provider: nil,
545
562
  method_options: nil
546
563
  )
547
564
  headers = {}
548
565
  headers = headers.merge(method_options.to_headers) unless method_options.nil?
549
566
  request = {}
550
567
  request[:display_name] = display_name unless display_name.nil?
568
+ request[:identity_provider] = identity_provider unless identity_provider.nil?
551
569
 
552
570
  post_request("/v1/b2b/sso/saml/#{organization_id}", request, headers)
553
571
  end
@@ -597,6 +615,9 @@ module StytchB2B
597
615
  # alternative_audience_uri::
598
616
  # An alternative URL to use for the Audience Restriction. This value can be used when you wish to migrate an existing SAML integration to Stytch with zero downtime.
599
617
  # The type of this field is nilable +String+.
618
+ # identity_provider::
619
+ # The identity provider of this connection. For OIDC, the accepted values are `generic`, `okta`, and `microsoft-entra`. For SAML, the accepted values are `generic`, `okta`, `microsoft-entra`, and `google-workspace`.
620
+ # The type of this field is nilable +UpdateConnectionRequestIdentityProvider+ (string enum).
600
621
  #
601
622
  # == Returns:
602
623
  # An object with the following fields:
@@ -623,6 +644,7 @@ module StytchB2B
623
644
  saml_connection_implicit_role_assignments: nil,
624
645
  saml_group_implicit_role_assignments: nil,
625
646
  alternative_audience_uri: nil,
647
+ identity_provider: nil,
626
648
  method_options: nil
627
649
  )
628
650
  headers = {}
@@ -636,6 +658,7 @@ module StytchB2B
636
658
  request[:saml_connection_implicit_role_assignments] = saml_connection_implicit_role_assignments unless saml_connection_implicit_role_assignments.nil?
637
659
  request[:saml_group_implicit_role_assignments] = saml_group_implicit_role_assignments unless saml_group_implicit_role_assignments.nil?
638
660
  request[:alternative_audience_uri] = alternative_audience_uri unless alternative_audience_uri.nil?
661
+ request[:identity_provider] = identity_provider unless identity_provider.nil?
639
662
 
640
663
  put_request("/v1/b2b/sso/saml/#{organization_id}/connections/#{connection_id}", request, headers)
641
664
  end
@@ -62,7 +62,9 @@ module Stytch
62
62
  get_request(request, headers)
63
63
  end
64
64
 
65
- # Authenticate a session token and retrieve associated session data. If `session_duration_minutes` is included, update the lifetime of the session to be that many minutes from now. All timestamps are formatted according to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. This endpoint requires exactly one `session_jwt` or `session_token` as part of the request. If both are included you will receive a `too_many_session_arguments` error.
65
+ # Authenticate a session token or session JWT and retrieve associated session data. If `session_duration_minutes` is included, update the lifetime of the session to be that many minutes from now. All timestamps are formatted according to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. This endpoint requires exactly one `session_jwt` or `session_token` as part of the request. If both are included, you will receive a `too_many_session_arguments` error.
66
+ #
67
+ # You may provide a JWT that needs to be refreshed and is expired according to its `exp` claim. A new JWT will be returned if both the signature and the underlying Session are still valid. See our [How to use Stytch Session JWTs](https://stytch.com/docs/guides/sessions/using-jwts) guide for more information.
66
68
  #
67
69
  # == Parameters:
68
70
  # session_token::
@@ -164,6 +166,8 @@ module Stytch
164
166
  #
165
167
  # If you're using your own JWT validation library, many have built-in support for JWKS rotation, and you'll just need to supply this API endpoint. If not, your application should decide which JWKS to use for validation by inspecting the `kid` value.
166
168
  #
169
+ # See our [How to use Stytch Session JWTs](https://stytch.com/docs/guides/sessions/using-jwts) guide for more information.
170
+ #
167
171
  # == Parameters:
168
172
  # project_id::
169
173
  # The `project_id` to get the JWKS for.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '8.0.0'
4
+ VERSION = '9.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stytch
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0
4
+ version: 9.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - stytch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-26 00:00:00.000000000 Z
11
+ date: 2024-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday