stytch 10.40.0 → 10.41.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_organizations.rb +57 -0
- data/lib/stytch/b2b_rbac.rb +95 -0
- data/lib/stytch/otps.rb +2 -2
- data/lib/stytch/users.rb +7 -0
- data/lib/stytch/version.rb +1 -1
- data/lib/stytch/webauthn.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 772200fdaff7982e55a0c81c0800899f68d4d5883cc70c69fdddd9eb0a980239
|
|
4
|
+
data.tar.gz: 56d73d13e822be0a613f1cf9449e1ba68bb8e86c4b91068e8b947cf7cf560379
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6887efb099ca71afc2c00a9a40a9be303dffadb7f9abd0144873de5b4270ca79bc35fb8f98e44e64019a59e1dc8a2800b6269a12beabd905b471fc6d7c012b4
|
|
7
|
+
data.tar.gz: 3ff2c30dec6127429eb20b2751b807a534930471d08960ffee21acb5b2c8356db664ee125c9cc8e84bb22b34fc15d9bc551f8943d355c4814f340bbf0948ef67
|
|
@@ -86,6 +86,25 @@ module StytchB2B
|
|
|
86
86
|
end
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
+
class DeleteExternalIdRequestOptions
|
|
90
|
+
# Optional authorization object.
|
|
91
|
+
# Pass in an active Stytch Member session token or session JWT and the request
|
|
92
|
+
# will be run using that member's permissions.
|
|
93
|
+
attr_accessor :authorization
|
|
94
|
+
|
|
95
|
+
def initialize(
|
|
96
|
+
authorization: nil
|
|
97
|
+
)
|
|
98
|
+
@authorization = authorization
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def to_headers
|
|
102
|
+
headers = {}
|
|
103
|
+
headers.merge!(@authorization.to_headers) if authorization
|
|
104
|
+
headers
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
89
108
|
include Stytch::RequestHelper
|
|
90
109
|
attr_reader :members
|
|
91
110
|
|
|
@@ -746,6 +765,15 @@ module StytchB2B
|
|
|
746
765
|
get_request(request, headers)
|
|
747
766
|
end
|
|
748
767
|
|
|
768
|
+
def delete_external_id(
|
|
769
|
+
organization_id:,
|
|
770
|
+
method_options: nil
|
|
771
|
+
)
|
|
772
|
+
headers = {}
|
|
773
|
+
headers = headers.merge(method_options.to_headers) unless method_options.nil?
|
|
774
|
+
delete_request("/v1/b2b/organizations/#{organization_id}/external_id", headers)
|
|
775
|
+
end
|
|
776
|
+
|
|
749
777
|
class Members
|
|
750
778
|
class UpdateRequestOptions
|
|
751
779
|
# Optional authorization object.
|
|
@@ -937,6 +965,25 @@ module StytchB2B
|
|
|
937
965
|
end
|
|
938
966
|
end
|
|
939
967
|
|
|
968
|
+
class DeleteExternalIdRequestOptions
|
|
969
|
+
# Optional authorization object.
|
|
970
|
+
# Pass in an active Stytch Member session token or session JWT and the request
|
|
971
|
+
# will be run using that member's permissions.
|
|
972
|
+
attr_accessor :authorization
|
|
973
|
+
|
|
974
|
+
def initialize(
|
|
975
|
+
authorization: nil
|
|
976
|
+
)
|
|
977
|
+
@authorization = authorization
|
|
978
|
+
end
|
|
979
|
+
|
|
980
|
+
def to_headers
|
|
981
|
+
headers = {}
|
|
982
|
+
headers.merge!(@authorization.to_headers) if authorization
|
|
983
|
+
headers
|
|
984
|
+
end
|
|
985
|
+
end
|
|
986
|
+
|
|
940
987
|
class CreateRequestOptions
|
|
941
988
|
# Optional authorization object.
|
|
942
989
|
# Pass in an active Stytch Member session token or session JWT and the request
|
|
@@ -1643,6 +1690,16 @@ module StytchB2B
|
|
|
1643
1690
|
get_request(request, headers)
|
|
1644
1691
|
end
|
|
1645
1692
|
|
|
1693
|
+
def delete_external_id(
|
|
1694
|
+
organization_id:,
|
|
1695
|
+
member_id:,
|
|
1696
|
+
method_options: nil
|
|
1697
|
+
)
|
|
1698
|
+
headers = {}
|
|
1699
|
+
headers = headers.merge(method_options.to_headers) unless method_options.nil?
|
|
1700
|
+
delete_request("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/external_id", headers)
|
|
1701
|
+
end
|
|
1702
|
+
|
|
1646
1703
|
# Creates a Member. An `organization_id` and `email_address` are required.
|
|
1647
1704
|
#
|
|
1648
1705
|
# == Parameters:
|
data/lib/stytch/b2b_rbac.rb
CHANGED
|
@@ -11,9 +11,12 @@ require_relative 'request_helper'
|
|
|
11
11
|
module StytchB2B
|
|
12
12
|
class RBAC
|
|
13
13
|
include Stytch::RequestHelper
|
|
14
|
+
attr_reader :organizations
|
|
14
15
|
|
|
15
16
|
def initialize(connection)
|
|
16
17
|
@connection = connection
|
|
18
|
+
|
|
19
|
+
@organizations = StytchB2B::RBAC::Organizations.new(@connection)
|
|
17
20
|
end
|
|
18
21
|
|
|
19
22
|
# Get the active RBAC Policy for your current Stytch Project. An RBAC Policy is the canonical document that stores all defined Resources and Roles within your RBAC permissioning model.
|
|
@@ -44,5 +47,97 @@ module StytchB2B
|
|
|
44
47
|
request = request_with_query_params('/v1/b2b/rbac/policy', query_params)
|
|
45
48
|
get_request(request, headers)
|
|
46
49
|
end
|
|
50
|
+
|
|
51
|
+
class Organizations
|
|
52
|
+
include Stytch::RequestHelper
|
|
53
|
+
|
|
54
|
+
def initialize(connection)
|
|
55
|
+
@connection = connection
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Get the active RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy contains the roles that have been defined specifically for that organization, allowing for organization-specific permissioning models.
|
|
59
|
+
#
|
|
60
|
+
# This endpoint returns the organization-scoped roles that supplement the project-level RBAC policy. Organization policies allow you to define custom roles that are specific to individual organizations within your project.
|
|
61
|
+
#
|
|
62
|
+
# When using the backend SDKs, the RBAC Policy will be cached to allow for local evaluations, eliminating the need for an extra request to Stytch. The policy will be refreshed if an authorization check is requested and the RBAC policy was last updated more than 5 minutes ago.
|
|
63
|
+
#
|
|
64
|
+
# Organization-specific roles can be created and managed through this API endpoint, providing fine-grained control over permissions at the organization level.
|
|
65
|
+
#
|
|
66
|
+
# Check out the [RBAC overview](https://stytch.com/docs/b2b/guides/rbac/overview) to learn more about Stytch's RBAC permissioning model and organization-scoped policies.
|
|
67
|
+
#
|
|
68
|
+
# == Parameters:
|
|
69
|
+
# organization_id::
|
|
70
|
+
# 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. You may also use the organization_slug or organization_external_id here as a convenience.
|
|
71
|
+
# The type of this field is +String+.
|
|
72
|
+
#
|
|
73
|
+
# == Returns:
|
|
74
|
+
# An object with the following fields:
|
|
75
|
+
# request_id::
|
|
76
|
+
# 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.
|
|
77
|
+
# The type of this field is +String+.
|
|
78
|
+
# org_policy::
|
|
79
|
+
# The organization-specific RBAC Policy that contains roles defined for this organization. Organization policies supplement the project-level RBAC policy with additional roles that are specific to the organization.
|
|
80
|
+
# The type of this field is +OrgPolicy+ (+object+).
|
|
81
|
+
# status_code::
|
|
82
|
+
# 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.
|
|
83
|
+
# The type of this field is +Integer+.
|
|
84
|
+
def get_org_policy(
|
|
85
|
+
organization_id:
|
|
86
|
+
)
|
|
87
|
+
headers = {}
|
|
88
|
+
query_params = {}
|
|
89
|
+
request = request_with_query_params("/v1/b2b/rbac/organizations/#{organization_id}", query_params)
|
|
90
|
+
get_request(request, headers)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Set the RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy allows you to define roles that are specific to that organization, providing fine-grained control over permissions at the organization level.
|
|
94
|
+
#
|
|
95
|
+
# This endpoint allows you to create, update, or replace the organization-scoped roles for a given organization. Organization policies supplement the project-level RBAC policy with additional roles that are only applicable within the context of that specific organization.
|
|
96
|
+
#
|
|
97
|
+
# The organization policy consists of roles, where each role defines:
|
|
98
|
+
# - A unique `role_id` to identify the role
|
|
99
|
+
# - A human-readable `description` of the role's purpose
|
|
100
|
+
# - A set of `permissions` that specify which actions can be performed on which resources
|
|
101
|
+
#
|
|
102
|
+
# When you set an organization policy, it will replace any existing organization-specific roles for that organization. The project-level RBAC policy remains unchanged.
|
|
103
|
+
#
|
|
104
|
+
# Organization-specific roles are useful for scenarios where different organizations within your project require different permission structures, such as:
|
|
105
|
+
# - Multi-tenant applications with varying access levels per tenant
|
|
106
|
+
# - Organizations with custom approval workflows
|
|
107
|
+
# - Different organizational hierarchies requiring unique role definitions
|
|
108
|
+
#
|
|
109
|
+
# Check out the [RBAC overview](https://stytch.com/docs/b2b/guides/rbac/overview) to learn more about Stytch's RBAC permissioning model and organization-scoped policies.
|
|
110
|
+
#
|
|
111
|
+
# == Parameters:
|
|
112
|
+
# organization_id::
|
|
113
|
+
# 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. You may also use the organization_slug or organization_external_id here as a convenience.
|
|
114
|
+
# The type of this field is +String+.
|
|
115
|
+
# org_policy::
|
|
116
|
+
# The organization-specific RBAC Policy that contains roles defined for this organization. Organization policies supplement the project-level RBAC policy with additional roles that are specific to the organization.
|
|
117
|
+
# The type of this field is +OrgPolicy+ (+object+).
|
|
118
|
+
#
|
|
119
|
+
# == Returns:
|
|
120
|
+
# An object with the following fields:
|
|
121
|
+
# request_id::
|
|
122
|
+
# 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.
|
|
123
|
+
# The type of this field is +String+.
|
|
124
|
+
# org_policy::
|
|
125
|
+
# The organization-specific RBAC Policy that contains roles defined for this organization. Organization policies supplement the project-level RBAC policy with additional roles that are specific to the organization.
|
|
126
|
+
# The type of this field is +OrgPolicy+ (+object+).
|
|
127
|
+
# status_code::
|
|
128
|
+
# 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.
|
|
129
|
+
# The type of this field is +Integer+.
|
|
130
|
+
def set_org_policy(
|
|
131
|
+
organization_id:,
|
|
132
|
+
org_policy:
|
|
133
|
+
)
|
|
134
|
+
headers = {}
|
|
135
|
+
request = {
|
|
136
|
+
org_policy: org_policy
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
put_request("/v1/b2b/rbac/organizations/#{organization_id}", request, headers)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
47
142
|
end
|
|
48
143
|
end
|
data/lib/stytch/otps.rb
CHANGED
|
@@ -17,7 +17,7 @@ module Stytch
|
|
|
17
17
|
@connection = connection
|
|
18
18
|
|
|
19
19
|
@sms = Stytch::OTPs::Sms.new(@connection)
|
|
20
|
-
@whatsapp = Stytch::OTPs::
|
|
20
|
+
@whatsapp = Stytch::OTPs::WhatsApp.new(@connection)
|
|
21
21
|
@email = Stytch::OTPs::Email.new(@connection)
|
|
22
22
|
end
|
|
23
23
|
|
|
@@ -291,7 +291,7 @@ module Stytch
|
|
|
291
291
|
end
|
|
292
292
|
end
|
|
293
293
|
|
|
294
|
-
class
|
|
294
|
+
class WhatsApp
|
|
295
295
|
include Stytch::RequestHelper
|
|
296
296
|
|
|
297
297
|
def initialize(connection)
|
data/lib/stytch/users.rb
CHANGED
|
@@ -602,6 +602,13 @@ module Stytch
|
|
|
602
602
|
delete_request("/v1/users/oauth/#{oauth_user_registration_id}", headers)
|
|
603
603
|
end
|
|
604
604
|
|
|
605
|
+
def delete_external_id(
|
|
606
|
+
user_id:
|
|
607
|
+
)
|
|
608
|
+
headers = {}
|
|
609
|
+
delete_request("/v1/users/#{user_id}/external_id", headers)
|
|
610
|
+
end
|
|
611
|
+
|
|
605
612
|
# User Get Connected Apps retrieves a list of Connected Apps with which the User has successfully completed an
|
|
606
613
|
# authorization flow.
|
|
607
614
|
# If the User revokes a Connected App's access (e.g. via the Revoke Connected App endpoint) then the Connected App will
|
data/lib/stytch/version.rb
CHANGED
data/lib/stytch/webauthn.rb
CHANGED
|
@@ -206,6 +206,9 @@ module Stytch
|
|
|
206
206
|
# If true, the `public_key_credential_creation_options` returned will be optimized for Passkeys with `userVerification` set to `"preferred"`.
|
|
207
207
|
#
|
|
208
208
|
# The type of this field is nilable +Boolean+.
|
|
209
|
+
# use_base64_url_encoding::
|
|
210
|
+
# (no documentation yet)
|
|
211
|
+
# The type of this field is nilable +Boolean+.
|
|
209
212
|
#
|
|
210
213
|
# == Returns:
|
|
211
214
|
# An object with the following fields:
|
|
@@ -224,7 +227,8 @@ module Stytch
|
|
|
224
227
|
def authenticate_start(
|
|
225
228
|
domain:,
|
|
226
229
|
user_id: nil,
|
|
227
|
-
return_passkey_credential_options: nil
|
|
230
|
+
return_passkey_credential_options: nil,
|
|
231
|
+
use_base64_url_encoding: nil
|
|
228
232
|
)
|
|
229
233
|
headers = {}
|
|
230
234
|
request = {
|
|
@@ -232,6 +236,7 @@ module Stytch
|
|
|
232
236
|
}
|
|
233
237
|
request[:user_id] = user_id unless user_id.nil?
|
|
234
238
|
request[:return_passkey_credential_options] = return_passkey_credential_options unless return_passkey_credential_options.nil?
|
|
239
|
+
request[:use_base64_url_encoding] = use_base64_url_encoding unless use_base64_url_encoding.nil?
|
|
235
240
|
|
|
236
241
|
post_request('/v1/webauthn/authenticate/start', request, headers)
|
|
237
242
|
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.
|
|
4
|
+
version: 10.41.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- stytch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|