stytch 10.0.0 → 10.2.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: ce6f59d89c33b808bfe32aad54d9d6875c6f20a75ad7d3a5540c7a39d0e4c8d5
4
- data.tar.gz: 5dc596aa605508971900fb720bdbb945ca5767b2778038e78941c340ef516222
3
+ metadata.gz: dc18ab472e7d75e811a35b5952442c0c3bb3b978fb9eb061bf49053e9eb77b3b
4
+ data.tar.gz: c15e8be5557ec42a987c3ff700b8ed6cc8a896f39d156c58124aee24d642a2b1
5
5
  SHA512:
6
- metadata.gz: b897c6d6f047534dfb93bb22feecfb6823fe3cfbf70a2e6b55d24b90e77c9f5868f45f143f1df3f1a013afd66d4e3f1e1d60212aab432b7a21838632abead94d
7
- data.tar.gz: 11b5803a85782493d2f66e10744cec74a48679931d79600a9ed1b1ae59873caebc1a0634582c7a74daaae630ef9d0adfb16e5d04b1e99bbf24ba38d39508f36f
6
+ metadata.gz: a788ac5599e21f1a4078d5c1097c92d9f4ee21aeda677f3710604ad9bf144e20b0183470fee54470637e9ad4d7830cd5c8687b5fbd7c03eddba78cb0b742edc1
7
+ data.tar.gz: 5f41ea984d2255a11096bec39e217ffba50c10ff431fa2c918fc079cf4a233d4e880c00f16b54889d74839a49aa198dab445cbc3d3e1434637f355e76f5fc747
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'b2b_discovery'
4
+ require_relative 'b2b_impersonation'
4
5
  require_relative 'b2b_magic_links'
5
6
  require_relative 'b2b_oauth'
6
7
  require_relative 'b2b_organizations'
@@ -21,7 +22,7 @@ module StytchB2B
21
22
  class Client
22
23
  ENVIRONMENTS = %i[live test].freeze
23
24
 
24
- attr_reader :discovery, :fraud, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :project, :rbac, :recovery_codes, :scim, :sso, :sessions, :totps
25
+ attr_reader :discovery, :fraud, :impersonation, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :project, :rbac, :recovery_codes, :scim, :sso, :sessions, :totps
25
26
 
26
27
  def initialize(project_id:, secret:, env: nil, fraud_env: nil, &block)
27
28
  @api_host = api_host(env, project_id)
@@ -37,6 +38,7 @@ module StytchB2B
37
38
 
38
39
  @discovery = StytchB2B::Discovery.new(@connection)
39
40
  @fraud = Stytch::Fraud.new(@fraud_connection)
41
+ @impersonation = StytchB2B::Impersonation.new(@connection)
40
42
  @m2m = Stytch::M2M.new(@connection, @project_id, @is_b2b_client)
41
43
  @magic_links = StytchB2B::MagicLinks.new(@connection)
42
44
  @oauth = StytchB2B::OAuth.new(@connection)
@@ -237,7 +237,7 @@ module StytchB2B
237
237
  # The type of this field is nilable +String+.
238
238
  # allowed_auth_methods::
239
239
  # An array of allowed authentication methods. This list is enforced when `auth_methods` is set to `RESTRICTED`.
240
- # The list's accepted values are: `sso`, `magic_link`, `password`, `google_oauth`, and `microsoft_oauth`.
240
+ # The list's accepted values are: `sso`, `magic_link`, `email_otp`, `password`, `google_oauth`, `microsoft_oauth`, `slack_oauth`, `github_oauth`, and `hubspot_oauth`.
241
241
  #
242
242
  # The type of this field is nilable list of +String+.
243
243
  # mfa_policy::
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ # !!!
4
+ # WARNING: This file is autogenerated
5
+ # Only modify code within MANUAL() sections
6
+ # or your changes may be overwritten later!
7
+ # !!!
8
+
9
+ require_relative 'request_helper'
10
+
11
+ module StytchB2B
12
+ class Impersonation
13
+ include Stytch::RequestHelper
14
+
15
+ def initialize(connection)
16
+ @connection = connection
17
+ end
18
+
19
+ def authenticate(
20
+ token:
21
+ )
22
+ headers = {}
23
+ request = {
24
+ token: token
25
+ }
26
+
27
+ post_request('/v1/b2b/impersonation/authenticate', request, headers)
28
+ end
29
+ end
30
+ end
@@ -120,7 +120,7 @@ module StytchB2B
120
120
  # The type of this field is nilable +String+.
121
121
  # allowed_auth_methods::
122
122
  # An array of allowed authentication methods. This list is enforced when `auth_methods` is set to `RESTRICTED`.
123
- # The list's accepted values are: `sso`, `magic_link`, `password`, `google_oauth`, and `microsoft_oauth`.
123
+ # The list's accepted values are: `sso`, `magic_link`, `email_otp`, `password`, `google_oauth`, `microsoft_oauth`, `slack_oauth`, `github_oauth`, and `hubspot_oauth`.
124
124
  #
125
125
  # The type of this field is nilable list of +String+.
126
126
  # mfa_policy::
@@ -334,7 +334,7 @@ module StytchB2B
334
334
  # The type of this field is nilable +String+.
335
335
  # allowed_auth_methods::
336
336
  # An array of allowed authentication methods. This list is enforced when `auth_methods` is set to `RESTRICTED`.
337
- # The list's accepted values are: `sso`, `magic_link`, `password`, `google_oauth`, and `microsoft_oauth`.
337
+ # The list's accepted values are: `sso`, `magic_link`, `email_otp`, `password`, `google_oauth`, `microsoft_oauth`, `slack_oauth`, `github_oauth`, and `hubspot_oauth`.
338
338
  #
339
339
  #
340
340
  # If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.allowed-auth-methods` action on the `stytch.organization` Resource.
@@ -146,6 +146,12 @@ module StytchB2B
146
146
  # by SSO connection or SSO group. Defaults to `false` - that is, existing Member Sessions that contain SSO
147
147
  # authentication factors with the affected SSO connection IDs will be revoked.
148
148
  # The type of this field is nilable +Boolean+.
149
+ # mfa_phone_number::
150
+ # (no documentation yet)
151
+ # The type of this field is nilable +String+.
152
+ # set_phone_number_verified::
153
+ # (no documentation yet)
154
+ # The type of this field is nilable +Boolean+.
149
155
  #
150
156
  # == Returns:
151
157
  # An object with the following fields:
@@ -181,7 +187,9 @@ module StytchB2B
181
187
  trusted_metadata: nil,
182
188
  untrusted_metadata: nil,
183
189
  roles: nil,
184
- preserve_existing_sessions: nil
190
+ preserve_existing_sessions: nil,
191
+ mfa_phone_number: nil,
192
+ set_phone_number_verified: nil
185
193
  )
186
194
  headers = {}
187
195
  request = {
@@ -200,6 +208,8 @@ module StytchB2B
200
208
  request[:untrusted_metadata] = untrusted_metadata unless untrusted_metadata.nil?
201
209
  request[:roles] = roles unless roles.nil?
202
210
  request[:preserve_existing_sessions] = preserve_existing_sessions unless preserve_existing_sessions.nil?
211
+ request[:mfa_phone_number] = mfa_phone_number unless mfa_phone_number.nil?
212
+ request[:set_phone_number_verified] = set_phone_number_verified unless set_phone_number_verified.nil?
203
213
 
204
214
  post_request('/v1/b2b/passwords/migrate', request, headers)
205
215
  end
@@ -118,11 +118,13 @@ module Stytch
118
118
  post_request('/v1/magic_links/authenticate', request, headers)
119
119
  end
120
120
 
121
- # Create an embeddable Magic Link token for a User. Access to this endpoint is restricted. To enable it, please send us a note at support@stytch.com.
121
+ # Create an Embeddable Magic Link token for a User. Access to this endpoint is restricted. To enable it, please send us a note at support@stytch.com.
122
122
  #
123
123
  # ### Next steps
124
124
  # Send the returned `token` value to the end user in a link which directs to your application. When the end user follows your link, collect the token, and call [Authenticate Magic Link](https://stytch.com/docs/api/authenticate-magic-link) to complete authentication.
125
125
  #
126
+ # **Note:** Authenticating an Embeddable Magic Link token will **not** result in any of the Stytch User's factors (email address or phone number) being marked as verified, as Stytch cannot confirm where the user received the token.
127
+ #
126
128
  # == Parameters:
127
129
  # user_id::
128
130
  # The unique ID of a specific User.
data/lib/stytch/oauth.rb CHANGED
@@ -20,7 +20,9 @@ module Stytch
20
20
  #
21
21
  # Exactly one of `user_id`, `session_token`, or `session_jwt` must be provided to identify the target Stytch User.
22
22
  #
23
- # This is an optional step in the OAuth flow. Stytch can often determine whether to create a new user or log in an existing one based on verified identity provider information. This endpoint is useful for cases where we can't, such as missing or unverified provider information.
23
+ # **Note**: This is an optional step in the OAuth flow. Stytch can often determine whether to associate a new OAuth login with an existing User based on verified information (such as an email address) from the identity provider. This endpoint is useful for cases where we can't, such as missing or unverified provider information.
24
+ #
25
+ # See our [OAuth email address behavior](https://stytch.com/docs/guides/oauth/email-behavior) resource for additional information.
24
26
  #
25
27
  # == Parameters:
26
28
  # provider::
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '10.0.0'
4
+ VERSION = '10.2.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: 10.0.0
4
+ version: 10.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - stytch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-06 00:00:00.000000000 Z
11
+ date: 2025-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -126,6 +126,7 @@ files:
126
126
  - lib/stytch.rb
127
127
  - lib/stytch/b2b_client.rb
128
128
  - lib/stytch/b2b_discovery.rb
129
+ - lib/stytch/b2b_impersonation.rb
129
130
  - lib/stytch/b2b_magic_links.rb
130
131
  - lib/stytch/b2b_oauth.rb
131
132
  - lib/stytch/b2b_organizations.rb