stytch 10.26.0 → 10.28.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_discovery.rb +19 -3
- data/lib/stytch/b2b_magic_links.rb +12 -4
- data/lib/stytch/b2b_oauth.rb +10 -2
- data/lib/stytch/b2b_organizations.rb +41 -25
- data/lib/stytch/b2b_otp.rb +23 -7
- data/lib/stytch/b2b_passwords.rb +43 -11
- data/lib/stytch/b2b_recovery_codes.rb +12 -4
- data/lib/stytch/b2b_scim.rb +8 -8
- data/lib/stytch/b2b_sessions.rb +30 -6
- data/lib/stytch/b2b_sso.rb +19 -11
- data/lib/stytch/b2b_totps.rb +12 -4
- data/lib/stytch/crypto_wallets.rb +9 -1
- data/lib/stytch/magic_links.rb +9 -1
- data/lib/stytch/oauth.rb +9 -1
- data/lib/stytch/otps.rb +9 -1
- data/lib/stytch/passwords.rb +48 -8
- data/lib/stytch/sessions.rb +27 -3
- data/lib/stytch/totps.rb +18 -2
- data/lib/stytch/users.rb +3 -0
- data/lib/stytch/version.rb +1 -1
- data/lib/stytch/webauthn.rb +18 -2
- metadata +2 -2
data/lib/stytch/b2b_passwords.rb
CHANGED
@@ -110,7 +110,7 @@ module StytchB2B
|
|
110
110
|
# The password hash used. Currently `bcrypt`, `scrypt`, `argon_2i`, `argon_2id`, `md_5`, `sha_1`, and `pbkdf_2` are supported.
|
111
111
|
# The type of this field is +MigrateRequestHashType+ (string enum).
|
112
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 here as a convenience.
|
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
114
|
# The type of this field is +String+.
|
115
115
|
# md_5_config::
|
116
116
|
# Optional parameters for MD-5 hash types.
|
@@ -239,7 +239,7 @@ module StytchB2B
|
|
239
239
|
#
|
240
240
|
# == Parameters:
|
241
241
|
# organization_id::
|
242
|
-
# 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 here as a convenience.
|
242
|
+
# 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.
|
243
243
|
# The type of this field is +String+.
|
244
244
|
# email_address::
|
245
245
|
# The email address of the Member.
|
@@ -284,6 +284,9 @@ module StytchB2B
|
|
284
284
|
# intermediate_session_token::
|
285
285
|
# Adds this primary authentication factor to the intermediate session token. If the resulting set of factors satisfies the organization's primary authentication requirements and MFA requirements, the intermediate session token will be consumed and converted to a member session. If not, the same intermediate session token will be returned.
|
286
286
|
# The type of this field is nilable +String+.
|
287
|
+
# telemetry_id::
|
288
|
+
# If the `telemetry_id` is passed, as part of this request, Stytch will call the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) and store the associated fingerprints and IPGEO information for the Member. Your workspace must be enabled for Device Fingerprinting to use this feature.
|
289
|
+
# The type of this field is nilable +String+.
|
287
290
|
#
|
288
291
|
# == Returns:
|
289
292
|
# An object with the following fields:
|
@@ -326,6 +329,9 @@ module StytchB2B
|
|
326
329
|
# primary_required::
|
327
330
|
# Information about the primary authentication requirements of the Organization.
|
328
331
|
# The type of this field is nilable +PrimaryRequired+ (+object+).
|
332
|
+
# member_device::
|
333
|
+
# If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
|
334
|
+
# The type of this field is nilable +DeviceInfo+ (+object+).
|
329
335
|
def authenticate(
|
330
336
|
organization_id:,
|
331
337
|
email_address:,
|
@@ -335,7 +341,8 @@ module StytchB2B
|
|
335
341
|
session_jwt: nil,
|
336
342
|
session_custom_claims: nil,
|
337
343
|
locale: nil,
|
338
|
-
intermediate_session_token: nil
|
344
|
+
intermediate_session_token: nil,
|
345
|
+
telemetry_id: nil
|
339
346
|
)
|
340
347
|
headers = {}
|
341
348
|
request = {
|
@@ -349,6 +356,7 @@ module StytchB2B
|
|
349
356
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
350
357
|
request[:locale] = locale unless locale.nil?
|
351
358
|
request[:intermediate_session_token] = intermediate_session_token unless intermediate_session_token.nil?
|
359
|
+
request[:telemetry_id] = telemetry_id unless telemetry_id.nil?
|
352
360
|
|
353
361
|
post_request('/v1/b2b/passwords/authenticate', request, headers)
|
354
362
|
end
|
@@ -389,7 +397,7 @@ module StytchB2B
|
|
389
397
|
#
|
390
398
|
# == Parameters:
|
391
399
|
# organization_id::
|
392
|
-
# 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 here as a convenience.
|
400
|
+
# 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.
|
393
401
|
# The type of this field is +String+.
|
394
402
|
# email_address::
|
395
403
|
# The email address of the Member to start the email reset process for.
|
@@ -534,6 +542,9 @@ module StytchB2B
|
|
534
542
|
# intermediate_session_token::
|
535
543
|
# Adds this primary authentication factor to the intermediate session token. If the resulting set of factors satisfies the organization's primary authentication requirements and MFA requirements, the intermediate session token will be consumed and converted to a member session. If not, the same intermediate session token will be returned.
|
536
544
|
# The type of this field is nilable +String+.
|
545
|
+
# telemetry_id::
|
546
|
+
# If the `telemetry_id` is passed, as part of this request, Stytch will call the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) and store the associated fingerprints and IPGEO information for the Member. Your workspace must be enabled for Device Fingerprinting to use this feature.
|
547
|
+
# The type of this field is nilable +String+.
|
537
548
|
#
|
538
549
|
# == Returns:
|
539
550
|
# An object with the following fields:
|
@@ -579,6 +590,9 @@ module StytchB2B
|
|
579
590
|
# primary_required::
|
580
591
|
# Information about the primary authentication requirements of the Organization.
|
581
592
|
# The type of this field is nilable +PrimaryRequired+ (+object+).
|
593
|
+
# member_device::
|
594
|
+
# If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
|
595
|
+
# The type of this field is nilable +DeviceInfo+ (+object+).
|
582
596
|
def reset(
|
583
597
|
password_reset_token:,
|
584
598
|
password:,
|
@@ -588,7 +602,8 @@ module StytchB2B
|
|
588
602
|
code_verifier: nil,
|
589
603
|
session_custom_claims: nil,
|
590
604
|
locale: nil,
|
591
|
-
intermediate_session_token: nil
|
605
|
+
intermediate_session_token: nil,
|
606
|
+
telemetry_id: nil
|
592
607
|
)
|
593
608
|
headers = {}
|
594
609
|
request = {
|
@@ -602,6 +617,7 @@ module StytchB2B
|
|
602
617
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
603
618
|
request[:locale] = locale unless locale.nil?
|
604
619
|
request[:intermediate_session_token] = intermediate_session_token unless intermediate_session_token.nil?
|
620
|
+
request[:telemetry_id] = telemetry_id unless telemetry_id.nil?
|
605
621
|
|
606
622
|
post_request('/v1/b2b/passwords/email/reset', request, headers)
|
607
623
|
end
|
@@ -615,7 +631,7 @@ module StytchB2B
|
|
615
631
|
# The email address of the Member to start the email reset process for.
|
616
632
|
# The type of this field is +String+.
|
617
633
|
# organization_id::
|
618
|
-
# 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 here as a convenience.
|
634
|
+
# 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.
|
619
635
|
# The type of this field is nilable +String+.
|
620
636
|
# member_id::
|
621
637
|
# 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. You may use an external_id here if one is set for the member.
|
@@ -672,7 +688,7 @@ module StytchB2B
|
|
672
688
|
#
|
673
689
|
# == Parameters:
|
674
690
|
# organization_id::
|
675
|
-
# 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 here as a convenience.
|
691
|
+
# 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.
|
676
692
|
# The type of this field is +String+.
|
677
693
|
# password::
|
678
694
|
# The password to authenticate, reset, or set for the first time. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characters, etc.
|
@@ -709,6 +725,9 @@ module StytchB2B
|
|
709
725
|
# Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
|
710
726
|
#
|
711
727
|
# The type of this field is nilable +ResetRequestLocale+ (string enum).
|
728
|
+
# telemetry_id::
|
729
|
+
# If the `telemetry_id` is passed, as part of this request, Stytch will call the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) and store the associated fingerprints and IPGEO information for the Member. Your workspace must be enabled for Device Fingerprinting to use this feature.
|
730
|
+
# The type of this field is nilable +String+.
|
712
731
|
#
|
713
732
|
# == Returns:
|
714
733
|
# An object with the following fields:
|
@@ -745,6 +764,9 @@ module StytchB2B
|
|
745
764
|
# mfa_required::
|
746
765
|
# Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
|
747
766
|
# The type of this field is nilable +MfaRequired+ (+object+).
|
767
|
+
# member_device::
|
768
|
+
# If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
|
769
|
+
# The type of this field is nilable +DeviceInfo+ (+object+).
|
748
770
|
def reset(
|
749
771
|
organization_id:,
|
750
772
|
password:,
|
@@ -752,7 +774,8 @@ module StytchB2B
|
|
752
774
|
session_jwt: nil,
|
753
775
|
session_duration_minutes: nil,
|
754
776
|
session_custom_claims: nil,
|
755
|
-
locale: nil
|
777
|
+
locale: nil,
|
778
|
+
telemetry_id: nil
|
756
779
|
)
|
757
780
|
headers = {}
|
758
781
|
request = {
|
@@ -764,6 +787,7 @@ module StytchB2B
|
|
764
787
|
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
|
765
788
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
766
789
|
request[:locale] = locale unless locale.nil?
|
790
|
+
request[:telemetry_id] = telemetry_id unless telemetry_id.nil?
|
767
791
|
|
768
792
|
post_request('/v1/b2b/passwords/session/reset', request, headers)
|
769
793
|
end
|
@@ -776,7 +800,7 @@ module StytchB2B
|
|
776
800
|
@connection = connection
|
777
801
|
end
|
778
802
|
|
779
|
-
# Reset the member
|
803
|
+
# Reset the member's password using their existing password.
|
780
804
|
#
|
781
805
|
# This endpoint adapts to your Project's password strength configuration.
|
782
806
|
# If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the default, your passwords are considered valid
|
@@ -803,7 +827,7 @@ module StytchB2B
|
|
803
827
|
# The Member's elected new password.
|
804
828
|
# The type of this field is +String+.
|
805
829
|
# organization_id::
|
806
|
-
# 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 here as a convenience.
|
830
|
+
# 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.
|
807
831
|
# The type of this field is +String+.
|
808
832
|
# session_token::
|
809
833
|
# A secret token for a given Stytch Session.
|
@@ -839,6 +863,9 @@ module StytchB2B
|
|
839
863
|
# Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
|
840
864
|
#
|
841
865
|
# The type of this field is nilable +ResetRequestLocale+ (string enum).
|
866
|
+
# telemetry_id::
|
867
|
+
# If the `telemetry_id` is passed, as part of this request, Stytch will call the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) and store the associated fingerprints and IPGEO information for the Member. Your workspace must be enabled for Device Fingerprinting to use this feature.
|
868
|
+
# The type of this field is nilable +String+.
|
842
869
|
#
|
843
870
|
# == Returns:
|
844
871
|
# An object with the following fields:
|
@@ -878,6 +905,9 @@ module StytchB2B
|
|
878
905
|
# primary_required::
|
879
906
|
# Information about the primary authentication requirements of the Organization.
|
880
907
|
# The type of this field is nilable +PrimaryRequired+ (+object+).
|
908
|
+
# member_device::
|
909
|
+
# If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
|
910
|
+
# The type of this field is nilable +DeviceInfo+ (+object+).
|
881
911
|
def reset(
|
882
912
|
email_address:,
|
883
913
|
existing_password:,
|
@@ -887,7 +917,8 @@ module StytchB2B
|
|
887
917
|
session_duration_minutes: nil,
|
888
918
|
session_jwt: nil,
|
889
919
|
session_custom_claims: nil,
|
890
|
-
locale: nil
|
920
|
+
locale: nil,
|
921
|
+
telemetry_id: nil
|
891
922
|
)
|
892
923
|
headers = {}
|
893
924
|
request = {
|
@@ -901,6 +932,7 @@ module StytchB2B
|
|
901
932
|
request[:session_jwt] = session_jwt unless session_jwt.nil?
|
902
933
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
903
934
|
request[:locale] = locale unless locale.nil?
|
935
|
+
request[:telemetry_id] = telemetry_id unless telemetry_id.nil?
|
904
936
|
|
905
937
|
post_request('/v1/b2b/passwords/existing_password/reset', request, headers)
|
906
938
|
end
|
@@ -20,7 +20,7 @@ module StytchB2B
|
|
20
20
|
#
|
21
21
|
# == Parameters:
|
22
22
|
# organization_id::
|
23
|
-
# 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 here as a convenience.
|
23
|
+
# 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.
|
24
24
|
# The type of this field is +String+.
|
25
25
|
# member_id::
|
26
26
|
# 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. You may use an external_id here if one is set for the member.
|
@@ -55,6 +55,9 @@ module StytchB2B
|
|
55
55
|
# delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored.
|
56
56
|
# Total custom claims size cannot exceed four kilobytes.
|
57
57
|
# The type of this field is nilable +object+.
|
58
|
+
# telemetry_id::
|
59
|
+
# If the `telemetry_id` is passed, as part of this request, Stytch will call the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) and store the associated fingerprints and IPGEO information for the Member. Your workspace must be enabled for Device Fingerprinting to use this feature.
|
60
|
+
# The type of this field is nilable +String+.
|
58
61
|
#
|
59
62
|
# == Returns:
|
60
63
|
# An object with the following fields:
|
@@ -85,6 +88,9 @@ module StytchB2B
|
|
85
88
|
# member_session::
|
86
89
|
# The [Session object](https://stytch.com/docs/b2b/api/session-object).
|
87
90
|
# The type of this field is nilable +MemberSession+ (+object+).
|
91
|
+
# member_device::
|
92
|
+
# If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
|
93
|
+
# The type of this field is nilable +DeviceInfo+ (+object+).
|
88
94
|
def recover(
|
89
95
|
organization_id:,
|
90
96
|
member_id:,
|
@@ -93,7 +99,8 @@ module StytchB2B
|
|
93
99
|
session_token: nil,
|
94
100
|
session_jwt: nil,
|
95
101
|
session_duration_minutes: nil,
|
96
|
-
session_custom_claims: nil
|
102
|
+
session_custom_claims: nil,
|
103
|
+
telemetry_id: nil
|
97
104
|
)
|
98
105
|
headers = {}
|
99
106
|
request = {
|
@@ -106,6 +113,7 @@ module StytchB2B
|
|
106
113
|
request[:session_jwt] = session_jwt unless session_jwt.nil?
|
107
114
|
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
|
108
115
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
116
|
+
request[:telemetry_id] = telemetry_id unless telemetry_id.nil?
|
109
117
|
|
110
118
|
post_request('/v1/b2b/recovery_codes/recover', request, headers)
|
111
119
|
end
|
@@ -114,7 +122,7 @@ module StytchB2B
|
|
114
122
|
#
|
115
123
|
# == Parameters:
|
116
124
|
# organization_id::
|
117
|
-
# 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 here as a convenience.
|
125
|
+
# 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.
|
118
126
|
# The type of this field is +String+.
|
119
127
|
# member_id::
|
120
128
|
# 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. You may use an external_id here if one is set for the member.
|
@@ -154,7 +162,7 @@ module StytchB2B
|
|
154
162
|
#
|
155
163
|
# == Parameters:
|
156
164
|
# organization_id::
|
157
|
-
# 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 here as a convenience.
|
165
|
+
# 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.
|
158
166
|
# The type of this field is +String+.
|
159
167
|
# member_id::
|
160
168
|
# 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. You may use an external_id here if one is set for the member.
|
data/lib/stytch/b2b_scim.rb
CHANGED
@@ -182,7 +182,7 @@ module StytchB2B
|
|
182
182
|
#
|
183
183
|
# == Parameters:
|
184
184
|
# organization_id::
|
185
|
-
# 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 here as a convenience.
|
185
|
+
# 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.
|
186
186
|
# The type of this field is +String+.
|
187
187
|
# connection_id::
|
188
188
|
# The ID of the SCIM connection.
|
@@ -233,7 +233,7 @@ module StytchB2B
|
|
233
233
|
#
|
234
234
|
# == Parameters:
|
235
235
|
# organization_id::
|
236
|
-
# 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 here as a convenience.
|
236
|
+
# 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.
|
237
237
|
# The type of this field is +String+.
|
238
238
|
# connection_id::
|
239
239
|
# The ID of the SCIM connection.
|
@@ -267,7 +267,7 @@ module StytchB2B
|
|
267
267
|
#
|
268
268
|
# == Parameters:
|
269
269
|
# organization_id::
|
270
|
-
# 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 here as a convenience.
|
270
|
+
# 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.
|
271
271
|
# The type of this field is +String+.
|
272
272
|
# connection_id::
|
273
273
|
# The ID of the SCIM connection.
|
@@ -303,7 +303,7 @@ module StytchB2B
|
|
303
303
|
#
|
304
304
|
# == Parameters:
|
305
305
|
# organization_id::
|
306
|
-
# 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 here as a convenience.
|
306
|
+
# 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.
|
307
307
|
# The type of this field is +String+.
|
308
308
|
# connection_id::
|
309
309
|
# The ID of the SCIM connection.
|
@@ -339,7 +339,7 @@ module StytchB2B
|
|
339
339
|
#
|
340
340
|
# == Parameters:
|
341
341
|
# organization_id::
|
342
|
-
# 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 here as a convenience.
|
342
|
+
# 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.
|
343
343
|
# The type of this field is +String+.
|
344
344
|
# connection_id::
|
345
345
|
# The ID of the SCIM connection.
|
@@ -375,7 +375,7 @@ module StytchB2B
|
|
375
375
|
#
|
376
376
|
# == Parameters:
|
377
377
|
# organization_id::
|
378
|
-
# 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 here as a convenience.
|
378
|
+
# 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.
|
379
379
|
# The type of this field is +String+.
|
380
380
|
# connection_id::
|
381
381
|
# The ID of the SCIM connection.
|
@@ -422,7 +422,7 @@ module StytchB2B
|
|
422
422
|
#
|
423
423
|
# == Parameters:
|
424
424
|
# organization_id::
|
425
|
-
# 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 here as a convenience.
|
425
|
+
# 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.
|
426
426
|
# The type of this field is +String+.
|
427
427
|
# display_name::
|
428
428
|
# A human-readable display name for the connection.
|
@@ -464,7 +464,7 @@ module StytchB2B
|
|
464
464
|
#
|
465
465
|
# == Parameters:
|
466
466
|
# organization_id::
|
467
|
-
# 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 here as a convenience.
|
467
|
+
# 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.
|
468
468
|
# The type of this field is +String+.
|
469
469
|
#
|
470
470
|
# == Returns:
|
data/lib/stytch/b2b_sessions.rb
CHANGED
@@ -57,7 +57,7 @@ module StytchB2B
|
|
57
57
|
#
|
58
58
|
# == Parameters:
|
59
59
|
# organization_id::
|
60
|
-
# 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 here as a convenience.
|
60
|
+
# 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.
|
61
61
|
# The type of this field is +String+.
|
62
62
|
# member_id::
|
63
63
|
# 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. You may use an external_id here if one is set for the member.
|
@@ -248,7 +248,7 @@ module StytchB2B
|
|
248
248
|
#
|
249
249
|
# == Parameters:
|
250
250
|
# organization_id::
|
251
|
-
# 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 here as a convenience.
|
251
|
+
# 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.
|
252
252
|
# The type of this field is +String+.
|
253
253
|
# session_token::
|
254
254
|
# The `session_token` belonging to the member that you wish to associate the email with.
|
@@ -284,6 +284,9 @@ module StytchB2B
|
|
284
284
|
# Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
|
285
285
|
#
|
286
286
|
# The type of this field is nilable +ExchangeRequestLocale+ (string enum).
|
287
|
+
# telemetry_id::
|
288
|
+
# If the `telemetry_id` is passed, as part of this request, Stytch will call the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) and store the associated fingerprints and IPGEO information for the Member. Your workspace must be enabled for Device Fingerprinting to use this feature.
|
289
|
+
# The type of this field is nilable +String+.
|
287
290
|
#
|
288
291
|
# == Returns:
|
289
292
|
# An object with the following fields:
|
@@ -323,13 +326,17 @@ module StytchB2B
|
|
323
326
|
# primary_required::
|
324
327
|
# Information about the primary authentication requirements of the Organization.
|
325
328
|
# The type of this field is nilable +PrimaryRequired+ (+object+).
|
329
|
+
# member_device::
|
330
|
+
# If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
|
331
|
+
# The type of this field is nilable +DeviceInfo+ (+object+).
|
326
332
|
def exchange(
|
327
333
|
organization_id:,
|
328
334
|
session_token: nil,
|
329
335
|
session_jwt: nil,
|
330
336
|
session_duration_minutes: nil,
|
331
337
|
session_custom_claims: nil,
|
332
|
-
locale: nil
|
338
|
+
locale: nil,
|
339
|
+
telemetry_id: nil
|
333
340
|
)
|
334
341
|
headers = {}
|
335
342
|
request = {
|
@@ -340,6 +347,7 @@ module StytchB2B
|
|
340
347
|
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
|
341
348
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
342
349
|
request[:locale] = locale unless locale.nil?
|
350
|
+
request[:telemetry_id] = telemetry_id unless telemetry_id.nil?
|
343
351
|
|
344
352
|
post_request('/v1/b2b/sessions/exchange', request, headers)
|
345
353
|
end
|
@@ -375,6 +383,9 @@ module StytchB2B
|
|
375
383
|
# delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored.
|
376
384
|
# Total custom claims size cannot exceed four kilobytes.
|
377
385
|
# The type of this field is nilable +object+.
|
386
|
+
# telemetry_id::
|
387
|
+
# If the `telemetry_id` is passed, as part of this request, Stytch will call the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) and store the associated fingerprints and IPGEO information for the Member. Your workspace must be enabled for Device Fingerprinting to use this feature.
|
388
|
+
# The type of this field is nilable +String+.
|
378
389
|
#
|
379
390
|
# == Returns:
|
380
391
|
# An object with the following fields:
|
@@ -402,10 +413,14 @@ module StytchB2B
|
|
402
413
|
# member_session::
|
403
414
|
# The [Session object](https://stytch.com/docs/b2b/api/session-object).
|
404
415
|
# The type of this field is nilable +MemberSession+ (+object+).
|
416
|
+
# member_device::
|
417
|
+
# If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
|
418
|
+
# The type of this field is nilable +DeviceInfo+ (+object+).
|
405
419
|
def exchange_access_token(
|
406
420
|
access_token:,
|
407
421
|
session_duration_minutes: nil,
|
408
|
-
session_custom_claims: nil
|
422
|
+
session_custom_claims: nil,
|
423
|
+
telemetry_id: nil
|
409
424
|
)
|
410
425
|
headers = {}
|
411
426
|
request = {
|
@@ -413,6 +428,7 @@ module StytchB2B
|
|
413
428
|
}
|
414
429
|
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
|
415
430
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
431
|
+
request[:telemetry_id] = telemetry_id unless telemetry_id.nil?
|
416
432
|
|
417
433
|
post_request('/v1/b2b/sessions/exchange_access_token', request, headers)
|
418
434
|
end
|
@@ -453,6 +469,9 @@ module StytchB2B
|
|
453
469
|
# session_jwt::
|
454
470
|
# The `session_jwt` for the session that you wish to add the trusted auth token authentication factor to.
|
455
471
|
# The type of this field is nilable +String+.
|
472
|
+
# telemetry_id::
|
473
|
+
# If the `telemetry_id` is passed, as part of this request, Stytch will call the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) and store the associated fingerprints and IPGEO information for the Member. Your workspace must be enabled for Device Fingerprinting to use this feature.
|
474
|
+
# The type of this field is nilable +String+.
|
456
475
|
#
|
457
476
|
# == Returns:
|
458
477
|
# An object with the following fields:
|
@@ -480,6 +499,9 @@ module StytchB2B
|
|
480
499
|
# status_code::
|
481
500
|
# 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.
|
482
501
|
# The type of this field is +Integer+.
|
502
|
+
# member_device::
|
503
|
+
# If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
|
504
|
+
# The type of this field is nilable +DeviceInfo+ (+object+).
|
483
505
|
def attest(
|
484
506
|
organization_id:,
|
485
507
|
profile_id:,
|
@@ -487,7 +509,8 @@ module StytchB2B
|
|
487
509
|
session_duration_minutes: nil,
|
488
510
|
session_custom_claims: nil,
|
489
511
|
session_token: nil,
|
490
|
-
session_jwt: nil
|
512
|
+
session_jwt: nil,
|
513
|
+
telemetry_id: nil
|
491
514
|
)
|
492
515
|
headers = {}
|
493
516
|
request = {
|
@@ -499,6 +522,7 @@ module StytchB2B
|
|
499
522
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
500
523
|
request[:session_token] = session_token unless session_token.nil?
|
501
524
|
request[:session_jwt] = session_jwt unless session_jwt.nil?
|
525
|
+
request[:telemetry_id] = telemetry_id unless telemetry_id.nil?
|
502
526
|
|
503
527
|
post_request('/v1/b2b/sessions/attest', request, headers)
|
504
528
|
end
|
@@ -513,7 +537,7 @@ module StytchB2B
|
|
513
537
|
# The authorization token Stytch will pass in to the external userinfo endpoint.
|
514
538
|
# The type of this field is +String+.
|
515
539
|
# organization_id::
|
516
|
-
# 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 here as a convenience.
|
540
|
+
# 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.
|
517
541
|
# The type of this field is +String+.
|
518
542
|
# session_duration_minutes::
|
519
543
|
# Set the session lifetime to be this many minutes from now. This will start a new session if one doesn't already exist,
|
data/lib/stytch/b2b_sso.rb
CHANGED
@@ -63,7 +63,7 @@ module StytchB2B
|
|
63
63
|
#
|
64
64
|
# == Parameters:
|
65
65
|
# organization_id::
|
66
|
-
# 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 here as a convenience.
|
66
|
+
# 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.
|
67
67
|
# The type of this field is +String+.
|
68
68
|
#
|
69
69
|
# == Returns:
|
@@ -101,7 +101,7 @@ module StytchB2B
|
|
101
101
|
#
|
102
102
|
# == Parameters:
|
103
103
|
# organization_id::
|
104
|
-
# The organization ID that the SSO connection belongs to. You may also use the organization_slug here as a convenience.
|
104
|
+
# The organization ID that the SSO connection belongs to. You may also use the organization_slug or organization_external_id here as a convenience.
|
105
105
|
# The type of this field is +String+.
|
106
106
|
# connection_id::
|
107
107
|
# The ID of the SSO connection. SAML, OIDC, and External connection IDs can be provided.
|
@@ -188,6 +188,9 @@ module StytchB2B
|
|
188
188
|
# intermediate_session_token::
|
189
189
|
# Adds this primary authentication factor to the intermediate session token. If the resulting set of factors satisfies the organization's primary authentication requirements and MFA requirements, the intermediate session token will be consumed and converted to a member session. If not, the same intermediate session token will be returned.
|
190
190
|
# The type of this field is nilable +String+.
|
191
|
+
# telemetry_id::
|
192
|
+
# If the `telemetry_id` is passed, as part of this request, Stytch will call the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) and store the associated fingerprints and IPGEO information for the Member. Your workspace must be enabled for Device Fingerprinting to use this feature.
|
193
|
+
# The type of this field is nilable +String+.
|
191
194
|
#
|
192
195
|
# == Returns:
|
193
196
|
# An object with the following fields:
|
@@ -233,6 +236,9 @@ module StytchB2B
|
|
233
236
|
# primary_required::
|
234
237
|
# (no documentation yet)
|
235
238
|
# The type of this field is nilable +PrimaryRequired+ (+object+).
|
239
|
+
# member_device::
|
240
|
+
# If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes.
|
241
|
+
# The type of this field is nilable +DeviceInfo+ (+object+).
|
236
242
|
def authenticate(
|
237
243
|
sso_token:,
|
238
244
|
pkce_code_verifier: nil,
|
@@ -241,7 +247,8 @@ module StytchB2B
|
|
241
247
|
session_duration_minutes: nil,
|
242
248
|
session_custom_claims: nil,
|
243
249
|
locale: nil,
|
244
|
-
intermediate_session_token: nil
|
250
|
+
intermediate_session_token: nil,
|
251
|
+
telemetry_id: nil
|
245
252
|
)
|
246
253
|
headers = {}
|
247
254
|
request = {
|
@@ -254,6 +261,7 @@ module StytchB2B
|
|
254
261
|
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
255
262
|
request[:locale] = locale unless locale.nil?
|
256
263
|
request[:intermediate_session_token] = intermediate_session_token unless intermediate_session_token.nil?
|
264
|
+
request[:telemetry_id] = telemetry_id unless telemetry_id.nil?
|
257
265
|
|
258
266
|
post_request('/v1/b2b/sso/authenticate', request, headers)
|
259
267
|
end
|
@@ -307,7 +315,7 @@ module StytchB2B
|
|
307
315
|
#
|
308
316
|
# == Parameters:
|
309
317
|
# organization_id::
|
310
|
-
# 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 here as a convenience.
|
318
|
+
# 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.
|
311
319
|
# The type of this field is +String+.
|
312
320
|
# display_name::
|
313
321
|
# A human-readable display name for the connection.
|
@@ -368,7 +376,7 @@ module StytchB2B
|
|
368
376
|
#
|
369
377
|
# == Parameters:
|
370
378
|
# organization_id::
|
371
|
-
# 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 here as a convenience.
|
379
|
+
# 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.
|
372
380
|
# The type of this field is +String+.
|
373
381
|
# connection_id::
|
374
382
|
# Globally unique UUID that identifies a specific SSO `connection_id` for a Member.
|
@@ -548,7 +556,7 @@ module StytchB2B
|
|
548
556
|
#
|
549
557
|
# == Parameters:
|
550
558
|
# organization_id::
|
551
|
-
# 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 here as a convenience.
|
559
|
+
# 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.
|
552
560
|
# The type of this field is +String+.
|
553
561
|
# display_name::
|
554
562
|
# A human-readable display name for the connection.
|
@@ -598,7 +606,7 @@ module StytchB2B
|
|
598
606
|
#
|
599
607
|
# == Parameters:
|
600
608
|
# organization_id::
|
601
|
-
# 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 here as a convenience.
|
609
|
+
# 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.
|
602
610
|
# The type of this field is +String+.
|
603
611
|
# connection_id::
|
604
612
|
# Globally unique UUID that identifies a specific SSO `connection_id` for a Member.
|
@@ -711,7 +719,7 @@ module StytchB2B
|
|
711
719
|
#
|
712
720
|
# == Parameters:
|
713
721
|
# organization_id::
|
714
|
-
# 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 here as a convenience.
|
722
|
+
# 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.
|
715
723
|
# The type of this field is +String+.
|
716
724
|
# connection_id::
|
717
725
|
# Globally unique UUID that identifies a specific SSO `connection_id` for a Member.
|
@@ -755,7 +763,7 @@ module StytchB2B
|
|
755
763
|
#
|
756
764
|
# == Parameters:
|
757
765
|
# organization_id::
|
758
|
-
# The organization ID that the SAML connection belongs to. You may also use the organization_slug here as a convenience.
|
766
|
+
# The organization ID that the SAML connection belongs to. You may also use the organization_slug or organization_external_id here as a convenience.
|
759
767
|
# The type of this field is +String+.
|
760
768
|
# connection_id::
|
761
769
|
# The ID of the SAML connection.
|
@@ -839,7 +847,7 @@ module StytchB2B
|
|
839
847
|
#
|
840
848
|
# == Parameters:
|
841
849
|
# organization_id::
|
842
|
-
# 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 here as a convenience.
|
850
|
+
# 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.
|
843
851
|
# The type of this field is +String+.
|
844
852
|
# external_organization_id::
|
845
853
|
# Globally unique UUID that identifies a different Organization within your Project.
|
@@ -897,7 +905,7 @@ module StytchB2B
|
|
897
905
|
#
|
898
906
|
# == Parameters:
|
899
907
|
# organization_id::
|
900
|
-
# 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 here as a convenience.
|
908
|
+
# 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.
|
901
909
|
# The type of this field is +String+.
|
902
910
|
# connection_id::
|
903
911
|
# Globally unique UUID that identifies a specific External SSO Connection.
|