stytch 7.4.0 → 7.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/DEVELOPMENT.md +1 -1
- data/README.md +1 -1
- data/lib/stytch/b2b_discovery.rb +6 -0
- data/lib/stytch/b2b_magic_links.rb +6 -1
- data/lib/stytch/b2b_oauth.rb +9 -1
- data/lib/stytch/b2b_organizations.rb +27 -5
- data/lib/stytch/b2b_passwords.rb +12 -2
- data/lib/stytch/b2b_sessions.rb +4 -0
- data/lib/stytch/b2b_sso.rb +8 -3
- data/lib/stytch/version.rb +1 -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: aed7b76ec8534b96ef77dc7ad399a39f1644481dd7604282b4b549c4047d8722
|
4
|
+
data.tar.gz: d92f3ff95e481c60539490793e13fda5d4467d6bbc70a0235dff6cb850635ae8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46152089296e2224c0713ddf761a85d5a431228b01367e6df79b273089259e6be6ff1f36910fd2857609b0528eb1d868797f1d2c865afcb1f11929842cd1d4ed
|
7
|
+
data.tar.gz: 6857b8e5a18e7435cf4b7093598e5ee6596dffba9125e18d84689f48d32c90060b09ab84867da4b19eebfb0b0327ce1f000eda1dd18d10462ce7811762a9a2fe
|
data/DEVELOPMENT.md
CHANGED
@@ -18,4 +18,4 @@ If you have non-trivial changes you'd like us to incorporate, please open an iss
|
|
18
18
|
When you're ready for someone to look at your issue or PR, assign `@stytchauth/client-libraries` (GitHub should do this automatically). If we don't acknowledge it within one business day, please escalate it by tagging `@stytchauth/engineering` in a comment or letting us know in [Slack].
|
19
19
|
|
20
20
|
[Bundler]: https://bundler.io/
|
21
|
-
[Slack]: https://
|
21
|
+
[Slack]: https://stytch.slack.com/join/shared_invite/zt-2f0fi1ruu-ub~HGouWRmPARM1MTwPESA
|
data/README.md
CHANGED
@@ -77,7 +77,7 @@ Follow one of the [integration guides](https://stytch.com/docs/guides) or start
|
|
77
77
|
|
78
78
|
If you've found a bug, [open an issue](https://github.com/stytchauth/stytch-ruby/issues/new)!
|
79
79
|
|
80
|
-
If you have questions or want help troubleshooting, join us in [Slack](https://
|
80
|
+
If you have questions or want help troubleshooting, join us in [Slack](https://stytch.slack.com/join/shared_invite/zt-2f0fi1ruu-ub~HGouWRmPARM1MTwPESA) or email support@stytch.com.
|
81
81
|
|
82
82
|
If you've found a security vulnerability, please follow our [responsible disclosure instructions](https://stytch.com/docs/resources/security-and-trust/security#:~:text=Responsible%20disclosure%20program).
|
83
83
|
|
data/lib/stytch/b2b_discovery.rb
CHANGED
@@ -117,6 +117,9 @@ module StytchB2B
|
|
117
117
|
# mfa_required::
|
118
118
|
# Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
|
119
119
|
# The type of this field is nilable +MfaRequired+ (+object+).
|
120
|
+
# primary_required::
|
121
|
+
# (no documentation yet)
|
122
|
+
# The type of this field is nilable +PrimaryRequired+ (+object+).
|
120
123
|
def exchange(
|
121
124
|
intermediate_session_token:,
|
122
125
|
organization_id:,
|
@@ -312,6 +315,9 @@ module StytchB2B
|
|
312
315
|
# mfa_required::
|
313
316
|
# Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
|
314
317
|
# The type of this field is nilable +MfaRequired+ (+object+).
|
318
|
+
# primary_required::
|
319
|
+
# (no documentation yet)
|
320
|
+
# The type of this field is nilable +PrimaryRequired+ (+object+).
|
315
321
|
def create(
|
316
322
|
intermediate_session_token:,
|
317
323
|
organization_name:,
|
@@ -76,6 +76,9 @@ module StytchB2B
|
|
76
76
|
# Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
|
77
77
|
#
|
78
78
|
# The type of this field is nilable +AuthenticateRequestLocale+ (string enum).
|
79
|
+
# intermediate_session_token::
|
80
|
+
# (no documentation yet)
|
81
|
+
# The type of this field is nilable +String+.
|
79
82
|
#
|
80
83
|
# == Returns:
|
81
84
|
# An object with the following fields:
|
@@ -133,7 +136,8 @@ module StytchB2B
|
|
133
136
|
session_jwt: nil,
|
134
137
|
session_duration_minutes: nil,
|
135
138
|
session_custom_claims: nil,
|
136
|
-
locale: nil
|
139
|
+
locale: nil,
|
140
|
+
intermediate_session_token: nil
|
137
141
|
)
|
138
142
|
headers = {}
|
139
143
|
request = {
|
@@ -145,6 +149,7 @@ module StytchB2B
|
|
145
149
|
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
|
146
150
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
147
151
|
request[:locale] = locale unless locale.nil?
|
152
|
+
request[:intermediate_session_token] = intermediate_session_token unless intermediate_session_token.nil?
|
148
153
|
|
149
154
|
post_request('/v1/b2b/magic_links/authenticate', request, headers)
|
150
155
|
end
|
data/lib/stytch/b2b_oauth.rb
CHANGED
@@ -71,6 +71,9 @@ module StytchB2B
|
|
71
71
|
# Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
|
72
72
|
#
|
73
73
|
# The type of this field is nilable +AuthenticateRequestLocale+ (string enum).
|
74
|
+
# intermediate_session_token::
|
75
|
+
# (no documentation yet)
|
76
|
+
# The type of this field is nilable +String+.
|
74
77
|
#
|
75
78
|
# == Returns:
|
76
79
|
# An object with the following fields:
|
@@ -128,6 +131,9 @@ module StytchB2B
|
|
128
131
|
# mfa_required::
|
129
132
|
# Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
|
130
133
|
# The type of this field is nilable +MfaRequired+ (+object+).
|
134
|
+
# primary_required::
|
135
|
+
# (no documentation yet)
|
136
|
+
# The type of this field is nilable +PrimaryRequired+ (+object+).
|
131
137
|
def authenticate(
|
132
138
|
oauth_token:,
|
133
139
|
session_token: nil,
|
@@ -135,7 +141,8 @@ module StytchB2B
|
|
135
141
|
session_jwt: nil,
|
136
142
|
session_custom_claims: nil,
|
137
143
|
pkce_code_verifier: nil,
|
138
|
-
locale: nil
|
144
|
+
locale: nil,
|
145
|
+
intermediate_session_token: nil
|
139
146
|
)
|
140
147
|
headers = {}
|
141
148
|
request = {
|
@@ -147,6 +154,7 @@ module StytchB2B
|
|
147
154
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
148
155
|
request[:pkce_code_verifier] = pkce_code_verifier unless pkce_code_verifier.nil?
|
149
156
|
request[:locale] = locale unless locale.nil?
|
157
|
+
request[:intermediate_session_token] = intermediate_session_token unless intermediate_session_token.nil?
|
150
158
|
|
151
159
|
post_request('/v1/b2b/oauth/authenticate', request, headers)
|
152
160
|
end
|
@@ -353,7 +353,7 @@ module StytchB2B
|
|
353
353
|
# for more information about role assignment.
|
354
354
|
#
|
355
355
|
# 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.implicit-roles` action on the `stytch.organization` Resource.
|
356
|
-
# The type of this field is nilable list of +
|
356
|
+
# The type of this field is nilable list of +EmailImplicitRoleAssignment+.
|
357
357
|
# mfa_methods::
|
358
358
|
# The setting that controls which MFA methods can be used by Members of an Organization. The accepted values are:
|
359
359
|
#
|
@@ -592,6 +592,10 @@ module StytchB2B
|
|
592
592
|
# The type of this field is nilable +String+.
|
593
593
|
# email_address::
|
594
594
|
# Updates the Member's `email_address`, if provided.
|
595
|
+
# If a Member's email address is changed, other Members in the same Organization cannot use the old email address, although the Member may update back to their old email address.
|
596
|
+
# A Member's email address can only be useable again by other Members if the Member is deleted.
|
597
|
+
#
|
598
|
+
# If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.info.email` action on the `stytch.member` Resource. Members cannot update their own email address.
|
595
599
|
# The type of this field is nilable +String+.
|
596
600
|
#
|
597
601
|
# == Returns:
|
@@ -1074,6 +1078,9 @@ module StytchB2B
|
|
1074
1078
|
# member_id::
|
1075
1079
|
# Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
|
1076
1080
|
# The type of this field is +String+.
|
1081
|
+
# include_refresh_token::
|
1082
|
+
# (no documentation yet)
|
1083
|
+
# The type of this field is nilable +Boolean+.
|
1077
1084
|
#
|
1078
1085
|
# == Returns:
|
1079
1086
|
# An object with the following fields:
|
@@ -1101,12 +1108,18 @@ module StytchB2B
|
|
1101
1108
|
# status_code::
|
1102
1109
|
# 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.
|
1103
1110
|
# The type of this field is +Integer+.
|
1111
|
+
# refresh_token::
|
1112
|
+
# (no documentation yet)
|
1113
|
+
# The type of this field is nilable +String+.
|
1104
1114
|
def google(
|
1105
1115
|
organization_id:,
|
1106
|
-
member_id
|
1116
|
+
member_id:,
|
1117
|
+
include_refresh_token: nil
|
1107
1118
|
)
|
1108
1119
|
headers = {}
|
1109
|
-
query_params = {
|
1120
|
+
query_params = {
|
1121
|
+
include_refresh_token: include_refresh_token
|
1122
|
+
}
|
1110
1123
|
request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/oauth_providers/google", query_params)
|
1111
1124
|
get_request(request, headers)
|
1112
1125
|
end
|
@@ -1122,6 +1135,9 @@ module StytchB2B
|
|
1122
1135
|
# member_id::
|
1123
1136
|
# Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
|
1124
1137
|
# The type of this field is +String+.
|
1138
|
+
# include_refresh_token::
|
1139
|
+
# (no documentation yet)
|
1140
|
+
# The type of this field is nilable +Boolean+.
|
1125
1141
|
#
|
1126
1142
|
# == Returns:
|
1127
1143
|
# An object with the following fields:
|
@@ -1149,12 +1165,18 @@ module StytchB2B
|
|
1149
1165
|
# status_code::
|
1150
1166
|
# 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.
|
1151
1167
|
# The type of this field is +Integer+.
|
1168
|
+
# refresh_token::
|
1169
|
+
# (no documentation yet)
|
1170
|
+
# The type of this field is nilable +String+.
|
1152
1171
|
def microsoft(
|
1153
1172
|
organization_id:,
|
1154
|
-
member_id
|
1173
|
+
member_id:,
|
1174
|
+
include_refresh_token: nil
|
1155
1175
|
)
|
1156
1176
|
headers = {}
|
1157
|
-
query_params = {
|
1177
|
+
query_params = {
|
1178
|
+
include_refresh_token: include_refresh_token
|
1179
|
+
}
|
1158
1180
|
request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/oauth_providers/microsoft", query_params)
|
1159
1181
|
get_request(request, headers)
|
1160
1182
|
end
|
data/lib/stytch/b2b_passwords.rb
CHANGED
@@ -255,6 +255,9 @@ module StytchB2B
|
|
255
255
|
# Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
|
256
256
|
#
|
257
257
|
# The type of this field is nilable +AuthenticateRequestLocale+ (string enum).
|
258
|
+
# intermediate_session_token::
|
259
|
+
# (no documentation yet)
|
260
|
+
# The type of this field is nilable +String+.
|
258
261
|
#
|
259
262
|
# == Returns:
|
260
263
|
# An object with the following fields:
|
@@ -305,7 +308,8 @@ module StytchB2B
|
|
305
308
|
session_duration_minutes: nil,
|
306
309
|
session_jwt: nil,
|
307
310
|
session_custom_claims: nil,
|
308
|
-
locale: nil
|
311
|
+
locale: nil,
|
312
|
+
intermediate_session_token: nil
|
309
313
|
)
|
310
314
|
headers = {}
|
311
315
|
request = {
|
@@ -318,6 +322,7 @@ module StytchB2B
|
|
318
322
|
request[:session_jwt] = session_jwt unless session_jwt.nil?
|
319
323
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
320
324
|
request[:locale] = locale unless locale.nil?
|
325
|
+
request[:intermediate_session_token] = intermediate_session_token unless intermediate_session_token.nil?
|
321
326
|
|
322
327
|
post_request('/v1/b2b/passwords/authenticate', request, headers)
|
323
328
|
end
|
@@ -473,6 +478,9 @@ module StytchB2B
|
|
473
478
|
# Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
|
474
479
|
#
|
475
480
|
# The type of this field is nilable +ResetRequestLocale+ (string enum).
|
481
|
+
# intermediate_session_token::
|
482
|
+
# (no documentation yet)
|
483
|
+
# The type of this field is nilable +String+.
|
476
484
|
#
|
477
485
|
# == Returns:
|
478
486
|
# An object with the following fields:
|
@@ -526,7 +534,8 @@ module StytchB2B
|
|
526
534
|
session_jwt: nil,
|
527
535
|
code_verifier: nil,
|
528
536
|
session_custom_claims: nil,
|
529
|
-
locale: nil
|
537
|
+
locale: nil,
|
538
|
+
intermediate_session_token: nil
|
530
539
|
)
|
531
540
|
headers = {}
|
532
541
|
request = {
|
@@ -539,6 +548,7 @@ module StytchB2B
|
|
539
548
|
request[:code_verifier] = code_verifier unless code_verifier.nil?
|
540
549
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
541
550
|
request[:locale] = locale unless locale.nil?
|
551
|
+
request[:intermediate_session_token] = intermediate_session_token unless intermediate_session_token.nil?
|
542
552
|
|
543
553
|
post_request('/v1/b2b/passwords/email/reset', request, headers)
|
544
554
|
end
|
data/lib/stytch/b2b_sessions.rb
CHANGED
@@ -210,6 +210,7 @@ module StytchB2B
|
|
210
210
|
# To create a new member via domain matching, use the [Exchange Intermediate Session](https://stytch.com/docs/b2b/api/exchange-intermediate-session) flow instead.
|
211
211
|
#
|
212
212
|
# Only Email Magic Link, OAuth, and SMS OTP factors can be transferred between sessions. Other authentication factors, such as password factors, will not be transferred to the new session.
|
213
|
+
# Any OAuth Tokens owned by the Member will not be transferred to the new Organization.
|
213
214
|
# SMS OTP factors can be used to fulfill MFA requirements for the target Organization if both the original and target Member have the same phone number and the phone number is verified for both Members.
|
214
215
|
#
|
215
216
|
# If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
|
@@ -295,6 +296,9 @@ module StytchB2B
|
|
295
296
|
# mfa_required::
|
296
297
|
# Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
|
297
298
|
# The type of this field is nilable +MfaRequired+ (+object+).
|
299
|
+
# primary_required::
|
300
|
+
# (no documentation yet)
|
301
|
+
# The type of this field is nilable +PrimaryRequired+ (+object+).
|
298
302
|
def exchange(
|
299
303
|
organization_id:,
|
300
304
|
session_token: nil,
|
data/lib/stytch/b2b_sso.rb
CHANGED
@@ -181,6 +181,9 @@ module StytchB2B
|
|
181
181
|
# Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
|
182
182
|
#
|
183
183
|
# The type of this field is nilable +AuthenticateRequestLocale+ (string enum).
|
184
|
+
# intermediate_session_token::
|
185
|
+
# (no documentation yet)
|
186
|
+
# The type of this field is nilable +String+.
|
184
187
|
#
|
185
188
|
# == Returns:
|
186
189
|
# An object with the following fields:
|
@@ -234,7 +237,8 @@ module StytchB2B
|
|
234
237
|
session_jwt: nil,
|
235
238
|
session_duration_minutes: nil,
|
236
239
|
session_custom_claims: nil,
|
237
|
-
locale: nil
|
240
|
+
locale: nil,
|
241
|
+
intermediate_session_token: nil
|
238
242
|
)
|
239
243
|
headers = {}
|
240
244
|
request = {
|
@@ -246,6 +250,7 @@ module StytchB2B
|
|
246
250
|
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
|
247
251
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
248
252
|
request[:locale] = locale unless locale.nil?
|
253
|
+
request[:intermediate_session_token] = intermediate_session_token unless intermediate_session_token.nil?
|
249
254
|
|
250
255
|
post_request('/v1/b2b/sso/authenticate', request, headers)
|
251
256
|
end
|
@@ -469,7 +474,7 @@ module StytchB2B
|
|
469
474
|
# The type of this field is nilable +String+.
|
470
475
|
# saml_connection_implicit_role_assignments::
|
471
476
|
# All Members who log in with this SAML connection will implicitly receive the specified Roles. See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment.
|
472
|
-
# The type of this field is nilable list of +
|
477
|
+
# The type of this field is nilable list of +SAMLConnectionImplicitRoleAssignment+.
|
473
478
|
# saml_group_implicit_role_assignments::
|
474
479
|
# Defines the names of the SAML groups
|
475
480
|
# that grant specific role assignments. For each group-Role pair, if a Member logs in with this SAML connection and
|
@@ -477,7 +482,7 @@ module StytchB2B
|
|
477
482
|
# [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment.
|
478
483
|
# Before adding any group implicit role assignments, you must add a "groups" key to your SAML connection's
|
479
484
|
# `attribute_mapping`. Make sure that your IdP is configured to correctly send the group information.
|
480
|
-
# The type of this field is nilable list of +
|
485
|
+
# The type of this field is nilable list of +SAMLGroupImplicitRoleAssignment+.
|
481
486
|
# alternative_audience_uri::
|
482
487
|
# An alternative URL to use for the Audience Restriction. This value can be used when you wish to migrate an existing SAML integration to Stytch with zero downtime.
|
483
488
|
# The type of this field is nilable +String+.
|
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: 7.
|
4
|
+
version: 7.5.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-03-
|
11
|
+
date: 2024-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|