stytch 10.30.1 → 10.32.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.
- checksums.yaml +4 -4
- data/lib/stytch/b2b_client.rb +3 -1
- data/lib/stytch/b2b_sso.rb +5 -0
- data/lib/stytch/client.rb +3 -1
- data/lib/stytch/debug.rb +26 -0
- data/lib/stytch/users.rb +19 -2
- data/lib/stytch/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44adc5cb4f2c228061711f284dea8c827e093a22c550b7522fe84035e79ba4c5
|
4
|
+
data.tar.gz: 1cc0dc6a2ff8f8e21efba30f05f5df6f951c508bf51106b5962e11a4b6ae7652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20a5350eb7aa7c70ef878d92dc6d8d419e44ae04365dbee4f095b986b0058ac87db77aa64ac1daa4c8ef33e29dc48d89f821081e65d4cc6efb68cd9e303942b4
|
7
|
+
data.tar.gz: af30908b3f5ef363246f799e20fb5ed0da1670ef2bb1e94ba60efd279151570a815df6208e22adc4b7e5a51198c1c627904f8deb4ed802ed5c05f80267c11647
|
data/lib/stytch/b2b_client.rb
CHANGED
@@ -21,6 +21,7 @@ require_relative 'b2b_sessions'
|
|
21
21
|
require_relative 'b2b_sso'
|
22
22
|
require_relative 'b2b_totps'
|
23
23
|
require_relative 'connected_apps'
|
24
|
+
require_relative 'debug'
|
24
25
|
require_relative 'fraud'
|
25
26
|
require_relative 'm2m'
|
26
27
|
require_relative 'project'
|
@@ -30,7 +31,7 @@ module StytchB2B
|
|
30
31
|
class Client
|
31
32
|
ENVIRONMENTS = %i[live test].freeze
|
32
33
|
|
33
|
-
attr_reader :connected_app, :discovery, :fraud, :idp, :impersonation, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :project, :rbac, :recovery_codes, :scim, :sso, :sessions, :totps
|
34
|
+
attr_reader :connected_app, :debug, :discovery, :fraud, :idp, :impersonation, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :project, :rbac, :recovery_codes, :scim, :sso, :sessions, :totps
|
34
35
|
|
35
36
|
def initialize(project_id:, secret:, env: nil, fraud_env: nil, &block)
|
36
37
|
@api_host = api_host(env, project_id)
|
@@ -45,6 +46,7 @@ module StytchB2B
|
|
45
46
|
@policy_cache = Stytch::PolicyCache.new(rbac_client: rbac)
|
46
47
|
|
47
48
|
@connected_app = Stytch::ConnectedApp.new(@connection)
|
49
|
+
@debug = Stytch::Debug.new(@connection)
|
48
50
|
@discovery = StytchB2B::Discovery.new(@connection)
|
49
51
|
@fraud = Stytch::Fraud.new(@fraud_connection)
|
50
52
|
@idp = StytchB2B::IDP.new(@connection, @project_id, @policy_cache)
|
data/lib/stytch/b2b_sso.rb
CHANGED
@@ -678,6 +678,9 @@ module StytchB2B
|
|
678
678
|
# saml_encryption_private_key::
|
679
679
|
# A PKCS1 format RSA private key used to decrypt encrypted SAML assertions. Only PKCS1 format (starting with "-----BEGIN RSA PRIVATE KEY-----") is supported.
|
680
680
|
# The type of this field is nilable +String+.
|
681
|
+
# allow_gateway_callback::
|
682
|
+
# (no documentation yet)
|
683
|
+
# The type of this field is nilable +Boolean+.
|
681
684
|
#
|
682
685
|
# == Returns:
|
683
686
|
# An object with the following fields:
|
@@ -710,6 +713,7 @@ module StytchB2B
|
|
710
713
|
alternative_acs_url: nil,
|
711
714
|
idp_initiated_auth_disabled: nil,
|
712
715
|
saml_encryption_private_key: nil,
|
716
|
+
allow_gateway_callback: nil,
|
713
717
|
method_options: nil
|
714
718
|
)
|
715
719
|
headers = {}
|
@@ -729,6 +733,7 @@ module StytchB2B
|
|
729
733
|
request[:alternative_acs_url] = alternative_acs_url unless alternative_acs_url.nil?
|
730
734
|
request[:idp_initiated_auth_disabled] = idp_initiated_auth_disabled unless idp_initiated_auth_disabled.nil?
|
731
735
|
request[:saml_encryption_private_key] = saml_encryption_private_key unless saml_encryption_private_key.nil?
|
736
|
+
request[:allow_gateway_callback] = allow_gateway_callback unless allow_gateway_callback.nil?
|
732
737
|
|
733
738
|
put_request("/v1/b2b/sso/saml/#{organization_id}/connections/#{connection_id}", request, headers)
|
734
739
|
end
|
data/lib/stytch/client.rb
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
require_relative 'connected_apps'
|
10
10
|
require_relative 'crypto_wallets'
|
11
|
+
require_relative 'debug'
|
11
12
|
require_relative 'fraud'
|
12
13
|
require_relative 'idp'
|
13
14
|
require_relative 'impersonation'
|
@@ -28,7 +29,7 @@ module Stytch
|
|
28
29
|
class Client
|
29
30
|
ENVIRONMENTS = %i[live test].freeze
|
30
31
|
|
31
|
-
attr_reader :connected_app, :crypto_wallets, :fraud, :idp, :impersonation, :m2m, :magic_links, :oauth, :otps, :passwords, :project, :rbac, :sessions, :totps, :users, :webauthn
|
32
|
+
attr_reader :connected_app, :crypto_wallets, :debug, :fraud, :idp, :impersonation, :m2m, :magic_links, :oauth, :otps, :passwords, :project, :rbac, :sessions, :totps, :users, :webauthn
|
32
33
|
|
33
34
|
def initialize(project_id:, secret:, env: nil, fraud_env: nil, &block)
|
34
35
|
@api_host = api_host(env, project_id)
|
@@ -44,6 +45,7 @@ module Stytch
|
|
44
45
|
|
45
46
|
@connected_app = Stytch::ConnectedApp.new(@connection)
|
46
47
|
@crypto_wallets = Stytch::CryptoWallets.new(@connection)
|
48
|
+
@debug = Stytch::Debug.new(@connection)
|
47
49
|
@fraud = Stytch::Fraud.new(@fraud_connection)
|
48
50
|
@idp = Stytch::IDP.new(@connection, @project_id, @policy_cache)
|
49
51
|
@impersonation = Stytch::Impersonation.new(@connection)
|
data/lib/stytch/debug.rb
ADDED
@@ -0,0 +1,26 @@
|
|
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 Stytch
|
12
|
+
class Debug
|
13
|
+
include Stytch::RequestHelper
|
14
|
+
|
15
|
+
def initialize(connection)
|
16
|
+
@connection = connection
|
17
|
+
end
|
18
|
+
|
19
|
+
def whoami
|
20
|
+
headers = {}
|
21
|
+
query_params = {}
|
22
|
+
request = request_with_query_params('/v1/debug/whoami', query_params)
|
23
|
+
get_request(request, headers)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/stytch/users.rb
CHANGED
@@ -19,6 +19,10 @@ module Stytch
|
|
19
19
|
# Add a User to Stytch. A `user_id` is returned in the response that can then be used to perform other operations within Stytch. An `email` or a `phone_number` is required.
|
20
20
|
#
|
21
21
|
# == Parameters:
|
22
|
+
# roles::
|
23
|
+
# Roles to explicitly assign to this User.
|
24
|
+
# See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment.
|
25
|
+
# The type of this field is list of +String+.
|
22
26
|
# email::
|
23
27
|
# The email address of the end user.
|
24
28
|
# The type of this field is nilable +String+.
|
@@ -72,6 +76,7 @@ module Stytch
|
|
72
76
|
# 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.
|
73
77
|
# The type of this field is +Integer+.
|
74
78
|
def create(
|
79
|
+
roles:,
|
75
80
|
email: nil,
|
76
81
|
name: nil,
|
77
82
|
attributes: nil,
|
@@ -82,7 +87,9 @@ module Stytch
|
|
82
87
|
external_id: nil
|
83
88
|
)
|
84
89
|
headers = {}
|
85
|
-
request = {
|
90
|
+
request = {
|
91
|
+
roles: roles
|
92
|
+
}
|
86
93
|
request[:email] = email unless email.nil?
|
87
94
|
request[:name] = name unless name.nil?
|
88
95
|
request[:attributes] = attributes unless attributes.nil?
|
@@ -137,6 +144,10 @@ module Stytch
|
|
137
144
|
# is_locked::
|
138
145
|
# (no documentation yet)
|
139
146
|
# The type of this field is +Boolean+.
|
147
|
+
# roles::
|
148
|
+
# Roles assigned to this User.
|
149
|
+
# See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment.
|
150
|
+
# The type of this field is list of +String+.
|
140
151
|
# status_code::
|
141
152
|
# 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.
|
142
153
|
# The type of this field is +Integer+.
|
@@ -248,6 +259,10 @@ module Stytch
|
|
248
259
|
# external_id::
|
249
260
|
# An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters.
|
250
261
|
# The type of this field is nilable +String+.
|
262
|
+
# roles::
|
263
|
+
# Roles to explicitly assign to this User.
|
264
|
+
# See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment.
|
265
|
+
# The type of this field is nilable list of +String+.
|
251
266
|
#
|
252
267
|
# == Returns:
|
253
268
|
# An object with the following fields:
|
@@ -278,7 +293,8 @@ module Stytch
|
|
278
293
|
attributes: nil,
|
279
294
|
trusted_metadata: nil,
|
280
295
|
untrusted_metadata: nil,
|
281
|
-
external_id: nil
|
296
|
+
external_id: nil,
|
297
|
+
roles: nil
|
282
298
|
)
|
283
299
|
headers = {}
|
284
300
|
request = {}
|
@@ -287,6 +303,7 @@ module Stytch
|
|
287
303
|
request[:trusted_metadata] = trusted_metadata unless trusted_metadata.nil?
|
288
304
|
request[:untrusted_metadata] = untrusted_metadata unless untrusted_metadata.nil?
|
289
305
|
request[:external_id] = external_id unless external_id.nil?
|
306
|
+
request[:roles] = roles unless roles.nil?
|
290
307
|
|
291
308
|
put_request("/v1/users/#{user_id}", request, headers)
|
292
309
|
end
|
data/lib/stytch/version.rb
CHANGED
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.
|
4
|
+
version: 10.32.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-09-
|
11
|
+
date: 2025-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- lib/stytch/client.rb
|
143
143
|
- lib/stytch/connected_apps.rb
|
144
144
|
- lib/stytch/crypto_wallets.rb
|
145
|
+
- lib/stytch/debug.rb
|
145
146
|
- lib/stytch/errors.rb
|
146
147
|
- lib/stytch/fraud.rb
|
147
148
|
- lib/stytch/idp.rb
|