stytch 10.1.1 → 10.2.1
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_discovery.rb +1 -1
- data/lib/stytch/b2b_impersonation.rb +30 -0
- data/lib/stytch/b2b_organizations.rb +2 -2
- data/lib/stytch/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f721400f7525029170289038d5f6ba9ed0ab4445f494932adaf87738c6dbcb8a
|
4
|
+
data.tar.gz: d171e72d7afb5e55008106509a877f111391f7e1e0737c85e766c6e083fa1019
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be375182bfbb7cb3b276b1547ce2015094cdaf13ea4d3efff064ace9f2d790a77399a75faeac09f73d1808e771ca72f140ed8a9475be576bbf273ccb3ddcc5d4
|
7
|
+
data.tar.gz: ff445690dfd87feb9906c2a25a44dbdb74125f05a42407ea1b9803b417e80aaaa323c78ce154b7a285eeb1a808f6da9bb607b4f9335dc8273ff119a294cffacf
|
data/lib/stytch/b2b_client.rb
CHANGED
@@ -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)
|
data/lib/stytch/b2b_discovery.rb
CHANGED
@@ -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 `
|
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 `
|
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 `
|
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.
|
data/lib/stytch/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stytch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.
|
4
|
+
version: 10.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stytch
|
@@ -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
|