stytch 7.7.0 → 7.8.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: 596a877d7f9b69bdba72760f0fa015ff8d2c9e5a70959b52bcad95f1717aecee
4
- data.tar.gz: 11d3704cb3e3f1d984fb1242d9219a85620d630c1a668e56b10f6a19561c6183
3
+ metadata.gz: e088d563ff2befaa22cddad24209cc1bd975c5d8e129e0f6d7f05750abaa572e
4
+ data.tar.gz: 6bd6302153904ec43a6b40473dd7a364961ae31753bb9c9ab9df42466f17c211
5
5
  SHA512:
6
- metadata.gz: ca380834e2a6f3d6d6f13b99bdad4462b71cbeff12951c062bb32206ff462cd6a91957ba6c4391bb0de399b007d18ecfee1000312dcff22fd163bb48f8e0d50d
7
- data.tar.gz: 5bc2d485ec0ff81b44393552668407abf09f12dae3464caa7bc4bb0329ab29acb3431590ca591e8790c8c36a25cf8fa18afbb63fc0d1853b308239e6cc2321e3
6
+ metadata.gz: 264ecbaa7f87e9f7875e83af4354a867f866df8536dfb10b25dde0fd6b8415e94d64a8bb44e817c72b07962a2323eab3ab1789f4941befcf38bbbe759d796040
7
+ data.tar.gz: 2d8f8d03cfc52e902c7aa25be70c2d9b79213923a6ccc9379729a367789740d985cee75ed27c2719406780e5db67e8fbabdff30b89f41289376f4c458bdbc3d2
@@ -56,14 +56,19 @@ module StytchB2B
56
56
  # connection::
57
57
  # The `SAML Connection` object affected by this API call. See the [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) for complete response field details.
58
58
  # The type of this field is nilable +SCIMConnection+ (+object+).
59
+ #
60
+ # == Method Options:
61
+ # This method supports an optional +UpdateRequestOptions+ object which will modify the headers sent in the HTTP request.
59
62
  def update(
60
63
  organization_id:,
61
64
  connection_id:,
62
65
  display_name: nil,
63
66
  identity_provider: nil,
64
- scim_group_implicit_role_assignments: nil
67
+ scim_group_implicit_role_assignments: nil,
68
+ method_options: nil
65
69
  )
66
70
  headers = {}
71
+ headers = headers.merge(method_options.to_headers) unless method_options.nil?
67
72
  request = {}
68
73
  request[:display_name] = display_name unless display_name.nil?
69
74
  request[:identity_provider] = identity_provider unless identity_provider.nil?
@@ -79,7 +84,7 @@ module StytchB2B
79
84
  # 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.
80
85
  # The type of this field is +String+.
81
86
  # connection_id::
82
- # Globally unique UUID that identifies a specific SSO `connection_id` for a Member.
87
+ # The ID of the SCIM connection.
83
88
  # The type of this field is +String+.
84
89
  #
85
90
  # == Returns:
@@ -93,11 +98,16 @@ module StytchB2B
93
98
  # status_code::
94
99
  # 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.
95
100
  # The type of this field is +Integer+.
101
+ #
102
+ # == Method Options:
103
+ # This method supports an optional +DeleteRequestOptions+ object which will modify the headers sent in the HTTP request.
96
104
  def delete(
97
105
  organization_id:,
98
- connection_id:
106
+ connection_id:,
107
+ method_options: nil
99
108
  )
100
109
  headers = {}
110
+ headers = headers.merge(method_options.to_headers) unless method_options.nil?
101
111
  delete_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}", headers)
102
112
  end
103
113
 
@@ -122,11 +132,16 @@ module StytchB2B
122
132
  # connection::
123
133
  # The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details.
124
134
  # The type of this field is nilable +SCIMConnectionWithNextToken+ (+object+).
135
+ #
136
+ # == Method Options:
137
+ # This method supports an optional +RotateStartRequestOptions+ object which will modify the headers sent in the HTTP request.
125
138
  def rotate_start(
126
139
  organization_id:,
127
- connection_id:
140
+ connection_id:,
141
+ method_options: nil
128
142
  )
129
143
  headers = {}
144
+ headers = headers.merge(method_options.to_headers) unless method_options.nil?
130
145
  request = {}
131
146
 
132
147
  post_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}/rotate/start", request, headers)
@@ -153,11 +168,16 @@ module StytchB2B
153
168
  # connection::
154
169
  # The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details.
155
170
  # The type of this field is nilable +SCIMConnection+ (+object+).
171
+ #
172
+ # == Method Options:
173
+ # This method supports an optional +RotateCompleteRequestOptions+ object which will modify the headers sent in the HTTP request.
156
174
  def rotate_complete(
157
175
  organization_id:,
158
- connection_id:
176
+ connection_id:,
177
+ method_options: nil
159
178
  )
160
179
  headers = {}
180
+ headers = headers.merge(method_options.to_headers) unless method_options.nil?
161
181
  request = {}
162
182
 
163
183
  post_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}/rotate/complete", request, headers)
@@ -184,11 +204,16 @@ module StytchB2B
184
204
  # connection::
185
205
  # The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details.
186
206
  # The type of this field is nilable +SCIMConnection+ (+object+).
207
+ #
208
+ # == Method Options:
209
+ # This method supports an optional +RotateCancelRequestOptions+ object which will modify the headers sent in the HTTP request.
187
210
  def rotate_cancel(
188
211
  organization_id:,
189
- connection_id:
212
+ connection_id:,
213
+ method_options: nil
190
214
  )
191
215
  headers = {}
216
+ headers = headers.merge(method_options.to_headers) unless method_options.nil?
192
217
  request = {}
193
218
 
194
219
  post_request("/v1/b2b/scim/#{organization_id}/connections/#{connection_id}/rotate/cancel", request, headers)
@@ -218,12 +243,17 @@ module StytchB2B
218
243
  # connection::
219
244
  # The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details.
220
245
  # The type of this field is nilable +SCIMConnectionWithToken+ (+object+).
246
+ #
247
+ # == Method Options:
248
+ # This method supports an optional +CreateRequestOptions+ object which will modify the headers sent in the HTTP request.
221
249
  def create(
222
250
  organization_id:,
223
251
  display_name: nil,
224
- identity_provider: nil
252
+ identity_provider: nil,
253
+ method_options: nil
225
254
  )
226
255
  headers = {}
256
+ headers = headers.merge(method_options.to_headers) unless method_options.nil?
227
257
  request = {}
228
258
  request[:display_name] = display_name unless display_name.nil?
229
259
  request[:identity_provider] = identity_provider unless identity_provider.nil?
@@ -249,10 +279,15 @@ module StytchB2B
249
279
  # status_code::
250
280
  # 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.
251
281
  # The type of this field is +Integer+.
282
+ #
283
+ # == Method Options:
284
+ # This method supports an optional +GetRequestOptions+ object which will modify the headers sent in the HTTP request.
252
285
  def get(
253
- organization_id:
286
+ organization_id:,
287
+ method_options: nil
254
288
  )
255
289
  headers = {}
290
+ headers = headers.merge(method_options.to_headers) unless method_options.nil?
256
291
  query_params = {}
257
292
  request = request_with_query_params("/v1/b2b/scim/#{organization_id}/connections", query_params)
258
293
  get_request(request, headers)
@@ -316,6 +316,77 @@ module StytchB2B
316
316
  post_request('/v1/b2b/sessions/exchange', request, headers)
317
317
  end
318
318
 
319
+ # Migrate a session from an external endpoint. Stytch will call the UserInfo endpoint specified in your project settings, performing a lookup using the session token passed in. If the endpoint repsonds and the response contains a valid email, Stytch will attempt to match that email with a member in your organization, and create a Stytch Session for you.
320
+ #
321
+ # == Parameters:
322
+ # session_token::
323
+ # The authorization token Stytch will pass in to the external userinfo endpoint.
324
+ # The type of this field is +String+.
325
+ # organization_id::
326
+ # 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.
327
+ # The type of this field is +String+.
328
+ # session_duration_minutes::
329
+ # Set the session lifetime to be this many minutes from now. This will start a new session if one doesn't already exist,
330
+ # returning both an opaque `session_token` and `session_jwt` for this session. Remember that the `session_jwt` will have a fixed lifetime of
331
+ # five minutes regardless of the underlying session duration, and will need to be refreshed over time.
332
+ #
333
+ # This value must be a minimum of 5 and a maximum of 527040 minutes (366 days).
334
+ #
335
+ # If a `session_token` or `session_jwt` is provided then a successful authentication will continue to extend the session this many minutes.
336
+ #
337
+ # If the `session_duration_minutes` parameter is not specified, a Stytch session will be created with a 60 minute duration. If you don't want
338
+ # to use the Stytch session product, you can ignore the session fields in the response.
339
+ # The type of this field is nilable +Integer+.
340
+ # session_custom_claims::
341
+ # Add a custom claims map to the Session being authenticated. Claims are only created if a Session is initialized by providing a value in
342
+ # `session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To
343
+ # delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored.
344
+ # Total custom claims size cannot exceed four kilobytes.
345
+ # The type of this field is nilable +object+.
346
+ #
347
+ # == Returns:
348
+ # An object with the following fields:
349
+ # request_id::
350
+ # 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.
351
+ # The type of this field is +String+.
352
+ # member_id::
353
+ # Globally unique UUID that identifies a specific Member.
354
+ # The type of this field is +String+.
355
+ # session_token::
356
+ # A secret token for a given Stytch Session.
357
+ # The type of this field is +String+.
358
+ # session_jwt::
359
+ # The JSON Web Token (JWT) for a given Stytch Session.
360
+ # The type of this field is +String+.
361
+ # member::
362
+ # The [Member object](https://stytch.com/docs/b2b/api/member-object)
363
+ # The type of this field is +Member+ (+object+).
364
+ # organization::
365
+ # The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
366
+ # The type of this field is +Organization+ (+object+).
367
+ # status_code::
368
+ # (no documentation yet)
369
+ # The type of this field is +Integer+.
370
+ # member_session::
371
+ # The [Session object](https://stytch.com/docs/b2b/api/session-object).
372
+ # The type of this field is nilable +MemberSession+ (+object+).
373
+ def migrate(
374
+ session_token:,
375
+ organization_id:,
376
+ session_duration_minutes: nil,
377
+ session_custom_claims: nil
378
+ )
379
+ headers = {}
380
+ request = {
381
+ session_token: session_token,
382
+ organization_id: organization_id
383
+ }
384
+ request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
385
+ request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
386
+
387
+ post_request('/v1/b2b/sessions/migrate', request, headers)
388
+ end
389
+
319
390
  # Get the JSON Web Key Set (JWKS) for a project.
320
391
  #
321
392
  # JWKS are rotated every ~6 months. Upon rotation, new JWTs will be signed using the new key set, and both key sets will be returned by this endpoint for a period of 1 month.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '7.7.0'
4
+ VERSION = '7.8.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: 7.7.0
4
+ version: 7.8.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-04 00:00:00.000000000 Z
11
+ date: 2024-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday